Disabling some repo checks for rebolectric files

Change-Id: I025db602f14f7696e7f3165357afbec0cfa8e713
This commit is contained in:
Sunny Goyal 2020-01-09 08:59:23 -08:00
parent d068f1cf66
commit cf7a48b1de
4 changed files with 29 additions and 1 deletions

View File

@ -1,2 +1,2 @@
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --config_xml tools/checkstyle.xml --sha ${PREUPLOAD_COMMIT}

20
tools/checkstyle.xml Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd" [
<!ENTITY defaultCopyrightCheck SYSTEM "../../../../prebuilts/checkstyle/default-copyright-check.xml">
<!ENTITY defaultJavadocChecks SYSTEM "../../../../prebuilts/checkstyle/default-javadoc-checks.xml">
<!ENTITY defaultTreewalkerChecks SYSTEM "../../../../prebuilts/checkstyle/default-treewalker-checks.xml">
<!ENTITY defaultModuleChecks SYSTEM "../../../../prebuilts/checkstyle/default-module-checks.xml">
]>
<module name="Checker">
&defaultModuleChecks;
&defaultCopyrightCheck;
<module name="TreeWalker">
&defaultJavadocChecks;
&defaultTreewalkerChecks;
</module>
<module name="SuppressionFilter">
<property name="file" value="tools/checkstyle_suppression.xml" />
</module>
</module>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- Robolectric uses magic method names like `__constructor__` -->
<suppress files="/robolectric_tests" checks="MethodName|JavadocType|JavadocMethod" />
</suppressions>