Skip to content

Commit d73440e

Browse files
authored
Update Checkstyle version in CodeClimate (#151)
1 parent efc4598 commit d73440e

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

.checkstyle.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
55
<!--
66
In order to be compatible with CodeClimate, we have to stay in sync with the version of Checkstyle that they are using.
7-
This is currently: 8.39. Check the links below to get up-to-date version information.
7+
It doesn't seem to be updated much by default, but we can specify a channel, which is currently using 10.7.0.
8+
Check the links below to get up-to-date version information.
9+
https://github.com/codeclimate/codeclimate-checkstyle/branches/all (channel/ branches)
810
https://docs.codeclimate.com/docs/checkstyle
911
https://github.com/codeclimate/codeclimate-checkstyle/blob/master/bin/install-checkstyle.sh
1012
-->
1113

1214
<module name="Checker">
1315
<property name="charset" value="UTF-8" />
1416
<property name="severity" value="warning" />
15-
<property name="fileExtensions" value="java, properties, xml" />
17+
<property name="fileExtensions" value="java" />
1618

1719
<module name="SuppressWarningsFilter" />
1820

@@ -113,7 +115,7 @@
113115
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
114116
<module name="UnnecessarySemicolonInEnumeration" />
115117
<module name="UnnecessarySemicolonInTryWithResources" />
116-
<!-- Checkstyle 9.3: <module name="UnusedLocalVariable" /> -->
118+
<module name="UnusedLocalVariable" />
117119
<module name="VariableDeclarationUsageDistance" />
118120

119121
<!-- Headers -->
@@ -132,7 +134,7 @@
132134
<module name="JavadocBlockTagLocation" />
133135
<module name="JavadocContentLocation" />
134136
<module name="JavadocMethod">
135-
<property name="scope" value="package" />
137+
<property name="accessModifiers" value="package" />
136138
<property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF" />
137139
</module>
138140
<module name="JavadocMissingLeadingAsterisk" />
@@ -232,7 +234,7 @@
232234
<!-- Override to exclude ELLIPSIS and to add METHOD_REF -->
233235
<property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, LABELED_STAT, METHOD_REF" />
234236
</module>
235-
<!-- Checkstyle 8.45: <module name="NoWhitespaceBeforeCaseDefaultColon" /> -->
237+
<module name="NoWhitespaceBeforeCaseDefaultColon" />
236238
<module name="OperatorWrap" />
237239
<module name="ParenPad" />
238240
<module name="SeparatorWrap">

.codeclimate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ version: '2' # required to adjust maintainability checks
33
plugins:
44
checkstyle:
55
enabled: true
6+
channel: 'checkstyle-10-7-0'
67
config:
78
file: '.checkstyle.xml'
89
sonar-java:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
.idea/
1+
.idea/*
22
!.idea/vcs.xml
3+
!.idea/checkstyle-idea.xml
34
*.iml
45
*.class
56
target/

.idea/checkstyle-idea.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)