Would it be possible for us to warn when an user declares duplicated 
aliases in the same scope?

This code, for example: 

```
defmodule Test do
  alias IO.ANSI
  alias IO.ANSI
  alias IO.ANSI

  def hello do
    IO.puts([ANSI.red(), "hey", ANSI.reset()])
  end
end
```

Compiles without any warnings, even though two of these aliases are just 
"dead code".

I've noticed this after seeing some codebases containing files with these 
duplicated aliases, something that can actually happening sometimes when 
people solve conflicts and don't review it thoroughly.

Also credo currently does not catch that and I believe a proposal there 
would also be fine, but I'm not sure why the language couldn't warn in such 
cases, since this is more like dead code than styling/linting.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/f3367823-acf9-4d8d-93e9-066ca5dd7fd5n%40googlegroups.com.

Reply via email to