org.sonar.l10n.delphi.rules.community-delphi.UnusedImport.html Maven / Gradle / Ivy
Why is this an issue?
Having unused imports adversely affects code readability, as their presence is confusing. Code
that is never used should be removed to keep codebases clean and maintainable. Unused imports may
also negatively affect compilation time and impact the ability of the compiler to perform accurate
incremental compilation.
Note that there are cases where importing "unused" units is necessary:
-
Units with an initialization section, finalization section, or a
Register
procedure
need to be imported at least once for code in those locations to be executed.
-
Units that are used in the Delphi form file need to be included in the source file's uses
clause.
How to fix it
Remove the unused import.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy