-
-
Notifications
You must be signed in to change notification settings - Fork 80
Optionally ban JUnit 4 imports #1178
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
Optionally ban JUnit 4 imports #1178
Conversation
|
Perhaps something similar could be done for |
timja
left a comment
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.
makes sense
|
@timja Any suggestions or preferences for naming before we lock this in forever? |
|
Name looks good |
|
FTR I have no intention of doing any sort of larger-scale migration or other followup for this. This is just intended as an additional safeguard for changes like the ones I pointed out in the PR comment (and IMO is almost a prerequisite to accepting them). |
Thanks for doing this 👍🏼 |
|
@daniel-beck FYI, causes: https://github.com/jenkinsci/generic-webhook-trigger-plugin/pull/369/checks?check_run_id=48162665919 I'll create a follow-up to fix it if you don't mind. |
This PR adds a new property
ban-junit4-imports.skip. Similar tospotless.check.skipbefore it, it istrueby default. If overridden, an enforcer rule banningorg.junit.*imports, but allowingorg.junit.jupiter.*imports, is run.It's motivated by PRs like jenkinsci/matrix-auth-plugin#175 or jenkinsci/csp-plugin#48 that look far too easy to regress. Going via parent POM seems like the logical choice.
Feedback welcome. If this looks acceptable in principle, I'll look into where best to document this, as well as adding tests.
Testing done
Installed a snapshot locally, then:
Failure error message output
Submitter checklist