Skip to content
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

Activate Spotless via Maven property rather than file #742

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

basil
Copy link
Member

@basil basil commented Apr 15, 2023

Thanks to the many plugin maintainers who have adopted the new configuration introduced in #733. This has allowed me to clean up the way this configuration is activated by lifting it out of a custom profile into the main section of the build. To keep it off by default I am defining <spotless.check.skip>true</spotless.check.skip> by default. Plugins can override this property to <spotless.check.skip>false</spotless.check.skip> to enable Spotless. The documentation now recommends this over the file-based activation method. The file-based activation method still works as a compatibility bridge but just sets this property. After this PR is merged, I will go through any plugins using the file-based activation method and convert them to the property method, then finally remove the file-based activation from this POM.

The only risk here is to the handful of plugins that are still defining their own configuration:

Since I have filed PRs to update most of these to use the standard configuration I am not worried. If for some reason the maintainers refuse to use the standard configuration then they will have to figure out how to harmonize their configuration with mine. An example of how to do this is in jenkinsci/additional-metrics-plugin#23 where I blended in the maintainer's preference for a license header check.

As part of this PR I have also enabled Spotless for this repository's test suite and formatted any test plugins to enhance test coverage.

@basil basil added the internal label Apr 15, 2023
@basil
Copy link
Member Author

basil commented Apr 19, 2023

If any of the above maintainers encounter an issue with this PR, they can either remove their non-standard Spotless configuration or contact me for help with harmonizing the two configurations if necessary. In many cases I have already reached out with no response.

@basil basil merged commit 5654d97 into jenkinsci:master Apr 19, 2023
@basil basil deleted the spotless branch April 19, 2023 15:45
jglick added a commit to jenkinsci/mock-load-builder-plugin that referenced this pull request Apr 25, 2023
jglick added a commit to jenkinsci/mock-load-builder-plugin that referenced this pull request Apr 25, 2023
dependabot bot pushed a commit to jenkinsci/mock-load-builder-plugin that referenced this pull request Apr 25, 2023
dependabot bot pushed a commit to jenkinsci/mock-load-builder-plugin that referenced this pull request Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant