Open ghost opened 6 years ago
Hi @dark0dave,
Would credo
have to distinguish between functions and macros? In order to present the warning or not.
Also, what is the drive being using alias
instead of import
? (In my ignorance I feel they are the same if talk about functions)
Cheers
It would not.
The reason here is mostly for readability, it becomes complex if you import multiple modules with import. Better to alias where possible, in this manner its more precise as what functions you are using.
Ideal use would be if just using a single function from a module, alias would be used. If all functions are in use then import is acceptable.
Environment
What were you trying to do?
When a user, uses import for a single function from a module, a Software design should be thrown.
Expected outcome
When running:
Users should be warned about using import for a single function.
Actual outcome
Nothing, import for a single function without using only is not flagged.