Skip to content

Commit

Permalink
Update google_checks.xml for DPE modifications (#115)
Browse files Browse the repository at this point in the history
* allow newlines in imports

* Add back some sections of google_checks

* Add Averi
* Remove CustomImportOrder suppresssion
* Fix AppTest import order
* Updates google_checks to have RegexpHeader, severity, SupressWarningsHolder, and SupressCommentFilter
* Fix the METADATA
  • Loading branch information
lesv committed Mar 24, 2020
1 parent ffce31a commit b95bd05
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
6 changes: 6 additions & 0 deletions checkstyle-config/pom.xml
Expand Up @@ -45,6 +45,12 @@ limitations under the License.
<organization>Google Inc.</organization>
<organizationUrl>https://cloud.google.com</organizationUrl>
</developer>
<developer>
<name>Averi Kitsch‎</name>
<email>akitsch@google.com</email>
<organization>Google Inc.</organization>
<organizationUrl>https://cloud.google.com</organizationUrl>
</developer>
<developer>
<name>Dane Zeke Liergaard</name>
<email>dzlier@google.com</email>
Expand Down
9 changes: 8 additions & 1 deletion pom.xml
Expand Up @@ -49,6 +49,12 @@ limitations under the License.
<organization>Google Inc.</organization>
<organizationUrl>https://cloud.google.com</organizationUrl>
</developer>
<developer>
<name>Averi Kitsch‎</name>
<email>akitsch@google.com</email>
<organization>Google Inc.</organization>
<organizationUrl>https://cloud.google.com</organizationUrl>
</developer>
<developer>
<name>Dane Zeke Liergaard</name>
<email>dzlier@google.com</email>
Expand Down Expand Up @@ -209,8 +215,9 @@ limitations under the License.
<version>3.1.1</version>
<configuration>
<configLocation>google-checks.xml</configLocation>
<headerLocation>LICENSE.txt</headerLocation>
<suppressionsLocation>suppressions.xml</suppressionsLocation>
<headerLocation>LICENSE.txt</headerLocation>

<includeTestSourceDirectory>true</includeTestSourceDirectory>
<consoleOutput>true</consoleOutput>
<logViolationsToConsole>true</logViolationsToConsole>
Expand Down
6 changes: 3 additions & 3 deletions third_party/checkstyle/METADATA
Expand Up @@ -13,7 +13,7 @@ third_party {
type: GIT
value: "https://github.com/checkstyle/checkstyle"
}
version: "8.0.1"
last_upgrade_date { year: 2019 month: 4 day: 15 }
local_modifications: "RegexpHeader, SuppressWarningsFilter, and SuppressionCommentFilter"
version: "8.30"
last_upgrade_date { year: 2020 month: 3 day: 5 }
local_modifications: "RegexpHeader, severity, SupressWaringsHolder, and SuppressionCommentFilter"
}
17 changes: 16 additions & 1 deletion third_party/checkstyle/google_checks.xml
Expand Up @@ -14,9 +14,15 @@
-->

<module name = "Checker">
<!-- Checks for License -->
<module name="RegexpHeader"><!-- lesv: added from old -->
<property name="headerFile" value="${checkstyle.header.file}"/>
<property name="multiLines" value="1,2,16,17"/>
</module>

<property name="charset" value="UTF-8"/>

<property name="severity" value="error"/>
<property name="severity" value="error"/><!-- lesv: was warning -->

<property name="fileExtensions" value="java, properties, xml"/>
<!-- Excludes all 'module-info.java' files -->
Expand Down Expand Up @@ -44,6 +50,15 @@
</module>

<module name="TreeWalker">
<!-- Allow silencing rules with annotations http://stackoverflow.com/a/22556386/101923 -->
<module name="SuppressWarningsHolder"/><!-- lesv -->
<!-- Allow silencing with comment http://stackoverflow.com/questions/4023185 -->
<module name="SuppressionCommentFilter"><!-- lesv -->
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
Expand Down

0 comments on commit b95bd05

Please sign in to comment.