Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Configure checkstyle for use with project

One cascading update caused by using '==' instead of 'equals' is enough.
Let's turn on some real warnings.
  • Loading branch information...
commit 46b5b66c92ff755e324cbd7349ddc3475f3bc947 1 parent 9b3a75a
@emk authored
View
10 .checkstyle
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true">
+ <local-check-config name="BugLinky style rules" location="conf/checkstyle.xml" type="project" description="">
+ <additional-data name="protect-config-file" value="false"/>
+ </local-check-config>
+ <fileset name="all" enabled="true" check-config-name="BugLinky style rules" local="true">
+ <file-match-pattern match-pattern="." include-pattern="true"/>
+ </fileset>
+</fileset-config>
View
6 .project
@@ -25,10 +25,16 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.google.appengine.eclipse.core.gaeNature</nature>
<nature>com.google.gdt.eclipse.core.webAppNature</nature>
+ <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
View
129 conf/checkstyle.xml
@@ -0,0 +1,129 @@
+<?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
+-->
+<!--
+ Checkstyle-Configuration: MediaDemo checks
+ Description: none
+-->
+<module name="Checker">
+ <property name="severity" value="warning"/>
+ <module name="TreeWalker">
+ <property name="tabWidth" value="4"/>
+ <module name="JavadocMethod">
+ <property name="scope" value="package"/>
+ <property name="allowMissingParamTags" value="true"/>
+ <property name="allowMissingThrowsTags" value="true"/>
+ <property name="allowMissingReturnTag" value="true"/>
+ <property name="logLoadErrors" value="true"/>
+ <property name="suppressLoadErrors" value="true"/>
+ </module>
+ <module name="JavadocType">
+ <property name="scope" value="package"/>
+ </module>
+ <module name="JavadocVariable">
+ <property name="scope" value="package"/>
+ </module>
+ <module name="JavadocStyle">
+ <property name="checkEmptyJavadoc" value="true"/>
+ </module>
+ <module name="ConstantName"/>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ <module name="TypeName"/>
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+ <module name="LineLength">
+ <metadata name="net.sf.eclipsecs.core.comment" value="Ignore really long @com.* identifiers in native methods."/>
+ <property name="ignorePattern" value="@"/>
+ </module>
+ <module name="MethodLength">
+ <property name="max" value="30"/>
+ </module>
+ <module name="ParameterNumber"/>
+ <module name="EmptyForIteratorPad"/>
+ <module name="MethodParamPad"/>
+ <module name="NoWhitespaceAfter">
+ <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
+ </module>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap">
+ <property name="option" value="eol"/>
+ </module>
+ <module name="ParenPad"/>
+ <module name="TypecastParenPad"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround"/>
+ <module name="ModifierOrder"/>
+ <module name="RedundantModifier"/>
+ <module name="AvoidNestedBlocks"/>
+ <module name="EmptyBlock"/>
+ <module name="LeftCurly"/>
+ <module name="NeedBraces">
+ <property name="severity" value="ignore"/>
+ </module>
+ <module name="RightCurly"/>
+ <module name="AvoidInlineConditionals"/>
+ <module name="DoubleCheckedLocking"/>
+ <module name="EmptyStatement"/>
+ <module name="EqualsHashCode"/>
+ <module name="HiddenField">
+ <property name="ignoreConstructorParameter" value="true"/>
+ <property name="ignoreSetter" value="true"/>
+ <property name="ignoreAbstractMethods" value="true"/>
+ </module>
+ <module name="IllegalInstantiation"/>
+ <module name="InnerAssignment"/>
+ <module name="MagicNumber"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="RedundantThrows">
+ <property name="logLoadErrors" value="true"/>
+ <property name="suppressLoadErrors" value="true"/>
+ </module>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ <module name="DesignForExtension">
+ <property name="severity" value="ignore"/>
+ </module>
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor">
+ <metadata name="net.sf.eclipsecs.core.comment" value="Fires incorrectly on classes where all the logic lives in the constructor and in private helpers."/>
+ <property name="severity" value="ignore"/>
+ </module>
+ <module name="InterfaceIsType"/>
+ <module name="VisibilityModifier"/>
+ <module name="ArrayTypeStyle"/>
+ <module name="TodoComment">
+ <property name="severity" value="ignore"/>
+ </module>
+ <module name="UpperEll"/>
+ </module>
+ <module name="JavadocPackage"/>
+ <module name="NewlineAtEndOfFile">
+ <property name="severity" value="ignore"/>
+ </module>
+ <module name="Translation"/>
+ <module name="FileLength">
+ <property name="max" value="500"/>
+ </module>
+ <module name="FileTabCharacter">
+ <property name="severity" value="ignore"/>
+ </module>
+ <module name="RegexpSingleline">
+ <property name="severity" value="ignore"/>
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+ <module name="SuppressionFilter">
+ <property name="file" value="${project_loc}/conf/suppressions.xml"/>
+ </module>
+</module>
View
7 conf/suppressions.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+ <!-- An example suppression. -->
+ <!-- <suppress checks="LineLength" files="Foo.java" /> -->
+</suppressions>
Please sign in to comment.
Something went wrong with that request. Please try again.