-
Notifications
You must be signed in to change notification settings - Fork 5
Issue #122: Support multiple instances of the same Checkstyle check #123
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
base: main
Are you sure you want to change the base?
Conversation
|
@romani @rdiachenko This PR currently covers most of the cases (all cases for sarif report) but there are some failing edge cases for xml report. Issue: XML reports only mention the check ID, which creates ambiguous matching when the ID value matches another check's class name, such as: <module name="Checker">
<module name="TreeWalker">
<module name="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck">
<property name="id" value="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
</module>
</module>
</module>No such issue with sarif since it mentions both the check name as well as the id. Can we make a similar thing for xml report in the main checkstyle repo otherwise there will be uncertainty with the logic always. |
|
@Anmol202005 please create an issue in the main checkstyle repo and include examples and expected output. Regarding: I think this is more theoretical than practical case. Users are in control of their configs, and I can't imagine the case when they want to set id pointing to a different module. This can be done by some odd refactoring or mistake. If the above case happens, what's the result of autofix execution? Will it fail or do nothing? We should just ignore such cases, because you have violation belonging to a different module id, which means if you try to execute recipe, nothing should change, right? |
|
If people wanted to shoot in their own leg by such config, ok , it is their problem. |
Yes nothing will change :) |
|
@romani this PR is ready to review. Should i create an issue for same in the main checkstyle repo ? |
|
Please create , but please use CLI to show a problem, to let us see all details. |
Fixes: #122