-
-
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
Issue #7040: spotbugs is not executed in build process #7034
Conversation
I assume this is another JDK12 issue. |
@rnveach Does that mean that you're in favour or opposed to this change? The issues occur on all of OpenJDK 8, 11 and 12 when I run |
If we make this change, you have to remove the exclusion for spotbugs to show the change fixes it in the CI. |
Judging from the CI output of master and latest commit I pushed here spotbugs was never running for OpenJDK < 12. I suggest adding it for OpenJDK 8 and 12 which are GA and OpenJDK 11 which has only recently be deprecated. |
We do run it for openjdk 8. |
@krichter722 , please define a problem and what problem you experience. You can create issue on it or you can treat this PR as issue and reference in commit it's number "Pull #7034: ...". |
Is it resolved ? if yes, lets make CI to control it.
please explain this hack |
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.
items to improve:
@krichter722 ping |
This patch allows to run I updated the commit message to include the PR number. |
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.
Item to improve:
I can not validate this PR, because I got output of spotbugs from jdk11 and placed it to issue description, but line numbers are pointing to comments in code. |
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.
clarification is required
config/spotbugs-exclude.xml
Outdated
@@ -45,6 +45,54 @@ | |||
<Method name="main" /> | |||
<Bug pattern="DM_EXIT" /> | |||
</Match> | |||
<Match> | |||
<!-- this is a JDK design weakness that we can do nothing about --> |
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.
Why it is JDK weakness ?
it is problem of spotbugs tool that it goes too deep in bytecode, without consideration of syntax of language, it should not report issues on this such code.
We need to report issue on spotbugs and suppress until issue on their side is resolved.
comment should be till LINK_TO_ISSUE
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 experienced this problem, here is our team member post - spotbugs/spotbugs#259 (comment)
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.
comment should be till https://github.com/spotbugs/spotbugs/issues/259
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.
done.
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.
@rnveach , please finalize.
code is rebased on latest master.
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.
It seems to me
https://github.com/checkstyle/checkstyle/blob/master/.ci/appveyor.bat#L26
https://github.com/checkstyle/checkstyle/blob/master/.ci/appveyor.bat#L43
these overrides can be removed
@rnveach good finding. This doesn't seem to be fixed by spotbugs so soon since it's open since 2017. What do you think about adding the spotbugs issue URL to the comment explaining the exclusion and enabling spotbugs for OpenJDK 11 and 12? The issue that final fields can't be mock with OpenJDK 12 is addressed in #7035. |
@romani https://teamcity.jetbrains.com/viewLog.html?buildId=2558933&buildTypeId=Checkstyle_IdeaInspectionsPullRequest&tab=buildLog&_focus=3132
|
Relaunched, |
https://github.com/checkstyle/checkstyle/blob/master/.ci/appveyor.bat#L29 |
appveyor is updated, @rnveach , please review. |
#7040
Add exclusions to spotbugs-exclude.xml for Files.newInputStream which can be ignored
I don't know why this doesn't fail on CI, but it blocks usage of
mvn clean install
locally. The messages don't reveal any issues and can be ignored.