Skip to content

Add linting harness to ensure code-quality #2123

Description

@hohwille

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

Metadata

Metadata

Assignees

Labels

SCMsoftware-configuration-management (github actions, internal processes, git or github utilization)enhancementNew feature or requestinternalNothing to be added to CHANGELOG, only internal storyworkflowGitHub actions (CI,CD,update urls/CVEs)

Type

Fields

No fields configured for Task.

Projects

Status
👀 In review

Relationships

None yet

Development

No branches or pull requests

Issue actions