Created
August 26, 2019 11:39
-
-
Save karolsluszniak/f028a40fd3fce0784982760fb3fb1b19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "lib/**/*.ex" | |
| |> Path.wildcard() | |
| |> Enum.filter(&File.regular?/1) | |
| |> Enum.filter(fn contract_path -> | |
| contract = File.read!(contract_path) | |
| legacy = String.contains?(contract, "Legacy") | |
| is_contract = String.contains?(contract, "@owner") | |
| has_callback = String.contains?(contract, "@callback") | |
| not legacy and is_contract and not has_callback | |
| end) | |
| |> Enum.map(&String.replace(&1, "lib/", "")) | |
| |> Enum.map(&String.replace(&1, ".ex", "")) | |
| |> Enum.map(&Path.dirname/1) | |
| |> Enum.each(&IO.puts/1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment