Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html.

Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).

To completely disable a check, just comment it out or delete it from the file.

Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

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

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

<property name="fileExtensions" value="java, properties, xml"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<!-- <module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
</module> -->

<!-- <module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf" />
</module> -->
<module name="FileLength"/>
<module name="FileTabCharacter"/>

<!-- Trailing spaces -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>

<module name="TreeWalker">
<module name="OuterTypeFilename"/>
Expand All @@ -43,7 +44,6 @@
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="EmptyBlock">
Expand Down Expand Up @@ -145,24 +145,31 @@
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="basicOffset" value="2"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="4"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="4"/>
<property name="caseIndent" value="2"/>
<property name="throwsIndent" value="2"/>
<property name="lineWrappingIndentation" value="2"/>
<property name="arrayInitIndent" value="2"/>
<!-- <property name="forceStrictCondition" value="true"/> -->
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="CustomImportOrder">
<module name="AvoidStarImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
<!-- <module name="CustomImportOrder">
<property name="specialImportsRegExp" value="com.google"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
</module>
</module> -->
<module name="MethodParamPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
Expand All @@ -176,32 +183,32 @@
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="SummaryJavadoc">
<!-- <module name="JavadocTagContinuationIndentation"/> -->
<!-- <module name="SummaryJavadoc">
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
<module name="JavadocParagraph"/>
<module name="JavadocParagraph"/> -->
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<!-- <module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
</module> -->
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc">
<!-- <module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>
</module> -->
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
</module>
Expand Down
1 change: 0 additions & 1 deletion libandroid/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ dependencies {
}

apply from: 'gradle-javadoc.gradle'
apply from: 'gradle-checkstyle.gradle'
apply from: 'gradle-mvn-push.gradle'

// See: https://github.com/chrisbanes/gradle-mvn-push/issues/43#issuecomment-84140513
Expand Down
16 changes: 0 additions & 16 deletions libandroid/lib/gradle-checkstyle.gradle

This file was deleted.

4 changes: 3 additions & 1 deletion libjava/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:2.1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -21,3 +21,5 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}

apply from: 'checkstyle.gradle'
16 changes: 16 additions & 0 deletions libjava/checkstyle.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apply plugin: 'checkstyle'

checkstyle.toolVersion = '7.1'

task checkstyle(type: Checkstyle) {
description 'Checks if the code adheres to coding standards'
group 'verification'

configFile = new File(rootDir, "checkstyle.xml")
source 'src'
include '**/*.java'
exclude '**/gen/**'

classpath = files()
ignoreFailures = false
}
4 changes: 2 additions & 2 deletions libjava/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Apr 12 11:41:26 EDT 2016
#Tue Aug 30 18:10:44 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
1 change: 0 additions & 1 deletion libjava/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ task JavadocGeneration(type: Javadoc) {
classpath = configurations.compile
}

apply from: 'gradle-checkstyle.gradle'
apply from: 'gradle-mvn-push.gradle'
16 changes: 0 additions & 16 deletions libjava/lib/gradle-checkstyle.gradle

This file was deleted.