Added checkstyle to project to keep proper code-styles.
This commit is contained in:
10
.checkstyle
Normal file
10
.checkstyle
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
|
||||||
|
<local-check-config name="Checkstyle-Configuration" location="C:\Users\Alex\Eclipse Workspace\Sensor-Fusion-Demo\Checkstyle.xml" type="external" description="Standard Checkstyle configuration with extra wide lines.">
|
||||||
|
<additional-data name="protect-config-file" value="false"/>
|
||||||
|
</local-check-config>
|
||||||
|
<fileset name="all" enabled="true" check-config-name="Checkstyle-Configuration" local="true">
|
||||||
|
<file-match-pattern match-pattern="." include-pattern="true"/>
|
||||||
|
</fileset>
|
||||||
|
</fileset-config>
|
||||||
6
.project
6
.project
@@ -25,9 +25,15 @@
|
|||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|||||||
72
Checkstyle.xml
Normal file
72
Checkstyle.xml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
This configuration file was written by the eclipse-cs plugin configuration editor
|
||||||
|
and edited by Alexander Pacha
|
||||||
|
-->
|
||||||
|
<!--
|
||||||
|
Checkstyle-Configuration: SightPlayerCheckstyle
|
||||||
|
Description: none
|
||||||
|
-->
|
||||||
|
<module name="Checker">
|
||||||
|
<property name="severity" value="warning"/>
|
||||||
|
<module name="TreeWalker">
|
||||||
|
<module name="ConstantName"/>
|
||||||
|
<module name="MethodName"/>
|
||||||
|
<module name="LocalFinalVariableName"/>
|
||||||
|
<module name="LocalVariableName"/>
|
||||||
|
<module name="MemberName"/>
|
||||||
|
<module name="ParameterName"/>
|
||||||
|
<module name="TypeName"/>
|
||||||
|
<module name="StaticVariableName"/>
|
||||||
|
<module name="PackageName"/>
|
||||||
|
<module name="RightCurly"/>
|
||||||
|
<module name="LeftCurly"/>
|
||||||
|
<module name="NeedBraces"/>
|
||||||
|
<module name="OperatorWrap"/>
|
||||||
|
<module name="ParenPad"/>
|
||||||
|
<module name="NoWhitespaceAfter">
|
||||||
|
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
|
||||||
|
</module>
|
||||||
|
<module name="NoWhitespaceBefore"/>
|
||||||
|
<module name="WhitespaceAfter"/>
|
||||||
|
<module name="WhitespaceAround"/>
|
||||||
|
<module name="JavadocMethod"/>
|
||||||
|
<module name="JavadocType"/>
|
||||||
|
<module name="JavadocVariable"/>
|
||||||
|
<module name="ModifierOrder"/>
|
||||||
|
<module name="UpperEll"/>
|
||||||
|
<module name="EqualsHashCode"/>
|
||||||
|
<module name="IllegalInstantiation">
|
||||||
|
<property name="classes" value="java.lang.Boolean"/>
|
||||||
|
</module>
|
||||||
|
<module name="EmptyBlock"/>
|
||||||
|
<module name="InnerAssignment"/>
|
||||||
|
<module name="IllegalImport"/>
|
||||||
|
<module name="VisibilityModifier">
|
||||||
|
<property name="packageAllowed" value="true"/>
|
||||||
|
<property name="protectedAllowed" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="UnusedImports"/>
|
||||||
|
<module name="SimplifyBooleanExpression"/>
|
||||||
|
<module name="SimplifyBooleanReturn"/>
|
||||||
|
<module name="AvoidStarImport"/>
|
||||||
|
<module name="TodoComment"/>
|
||||||
|
<module name="PackageHtml">
|
||||||
|
<property name="severity" value="ignore"/>
|
||||||
|
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
|
||||||
|
</module>
|
||||||
|
<module name="FinalParameters">
|
||||||
|
<property name="severity" value="ignore"/>
|
||||||
|
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
|
||||||
|
</module>
|
||||||
|
<module name="LineLength">
|
||||||
|
<property name="max" value="230"/> <!-- TODO Switch back to 130 -->
|
||||||
|
</module>
|
||||||
|
</module>
|
||||||
|
<module name="FileTabCharacter"/>
|
||||||
|
<module name="SuppressionFilter">
|
||||||
|
<property name="file" value="${project_loc}/suppressions.xml" />
|
||||||
|
</module>
|
||||||
|
</module>
|
||||||
14
suppressions.xml
Normal file
14
suppressions.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!DOCTYPE suppressions PUBLIC
|
||||||
|
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
|
||||||
|
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
|
||||||
|
|
||||||
|
<suppressions>
|
||||||
|
<!-- Don't check auto-generated files. -->
|
||||||
|
<suppress files="R.java" checks="[a-zA-Z0-9]*"/>
|
||||||
|
<suppress files="BuildConfig.java" checks="[a-zA-Z0-9]*"/>
|
||||||
|
|
||||||
|
<!-- Factory has very long lines, which can not be shortened -->
|
||||||
|
<!--<suppress files="PipelineFactory.java" checks="LineLength" />-->
|
||||||
|
</suppressions>
|
||||||
Reference in New Issue
Block a user