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
Issue #14448: Updated IDEA to latest version v2023.3.4 #14604
Conversation
The failing CI checkstyle.checkstyle (Job spelling) because of my personal docker hub repo name
ci/circleci: run-inspections shows a successful build with inspection problems :
Should the inspection problems be dealt with in this PR itself ? |
One thing at a time, let's get image update across the finish line in contribution repo. However, we usually suppress each one to make CI green, then go back and remove suppressions and deal with the code. |
ac7f611
to
c33f386
Compare
@MANISH-K-07 please suppress by |
Will do.. this is the first time I'm hearing about this tag, but I'm a quick learner ;) Created Issue #14625 |
aa8c874
to
855e12d
Compare
I have managed to ditch all inspection problems except : The
EDIT : following
|
We should not be checking generated files at all, please see if you can limit inspection scope to avoid these violations. For the |
@nrmancuso , checkstyle/.ci/idea-inspection.sh Lines 13 to 15 in 68c333d
I believe changing checkstyle/.ci/idea-inspection.bat Line 11 in 93a29b2
SET PROJECT_DIR=%CD%\ --> SET PROJECT_DIR=%CD%\src
Please confirm if this is what you meant by "please see if you can limit inspection scope to avoid these violations" so that I can proceed with making necessary code changes. ----------------------------------------------------------------------------------------------------Coming to the Please do correct me in case my understanding is wrong anywhere :) |
@nrmancuso , ping please |
yes
lets disable them inn xml config and create issue to reactivate them, put comment above disablment |
@@ -2,5 +2,5 @@ | |||
all excludes should be specified in build configuration --> | |||
<component name="DependencyValidationManager"> | |||
<scope name="Checkstyle Inspection Scope" | |||
pattern="!file[checkstyle]:target//*&&!file:src/test/resources*//**&&!file:src/it/resources*//**&&!file:src/site/resources/js/google-analytics.js&&!file:src/site/resources/styleguides*//**&&!file:config/intellij-idea-inspections.properties&&!file[checkstyle]:.ci-temp//*&&!file[checkstyle]:bin//*&&!file[checkstyle]:.settings//*&&!file:.classpath&&!file:.project&&!file:.circleci/config.yml&&!file:config/projects-to-test/openjdk-projects-to-test-on.config&&!file:config/projects-for-no-exception-javadoc.config&&!file:.ci/pitest-survival-check-xml.groovy"/> | |||
pattern="!file[checkstyle]:target//*&&!file:src/test/resources*//**&&!file:src/it/resources*//**&&!file:src/site/resources/js/google-analytics.js&&!file:src/site/resources/styleguides*//**&&!file:config/intellij-idea-inspections.properties&&!file[checkstyle]:.ci-temp//*&&!file[checkstyle]:bin//*&&!file[checkstyle]:.settings//*&&!file:.classpath&&!file:.project&&!file:.circleci/config.yml&&!file:config/projects-to-test/openjdk-projects-to-test-on.config&&!file:config/projects-for-no-exception-javadoc.config&&!file:.ci/pitest-survival-check-xml.groovy&&!file:target/generated-sources/antlr/com/puppycrawl/tools/checkstyle/grammar/java*//**"/> |
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.
@romani , @nrmancuso ,
Is what I did here wrong?
the multisegment wildcard that I added is theoretically supposed to match pattern path to exclude all files and
sub-dir of the pathspec.
But the violations in inspections continue to live on, meaning scope hasn't reduced..
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.
✔ ~/java/github/romani/checkstyle/target/generated-sources/antlr [master]
$ ls -1
com
JavadocLexer.tokens
JavadocParser.tokens
JavaLanguageLexer.tokens
JavaLanguageParser.tokens
we already have pattern="!file[checkstyle]:target//*
at the begining.
strange that it is not enough.
try (this is what IDEA generated when I excluded this folder)
&&*!file[checkstyle]:target/generated-sources/antlr//*
it is strange that it started to put such folder separtely:
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.
do you have the same problem on local ?
there is new IDEA release, there is somthing about inspections https://youtrack.jetbrains.com/articles/IDEA-A-2100661888/IntelliJ-IDEA-2023.3.5-233.14808.21-build-Release-Notes
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.
we already have pattern="!file[checkstyle]:target//* at the begining.
strange that it is not enough.
Yes we do. I initially thought scope wasn't being restricted at /antlr because of the single-segment wildcard (only one level ls) that we used in our path pattern syntax. I already tried changing it to multi-segment (all levels below) but it was of no use. This is why I added precise pathspec which you see in the diff.
try (this is what IDEA generated when I excluded this folder)
&&*!file[checkstyle]:target/generated-sources/antlr//*
@romani , I'm still not sure if this will reach files of level //java because the pattern is still single-segment
https://cloud.google.com/eventarc/docs/path-patterns#path_pattern_syntax
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.
do you have the same problem on local ?
IntelliJ is known to be smart sometimes.. but this seems on an other level 😅
My tree looks fine on local with this scope pattern :
Idea version is 2020.3.1 (could be because of the older release)
there is new IDEA release, there is somthing about inspections https://youtrack.jetbrains.com/articles/IDEA-A-2100661888/IntelliJ-IDEA-2023.3.5-233.14808.21-build-Release-Notes
I couldn't find anything in their issue/pull that could explain what's happening here :(
That issue fixed in their release looks internal of IDEA, something related to it's error tab showing outdated errors
(shouldn't really bother us i think)
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.
Have we tried to completely delete and regenerate (by UI) the scope file?
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.
Have we tried to completely delete and regenerate (by UI) the scope file?
Yes @nrmancuso , I have completely removed the scope file from idea scopes and tried generating path tree by adding the pattern in the textField. It was still the same as #14604 (comment) on my local.
If it isn't much trouble, I would feel more confident about this if I get a confirmation from any of you before reporting this at JetBrains :)
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.
@romani , @nrmancuso , PR created at checkstyle/contribution#846 with v2023.1.2
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.
please report issue to JetBrains.
Ideally old scope files should work (but not critical), main point is that scopes should work if they are setup by Idea UI.
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.
@romani , Issue reported to jetBrains tracker at IDEA-351113
@romani , @nrmancuso , I will close this PR as migration is successful at #14696 The branch I will archive on my fork in case we might have to reuse later on.... |
Aims to close #14448
Follow up of @nrmancuso 's checkstyle/contribution#837 (comment)
IDEA version used : v
2023.3.4
(latest release)https://www.jetbrains.com/idea/download/?section=linux
Link to docker image used for testing update :
https://hub.docker.com/repository/docker/manishkk07/manish-k-07-checkstyle/tags?page=1&ordering=last_updated
To pull image :
docker pull manishkk07/manish-k-07-checkstyle:jdk11-idea2023.3.4
Verified build on local....