Task summary
We want to ensure code-quality via automatic linting checks.
Unlike PR #2092 that already wanted to introduce this but blocked our progress this has to be introduced well structured and planned:
- as a pre-requisite the existing code-base needs to be cleaned up so that all existing files satisfy the rules we are introducing
- therefore all rules must not cause undesired blockages or false-positives
- we should agree on the rules and ensure they make sense from value/cost perspective
Examples of code issues that need to be clarified or configured as exclusion:
|
System.err.println("Logfile can be found at " + this.logfile); // do not use logger |
|
System.out.println("WARNING: Expected native image binary to be in bin path but found " + ideasyBinaryPath); |
|
System.out.print(candidate.text()); // enforce output via System.out even if logging is disabled |
|
System.out.print('\n'); // do not use println to prevent Carriage-Return character in bash completion on Windows |
|
PrintStream out = System.out; |
|
if (ideLevel == IdeLogLevel.ERROR) { |
|
out = System.err; |
Cleanups:
|
System.out.println("Skipping save for " + getPath() + " (no warnings and file doesn't exist)"); |
|
System.out.println("Starting testPycharmRun on " + os); |
|
System.out.println("Test adapted for Windows environment - testing basic junction functionality"); |
|
System.out.println("Starting testIntellijRun on " + os); |
The code places above are only for the System.out rule.
Analog work has to be done as preparation for every rule.
Additional context
No response
Task summary
We want to ensure code-quality via automatic linting checks.
Unlike PR #2092 that already wanted to introduce this but blocked our progress this has to be introduced well structured and planned:
Examples of code issues that need to be clarified or configured as exclusion:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java
Line 1214 in ce85d84
IDEasy/cli/src/main/java/com/devonfw/tools/ide/cli/GraalVmHelper.java
Line 47 in ce85d84
IDEasy/cli/src/main/java/com/devonfw/tools/ide/commandlet/CompleteCommandlet.java
Lines 58 to 59 in ce85d84
IDEasy/cli/src/main/java/com/devonfw/tools/ide/log/JulConsoleHandler.java
Lines 27 to 29 in ce85d84
Cleanups:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/url/model/file/UrlSecurityFile.java
Line 71 in ce85d84
IDEasy/cli/src/test/java/com/devonfw/tools/ide/tool/pycharm/PycharmTest.java
Line 91 in ce85d84
IDEasy/cli/src/test/java/com/devonfw/tools/ide/io/FileAccessImplTest.java
Line 1044 in ce85d84
IDEasy/cli/src/test/java/com/devonfw/tools/ide/tool/intellij/IntellijTest.java
Line 96 in ce85d84
The code places above are only for the
System.outrule.Analog work has to be done as preparation for every rule.
Additional context
No response