Yeah I agree that import is more tricky. But for me, alias is the main use 
case. I'll see if I can manage a PR.

On Thursday, February 3, 2022 at 11:56:02 PM UTC+1 José Valim wrote:

> We can warn it for aliases no problems and a PR would be welcome.
>
> However, for imports it is a bit more complicated because you can import 
> something multiple times with different parts. Furthermore, maybe a library 
> Bar is doing "import Foo" and you want to repeat "import Foo" for clarity. 
> I think we will have false positives.
>
> On Thu, Feb 3, 2022 at 9:48 PM [email protected] <[email protected]> wrote:
>
>> If a module is aliased or imported multipled times by the module, it 
>> would be handy to have a warning.
>>
>> For example:
>>
>> defmodule Foo do
>>
>>   alias Ecto.Changeset
>>   alias Ecto.Changeset
>>
>> end
>>
>> should result in a warning "duplicate import".
>>
>> This is low priority, but as there is one for unused import/alias it 
>> would help make the code cleaner.
>>
>> -- 
>> 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 [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/0d85ffa7-3997-4637-915e-523a744d155cn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elixir-lang-core/0d85ffa7-3997-4637-915e-523a744d155cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/cd5b5442-2f9f-44ea-baec-5c5a369ff8e0n%40googlegroups.com.

Reply via email to