-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
new Treewalker property to skip all nested Modules if there is parsing exception #12542
Comments
@rnveach , @nrmancuso , @pbludov , @strkkk , please share your thoughts |
Why not switch it to Javadoc's method of handling parsing failures and instead print a violation? They can then ignore the failures however they want (by suppression), completely or by file name. |
It still very complicated concept to suppress. Most users do not know that we have filters and how to manage them. |
From the description, it seems to me that this exact behavior can be achieved by the
I think that this is fine, since a user finding either property (haltOnException or new property) will fall into one of two cases:
We could certainly expand examples under Checker to include the above config and example, since this approach could also be extended to include other exceptions as well. |
so workaround is
Lets ask users to test it on real code. |
Ok, we have a nuance with workaround at #12542 (comment): #12507 (comment)
If we make new property, we can overcome this limitation, and should include testing of module order in config. |
and we will make effect of exception to be scoped to Treewalker. We have options to make (same a in Checker, but we did this option mostly for our testing tool, not as user request)
or smth like:
|
Is there any reason we can't synch behavior between javadoc and java in this regards? |
I see no problems to have similar/additional property for javadoc parser. BUT I do not think we should mix them, as javadoc parsing problem is too frequent, nobody knows javadoc syntax, no much tools can enforce it, no much interest from users to deal to with javadoc. |
@rnveach , @nrmancuso , @pbludov , @strkkk please share your opinion/vote on this issue. |
Ok, let me try to sum up our discussion:
I agree with all above points, due to nondeterminism of module execution blocking solution at #12507 (comment). I am good to introduce new properties, however I feel from a user standpoint that I would rather create a @romani if we are all in agreement, please edit issue description with my proposed task list and property names. |
Yes. BeforeExecutionExclusionFileFilter is not very convenient in real project you have to love checkstyle to always update its config. Checkstyle is tool on a side, it is not main tool. It should not block users to do what they want. If user ok to skip validation on whole file (many files) in favor of new jdk syntax, checkstyle should not block people. I would do each properties in separate issues, I still have doubts that users need javadoc, as nobody complained on this. For logging, we do not do logging, I am not sure how it will work in ant/maven/gradle , we can improve on logging separately. |
Any update on this issue? |
@cowwoc , please try #12542 (comment) @rnveach , please approve issue if you agree. Looks like I and @nrmancuso is in agreement. We can skip |
@cowwoc , what jdk version you use and we do not support? Do we already have issue in our issue tracker for your problem? |
@cowwoc , Does workaround work for you ? |
@romani Let me know when first post contains all final details I am approving. |
@rnveach , description is already in final state.
better to not make it now, as we create parser in each javadoc Check, so it is not treewalker and it is more complicated. We will think on this some time later on, if demand on this grow. |
@romani I believe it did. |
I am on this |
It is our biggest limitation to not work on non compilable files
https://checkstyle.org/writingchecks.html#Limitations
All of this is blocker for users:
https://github.com/checkstyle/checkstyle/issues?q=is%3Aopen+is%3Aissue+label%3Aantlr
but in most cases they mostlikely to ignore all Checkstyle activity on such files and let them use fancy new jdk syntax for business reasons.
We rely on plugin to cover this problem from us
But we still have problems with new syntax of Java
We need new property like
skipFileOnJavaParseException
or some thing similar.If user wants new features of Java and ok to skip checkstyle in such files, it should be easy to do
We should not limit our users and let them decide : choose one checkstyle of new jdk features
By default it is disabled so exception crash all as before
But we can hint users after they create issue on use, about it, and they will be unblocked
We will introduce a new property called
skipFileOnJavaParseException
:The text was updated successfully, but these errors were encountered: