-
Notifications
You must be signed in to change notification settings - Fork 324
Fix Checkstyle errors and improve code quality (final parameters, lin… #1142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -177,5 +177,56 @@ | |||||||||||||||||||||||||||||||||||
| <url>https://repo.jenkins-ci.org/public/</url> | ||||||||||||||||||||||||||||||||||||
| </pluginRepository> | ||||||||||||||||||||||||||||||||||||
| </pluginRepositories> | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| <build> | ||||||||||||||||||||||||||||||||||||
| <plugins> | ||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||
| <groupId>org.apache.maven.plugins</groupId> | ||||||||||||||||||||||||||||||||||||
| <artifactId>maven-checkstyle-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||
| <version>3.1.1</version> | ||||||||||||||||||||||||||||||||||||
| <executions> | ||||||||||||||||||||||||||||||||||||
| <execution> | ||||||||||||||||||||||||||||||||||||
| <phase>validate</phase> | ||||||||||||||||||||||||||||||||||||
| <goals> | ||||||||||||||||||||||||||||||||||||
| <goal>check</goal> | ||||||||||||||||||||||||||||||||||||
| </goals> | ||||||||||||||||||||||||||||||||||||
| </execution> | ||||||||||||||||||||||||||||||||||||
| </executions> | ||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||
| <groupId>com.github.spotbugs</groupId> | ||||||||||||||||||||||||||||||||||||
| <artifactId>spotbugs-maven-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||
| <version>4.2.0</version> | ||||||||||||||||||||||||||||||||||||
| <executions> | ||||||||||||||||||||||||||||||||||||
| <execution> | ||||||||||||||||||||||||||||||||||||
| <goals> | ||||||||||||||||||||||||||||||||||||
| <goal>check</goal> | ||||||||||||||||||||||||||||||||||||
| </goals> | ||||||||||||||||||||||||||||||||||||
| </execution> | ||||||||||||||||||||||||||||||||||||
| </executions> | ||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+195
to
+206
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed, since it is already provided by the parent pom.
Suggested change
|
||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||
| <groupId>org.jenkins-ci.tools</groupId> | ||||||||||||||||||||||||||||||||||||
| <artifactId>maven-hpi-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||
| <version>3.37</version> <!-- Ensure this is the latest stable version --> | ||||||||||||||||||||||||||||||||||||
| <extensions>true</extensions> | ||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+207
to
+212
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already provided by the parent pom.
Suggested change
|
||||||||||||||||||||||||||||||||||||
| <plugin> | ||||||||||||||||||||||||||||||||||||
| <groupId>com.diffplug.spotless</groupId> | ||||||||||||||||||||||||||||||||||||
| <artifactId>spotless-maven-plugin</artifactId> | ||||||||||||||||||||||||||||||||||||
| <version>2.17.0</version> | ||||||||||||||||||||||||||||||||||||
| <executions> | ||||||||||||||||||||||||||||||||||||
| <execution> | ||||||||||||||||||||||||||||||||||||
| <goals> | ||||||||||||||||||||||||||||||||||||
| <goal>apply</goal> | ||||||||||||||||||||||||||||||||||||
| </goals> | ||||||||||||||||||||||||||||||||||||
| </execution> | ||||||||||||||||||||||||||||||||||||
| </executions> | ||||||||||||||||||||||||||||||||||||
| <configuration> | ||||||||||||||||||||||||||||||||||||
| <java> | ||||||||||||||||||||||||||||||||||||
| <googleJavaFormat /> | ||||||||||||||||||||||||||||||||||||
| </java> | ||||||||||||||||||||||||||||||||||||
| </configuration> | ||||||||||||||||||||||||||||||||||||
| </plugin> | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+213
to
+229
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed. Provided by the parent pom.
Suggested change
|
||||||||||||||||||||||||||||||||||||
| </plugins> | ||||||||||||||||||||||||||||||||||||
| </build> | ||||||||||||||||||||||||||||||||||||
| </project> | ||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /** | ||
| * This package contains classes related to the Jenkins pipeline integration | ||
| * for Docker, including the management of Docker nodes and steps within the pipeline. | ||
| * | ||
| * <p>The classes in this package manage Docker pipeline steps, node provisioning, | ||
| * and the execution of build jobs within Docker containers.</p> | ||
| */ | ||
| package io.jenkins.docker; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the most recent release of the checkstyle plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your previous comments and guidance,
I noticed that we don't currently have a checkstyle.xml file in the repository or a clear indication of where it might be referenced. I'm wondering if there is a plan to introduce this file, or if we're using an external/shared configuration that I might have overlooked? I ran mvn spotless:apply successfully, but just wanted to make sure we're not missing any custom style rules that might come with Checkstyle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not planning to introduce checkstyle into this repository. The Jenkins plugins that I maintain do not use checkstyle. I've not found it to be valuable enough to be worth the effort to enable it.
If you're serious about enabling checkstyle in this repository, then you'll need to provide a complete implementation that includes the checkstyle settings to persuade me that it will be useful. The default checkstyle settings conflict with spotless formatting. I value spotless formatting much more than I value checkstyle warnings. If your pull request proposes to accept many new, unresolved checkstyle warnings, then I'll reject it. I'm not willing to add new warnings output because it will be a distraction and will create extra work for me to resolve the warnings.