Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Static code analyzer improvement #145
Static code analyzer improvement #145
Changes from 2 commits
c6d6090
eef3bc6
ca8c5f3
2162b97
0a9dded
19e9cb9
e532cb7
decb2e8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'd also add:
DefaultComesLast
,DoubleCheckedLocking
,ExplicitInitialization
,FinalClass
,FinalStatic
,HideUtilityClassConstructor
,IllegalCatch
,IllegalInstantiation
(for some of our classes that defineof
factory methods maybe?),InterfaceIsType
,JUnitTestCase
,MissingCtor
,ModifiedControlVariable
,MutableException
,NestedTryDepth
,RedundantThrows
,StringLiteralEquality
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.
DoubleCheckedLocking
was removed in 5.6 - I provided wrong link in top comment and source code (to old version) - corrected: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.
ExplicitInitialization
- I'm not sure if we want to use this - sometime it's useful to explicite initialize some fields to emphasize something. @mkondratek, @PawelLipski WDYT?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.
FinalStatic
- as withDoubleCheckedLocking
there is not that check in current versionThere 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.
@
ExplicitInitialization
Oh ok, I thought it requires us to use= null
everywhere, not forbids ;D so skip it thenThere 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.
JUnitTestCase
- also removed in6.2
: https://checkstyle.sourceforge.io/releasenotes.html#Release_6.2There 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.
MissingCtor
- we must take in consideration that checkstyle unfortunately doesn't very well cooperate with lombok - if at all - for example it doesn't see c'tors generated by lombok so this check blame all classes marked with@Data
annotation.It's seems like checkstyle doesn't check code after delombok phase but only the original one.
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.
RedundantThrows
- also unavailable in this versionThere 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.
@
MissingCtor
- oh ok that's unlike e.g. Checker Framework... anyway, ofc let's leave this one out as well, that's not critical in any wayThere 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.
StringLiteralEquality
- is already added to checks :)