Since parsing all of OpenJDK14 has proven difficult due to the large number of non-compilable files, we need to add more projects that use Java14 syntax. We have identified a new project to test on in issue #8856:
@zml2008 , can you share how to run checkstyle on whole your project by gradle ?
we will verify that all other code is parse-able before releasing a fix.
_Originally posted by @romani in https://github.com/checkstyle/checkstyle/issues/8856#issuecomment-700747488_
thank you for your help!
I've worked around the issue since the test works either way, but the reproduction has been pushed to a branch.
Normally I use the gradle plugin (configured here) -- but from cli you can run:$ git switch bug/checkstyle-record $ java -jar checkstyle-8.36.2-all.jar -c ./etc/checkstyle/checkstyle.xml ./core/srcto reproduce the issue. It looks like there are a few other formatting issues printed, but those are from checkstyle working correctly
let me know if you need anything else :)
We should create a new CI item that tests on this repo.
This project is using Google style config with modifications, do it is good for us to keep in testing.
@romani Once we prove that we can parse the bug/checkstyle-record branch, we should test on master, right?
So:
create CI item on bug/checkstyle-record->
show failure ->
locally merge CI item into #8858 ->
show success ->
merge CI item ->
merge #8858 ->
new PR to change CI to parse main branch of SpongePowered/Configurate
?
@zml2008 does this mean that you have removed these annotation usages from your main branch for now?
I've worked around the issue since the test works either way
I'm actually just starting to introduce usage of records into my codebase -- so the master branch doesn't use any Java 14 features just yet (still in a PR), and I won't make broad use of newer features since most of my users are stuck on Java 8. However, the project might still be useful for your CI as I add more test coverage using newer language features.
I did remove the usage from the PR branch for now, but as soon as the local record fix for checkstyle is published, I plan to update the PR branch to restore local record use, and that will all be merged into Configurate's main branch within the next week.
parse main branch of SpongePowered/Configurate
?
You can simply add this project to your regression config to generate diff report. This will be enough to merge a fix.
And in other PR, do addition of this project to CI to test on it.
@zml2008, please let us know if you have variable in Gradle config to let run validation on version that we need (snapshot)
I've just updated all the relevant branches to add a property for the checkstyle version.
./gradlew -PcheckstyleVersion=<version> -x test check
will run checkstyle (skipping other unit tests), and will continue working even if we change our specific checkstyle task names. I've got that set up to look for checkstyle in maven local (~/.m2/repository/), as well as the usual maven central/jcenter. If you need Gradle to look in another repository, let me know and I can add it.
fix is merged.
Most helpful comment
I've just updated all the relevant branches to add a property for the checkstyle version.
will run checkstyle (skipping other unit tests), and will continue working even if we change our specific checkstyle task names. I've got that set up to look for checkstyle in maven local (
~/.m2/repository/), as well as the usual maven central/jcenter. If you need Gradle to look in another repository, let me know and I can add it.