Remove style checks and upgrade Robolectric

Bug: 112048937
Test: ./gradlew test
Change-Id: I4aa4bda4d5b422c49bada65f9e27bffc931bac15
This commit is contained in:
Setup Wizard Team 2018-08-24 14:16:17 -07:00 committed by Maurice Lam
parent a53b3983bf
commit f48bfd7ec2
4 changed files with 2 additions and 39 deletions

View File

@ -1,7 +1,4 @@
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py
--sha ${PREUPLOAD_COMMIT}
--config_xml tools/checkstyle/checkstyle.xml
[Builtin Hooks]
commit_msg_test_field = true

View File

@ -51,8 +51,8 @@ android.sourceSets {
java.srcDirs = ['test/robotest/src']
dependencies {
testImplementation 'org.robolectric:robolectric:3.6.1'
testImplementation 'org.robolectric:shadows-framework:3.6.1'
testImplementation 'org.robolectric:robolectric:4.0-alpha-3'
testImplementation 'org.robolectric:shadows-framework:4.0-alpha-3'
testImplementation 'junit:junit:4.+'
testImplementation 'com.google.truth:truth:0.31'
testImplementation 'org.mockito:mockito-core:1.9.5'

View File

@ -1,20 +0,0 @@
<?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/checkstyle_suppression.xml" />
</module>
</module>

View File

@ -1,14 +0,0 @@
<?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>
<!-- Note: Checkstyle puts the absolute path of files through the suppress filter, so the
patterns below will match sub-directories. Notably, for overlays where the path is
something like overlay/frameworks/opt/setupwizard will match the regex filter
"frameworks/opt/setupwizard". This is probably OK for most cases since they are overlay
of the original app and should have the same coding style. -->
<!-- Robolectric uses magic method names like `__constructor__` -->
<suppress files="/robotest/" checks="MethodName" />
</suppressions>