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
Support record patterns (preview-feature in Java 19) as described by JEP 405 #12507
Comments
I am on it. |
@apflieger , can we ask you to try workaround while fix is in progress ? please try to apply this update to your config - #12542 (comment) |
It works but other rules on the same file seem not to be executed then. |
Yes, TreeWalker checks (java code) will not work if file cannot be parsed. Checks that have Checker as a parent (FileSet) checks will still work with the file:
Workaround at #12542 (comment) allows users to still use checkstyle, but not use TreeWalker checks on new syntax until support is added. Edit: there is a nuance, modules are executed sequentially:
So, for this workaround to still allow other checks (non TreeWalker) to execute, they must appear in config BEFORE TreeWalker module. |
On my main project we have Checker rules like |
@apflieger , if you move Treewalker in xml to be last child, execution will be more predictable. |
Fix was merged |
How it works Now:
Compilation works
javac --release 19 --enable-preview Example.java Note: Example.java uses preview features of Java SE 19. Note: Recompile with -Xlint:preview for details.
The source file
Run checkstyle 10.5.0
Is your feature request related to a problem? Please describe.
This feature has been released in september 2022 as a preview feature. To me, given the trend of the recent java evolutions, it is very unlikely to be withdrawn.
Here's the jep https://openjdk.org/jeps/405
😇
Thank you for your awesome work 🙏
The text was updated successfully, but these errors were encountered: