initial proposal for style checks, part of #1662

This commit is contained in:
SpaceToad 2014-05-01 19:24:43 +02:00
parent 0e6e0309dc
commit 82aacf87d1
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,73 @@
<?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: BuildCraft
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<module name="MissingOverride">
<property name="severity" value="error"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="AvoidStarImport"/>
<module name="MethodName">
<property name="severity" value="error"/>
</module>
<module name="ImportOrder">
<property name="groups" value="java,net.minecraft,cpw,net.minecraftforge,buildcraft"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
</module>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="LeftCurly"/>
<module name="ParenPad"/>
<module name="TypecastParenPad">
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="WhitespaceAfter"/>
<module name="GenericWhitespace"/>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore">
<property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
</module>
<module name="DefaultComesLast"/>
<module name="DeclarationOrder"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="FallThrough"/>
<module name="HiddenField">
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="ModifiedControlVariable"/>
<module name="MultipleStringLiterals"/>
<module name="NoClone"/>
<module name="NoFinalizer"/>
<module name="PackageDeclaration"/>
<module name="ParameterAssignment"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryParentheses"/>
<module name="OneStatementPerLine"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
</module>
<module name="Header">
<property name="severity" value="error"/>
<property name="headerFile" value="C:\cygwin64\home\ochem\BuildCraft\guidelines\header.txt"/>
</module>
<module name="NewlineAtEndOfFile"/>
</module>

8
guidelines/header.txt Executable file
View file

@ -0,0 +1,8 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/