What kind of dead code? Meandro currently has rules to find:
If Meandro detects issues in your code, it will report them as follows…
lib/cache.ex:23 |> execute/1 doesn't need its #1 argument
lib/application.ex:15 |> maybe_evaluate/2 doesn't need its #1 argument
lib/application.ex:45 |> maybe_evaluate/3 doesn't need its #2 argument
Config files |> Configuration option :color (MIX_ENV=dev) is not used anywhere in the code
The package can be installed from hex by
adding meandro to your list of dependencies in mix.exs:
def deps do
[
{:meandro, "~> 0.1.0"}
]
end
The docs can be found at https://hexdocs.pm/meandro.
mix meandro
is the basic command. It'll run all configured rules (which is all of them by default) against all of the *.ex files in your application.
You can pass the --files argument if you'd like to check only particular files.
mix meandro --files lib/foo.ex,lib/bar.ex
Be warned, however, that it will only look at those files. Functions declared in those files but used elsewhere will be seen as "unused."
The plugin supports the following configuration options in the meandro section of mix.exs:
rules ([Meandro.Rule.t()]):
Meandro.Rule behavior.parsing (Meandro.Util.parsing_style()):
Task.async/1) or sequential (plain Enum.map/2) fashion.parallel since it's faster.ignore ([Path.t() | {Path.t(), Meandro.Rule.t() | [Meandro.Rule.t()]} | {Path.t(), Meandro.Rule.t() | [Meandro.Rule.t()], list()}]):
def project do
[
meandro: meandro_config(),
...
]
end
def meandro_config() do
%{
rules: [Meandro.Rule.UnnecessaryFunctionArguments],
parsing: :sequential,
ignore: ["test/example.ex"]
}
end
Elixir
100.0%
What kind of dead code? Meandro currently has rules to find:
If Meandro detects issues in your code, it will report them as follows…
lib/cache.ex:23 |> execute/1 doesn't need its #1 argument
lib/application.ex:15 |> maybe_evaluate/2 doesn't need its #1 argument
lib/application.ex:45 |> maybe_evaluate/3 doesn't need its #2 argument
Config files |> Configuration option :color (MIX_ENV=dev) is not used anywhere in the code
The package can be installed from hex by
adding meandro to your list of dependencies in mix.exs:
def deps do
[
{:meandro, "~> 0.1.0"}
]
end
The docs can be found at https://hexdocs.pm/meandro.
mix meandro
is the basic command. It'll run all configured rules (which is all of them by default) against all of the *.ex files in your application.
You can pass the --files argument if you'd like to check only particular files.
mix meandro --files lib/foo.ex,lib/bar.ex
Be warned, however, that it will only look at those files. Functions declared in those files but used elsewhere will be seen as "unused."
The plugin supports the following configuration options in the meandro section of mix.exs:
rules ([Meandro.Rule.t()]):
Meandro.Rule behavior.parsing (Meandro.Util.parsing_style()):
Task.async/1) or sequential (plain Enum.map/2) fashion.parallel since it's faster.ignore ([Path.t() | {Path.t(), Meandro.Rule.t() | [Meandro.Rule.t()]} | {Path.t(), Meandro.Rule.t() | [Meandro.Rule.t()], list()}]):
def project do
[
meandro: meandro_config(),
...
]
end
def meandro_config() do
%{
rules: [Meandro.Rule.UnnecessaryFunctionArguments],
parsing: :sequential,
ignore: ["test/example.ex"]
}
end
Elixir
100.0%