Skip to content
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

Fix: Adjust checkstyle config for new version #1409

Merged
merged 2 commits into from
Jun 12, 2020
Merged

Conversation

robert3005
Copy link
Contributor

Before this PR

in #1404 we upgraded checkstyle but didn't take into account necessary config changes. Turns out we don't have tests that validate our checkstyle parses with default checkstyle version

After this PR

==COMMIT_MSG==
Fix checkstyle config to conform to breaks made between 8.13 and 8.33
==COMMIT_MSG==

Possible downsides?

N/A this should be purely a migration

@policy-bot policy-bot bot requested a review from fawind June 12, 2020 01:18
@@ -374,11 +374,11 @@
</module>
<module name="RightCurly"> <!-- Java Style Guide: Nonempty blocks: K & R style -->
<property name="option" value="same"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is very weird - this didn't use to complain with checkstyle 8.13 on codebases I tried but with 8.33 this fails. I would be tempted to just ditch this since palantir-java-format is the autoritative source. I have made this setting conform to what palantir-java-format generates.

@@ -431,11 +431,8 @@
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes here are because javadoc check got split into two, this and MissingJavadocMethod. We actually only want this one that validates javadoc if it exists but doesn't enforce existence of javadoc

@@ -47,6 +47,10 @@
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<module name="LineLength"> <!-- Java Style Guide: No line-wrapping -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was mentioned in the changes it's just hard to decipher things from their long list of changes

@ferozco
Copy link
Contributor

ferozco commented Jun 12, 2020

Tried it out locally seem to be working 👍

@bulldozer-bot bulldozer-bot bot merged commit d12519d into develop Jun 12, 2020
@bulldozer-bot bulldozer-bot bot deleted the rk/config branch June 12, 2020 01:36
@svc-autorelease
Copy link
Collaborator

Released 3.25.1

@robert3005
Copy link
Contributor Author

Will follow up with a test so this doesn't happen in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants