diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2005-01-14 10:24:02 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2005-01-14 10:24:02 +0000 |
commit | c61f399b1d3c471a8e459a4a2be645f95560f088 (patch) | |
tree | 14e7f5759d2cded647d22e019435a770b8ed69e5 /scripts | |
parent | 451c55a31fbc6b949f7609dd90932bb2a0d91a19 (diff) | |
download | classpath-c61f399b1d3c471a8e459a4a2be645f95560f088.tar.gz |
2005-01-14 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of September 2004 HEAD patches to generics branch.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/checkstyle-config.xml | 132 | ||||
-rw-r--r-- | scripts/checkstyle-header.regex | 38 | ||||
-rw-r--r-- | scripts/checkstyle-suppressions.xml | 25 | ||||
-rw-r--r-- | scripts/jalopy-gnu.xml | 378 |
4 files changed, 573 insertions, 0 deletions
diff --git a/scripts/checkstyle-config.xml b/scripts/checkstyle-config.xml new file mode 100644 index 000000000..0b0c1f419 --- /dev/null +++ b/scripts/checkstyle-config.xml @@ -0,0 +1,132 @@ +<?xml version="1.0"?> +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.2//EN" + "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<!-- + +Changes to this file need to be discussed on classpath@gnu.org +mailing list first and probably documented in the hacking guide. + +--> +<module name="Checker"> + <module name="PackageHtml"/> + + <module name="TreeWalker"> + <property name="tabWidth" value="8"/> + + <!-- Javadoc related checks --> + <!-- + <module name="JavadocType"> + <property name="scope" value="protected"/> + </module> + <module name="JavadocMethod"> + <property name="scope" value="protected"/> + <property name="allowUndeclaredRTE" value="true"/> + </module> + <module name="JavadocVariable"> + <property name="scope" value="protected"/> + </module> + <module name="JavadocStyle"> + <property name="checkFirstSentence" value="false"/> + <property name="checkHtml" value="true"/> + </module> + --> + + <!-- File header checks --> + <module name="RegexpHeader"> + <property name="headerFile" value="scripts/checkstyle-header.regex"/> + <property name="multiLines" value="2, 3, 38"/> + </module> + + <!-- import checks --> + <module name="AvoidStarImport"/> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + <module name="ImportOrder"> + <property name="groups" value="gnu,java,javax,org"/> + <property name="ordered" value="true"/> + <property name="separated" value="true"/> + </module> + + <!-- size checks --> + <!-- + <module name="LineLength"> + <property name="max" value="80"/> + </module> + --> + + <!-- modifier checks --> + <!-- + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + --> + + <!-- block checks --> + <!-- + <module name="EmptyBlock"> + <property name="option" value="text"/> + </module> + <module name="LeftCurly"> + <property name="option" value="nl"/> + </module> + <module name="RightCurly"> + <property name="option" value="alone"/> + </module> + <module name="AvoidNestedBlocks"/> + --> + + <!-- coding problem checks --> + <!-- + <module name="ArrayTrailingComma"/> + <module name="CovariantEquals"/> + <module name="DoubleCheckedLocking"/> + <module name="EmptyStatement"/> + <module name="EqualsHashCode"/> + <module name="HiddenField"/> + <module name="IllegalInstantiation"> + <property name="classes" value="java.lang.Boolean"/> + </module> + <module name="InnerAssignment"/> + <module name="MagicNumber"/> + <module name="RedundantThrows"/> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + <module name="NestedIfDepth"/> + <module name="NestedTryDepth"/> + <module name="SuperClone"/> + <module name="SuperFinalize"/> + <module name="IllegalCatch"/> + --> + <module name="PackageDeclaration"/> + <!-- + <module name="DeclarationOrder"/> + <module name="DefaultComesLast"/> + <module name="UnnecessaryParentheses"/> + --> + + <!-- design problem checks --> + <!-- + <module name="FinalClass"/> + <module name="HideUtilityClassConstructor"/> + --> + + <!-- miscellaneous checks --> + <!-- + <module name="TodoComment"/> + <module name="UpperEll"/> + <module name="ArrayTypeStyle"/> + <module name="Indentation"> + <property name="basicOffset" value="2"/> + <property name="braceAdjustment" value="2"/> + <property name="caseIndent" value="0"/> + </module> + --> + </module> + <!-- + <module name="StrictDuplicateCode"/> + --> + + <module name="SuppressionFilter"> + <property name="file" value="scripts/checkstyle-suppressions.xml"/> + </module> +</module> diff --git a/scripts/checkstyle-header.regex b/scripts/checkstyle-header.regex new file mode 100644 index 000000000..2a08ba371 --- /dev/null +++ b/scripts/checkstyle-header.regex @@ -0,0 +1,38 @@ +^/\* .*$ +^ .*$ +^ (Copyright \(C\) .*|Free Software Foundation, Inc.)$ +^$ +^This file is part of GNU Classpath.$ +^$ +^GNU Classpath is free software; you can redistribute it and/or modify$ +^it under the terms of the GNU General Public License as published by$ +^the Free Software Foundation; either version 2, or \(at your option\)$ +^any later version.$ +^ *$ +^GNU Classpath is distributed in the hope that it will be useful, but$ +^WITHOUT ANY WARRANTY; without even the implied warranty of$ +^MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU$ +^General Public License for more details.$ +^$ +^You should have received a copy of the GNU General Public License$ +^along with GNU Classpath; see the file COPYING. If not, write to the$ +^Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA$ +^02111-1307 USA.$ +^$ +^Linking this library statically or dynamically with other modules is$ +^making a combined work based on this library. Thus, the terms and$ +^conditions of the GNU General Public License cover the whole$ +^combination.$ +^$ +^As a special exception, the copyright holders of this library give you$ +^permission to link this library with independent modules to produce an$ +^executable, regardless of the license terms of these independent$ +^modules, and to copy and distribute the resulting executable under$ +^terms of your choice, provided that you also meet, for each linked$ +^independent module, the terms and conditions of the license of that$ +^module. An independent module is a module which is not derived from$ +^or based on this library. If you modify this library, you may extend$ +^this exception to your version of the library, but you are not$ +^obligated to do so. If you do not wish to do so, delete this$ +^exception statement from your version. \*/$ +^ *$ diff --git a/scripts/checkstyle-suppressions.xml b/scripts/checkstyle-suppressions.xml new file mode 100644 index 000000000..7a73aa810 --- /dev/null +++ b/scripts/checkstyle-suppressions.xml @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.0//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"> +<!-- + +Changes to this file need to be discussed on classpath@gnu.org +mailing list first and probably documented in the hacking guide. + +--> +<suppressions> + <suppress checks="RegexpHeader" + files="javax/rmi/CORBA/SystemException.java" + lines="1"/> + <suppress checks="RegexpHeader" + files="javax/rmi/CORBA/ObjectImpl.java" + lines="1"/> + <suppress checks="RegexpHeader" + files="javax/rmi/ORB.java" + lines="1"/> + <suppress checks="RegexpHeader" + files="javax/rmi/BAD_OPERATION.java" + lines="1"/> +</suppressions> + diff --git a/scripts/jalopy-gnu.xml b/scripts/jalopy-gnu.xml new file mode 100644 index 000000000..ad5c5abdf --- /dev/null +++ b/scripts/jalopy-gnu.xml @@ -0,0 +1,378 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jalopy> + <general> + <compliance> + <version>14</version> + </compliance> + <style> + <description>GNU Java Coding Convention</description> + <name>GNU</name> + </style> + </general> + <inspector> + <enable>false</enable> + <naming> + <classes> + <abstract>[A-Z][a-zA-Z0-9]+</abstract> + <general>[A-Z][a-zA-Z0-9]+</general> + </classes> + <fields> + <default>[a-z][\w]+</default> + <defaultStatic>[a-z][\w]+</defaultStatic> + <defaultStaticFinal>[a-zA-Z][\w]+</defaultStaticFinal> + <private>[a-z][\w]+</private> + <privateStatic>[a-z][\w]+</privateStatic> + <privateStaticFinal>[a-zA-Z][\w]+</privateStaticFinal> + <protected>[a-z][\w]+</protected> + <protectedStatic>[a-z][\w]+</protectedStatic> + <protectedStaticFinal>[a-zA-Z][\w]+</protectedStaticFinal> + <public>[a-z][\w]+</public> + <publicStatic>[a-z][\w]+</publicStatic> + <publicStaticFinal>[a-zA-Z][\w]+</publicStaticFinal> + </fields> + <interfaces>[A-Z][a-zA-Z0-9]+</interfaces> + <labels>\w+</labels> + <methods> + <default>[a-z][\w]+</default> + <defaultStatic>[a-z][\w]+</defaultStatic> + <defaultStaticFinal>[a-z][\w]+</defaultStaticFinal> + <private>[a-z][\w]+</private> + <privateStatic>[a-z][\w]+</privateStatic> + <privateStaticFinal>[a-z][\w]+</privateStaticFinal> + <protected>[a-z][\w]+</protected> + <protectedStatic>[a-z][\w]+</protectedStatic> + <protectedStaticFinal>[a-z][\w]+</protectedStaticFinal> + <public>[a-z][\w]+</public> + <publicStatic>[a-z][\w]+</publicStatic> + <publicStaticFinal>[a-z][\w]+</publicStaticFinal> + </methods> + <packages>[a-z]+(?:\.[a-z]+)*</packages> + <parameters> + <default>[a-z][\w]+</default> + <final>[a-z][\w]+</final> + </parameters> + <variables>[a-z][\w]*</variables> + </naming> + <tips> + <adhereToNamingConvention>false</adhereToNamingConvention> + <alwaysOverrideEquals>false</alwaysOverrideEquals> + <alwaysOverrideHashCode>false</alwaysOverrideHashCode> + <avoidThreadGroups>false</avoidThreadGroups> + <declareCollectionComment>false</declareCollectionComment> + <dontIgnoreExceptions>false</dontIgnoreExceptions> + <dontSubstituteObjectEquals>false</dontSubstituteObjectEquals> + <neverDeclareException>false</neverDeclareException> + <neverDeclareThrowable>false</neverDeclareThrowable> + <neverInvokeWaitOutsideLoop>false</neverInvokeWaitOutsideLoop> + <neverReturnZeroArrays>false</neverReturnZeroArrays> + <neverUseEmptyFinally>false</neverUseEmptyFinally> + <obeyContractEquals>false</obeyContractEquals> + <overrideToString>false</overrideToString> + <referToObjectsByInterface>false</referToObjectsByInterface> + <replaceStructureWithClass>false</replaceStructureWithClass> + <stringLiterallI18n>false</stringLiterallI18n> + <useInterfaceOnlyForTypes>false</useInterfaceOnlyForTypes> + <wrongCollectionComment>false</wrongCollectionComment> + </tips> + </inspector> + <internal> + <version>6</version> + </internal> + <messages> + <priority> + <general>30000</general> + <parser>30000</parser> + <parserJavadoc>30000</parserJavadoc> + <printer>30000</printer> + <printerJavadoc>30000</printerJavadoc> + <transform>30000</transform> + </priority> + <showErrorStackTrace>true</showErrorStackTrace> + </messages> + <misc> + <threadCount>1</threadCount> + </misc> + <printer> + <alignment> + <methodCallChain>true</methodCallChain> + <parameterMethodDeclaration>false</parameterMethodDeclaration> + <ternaryOperator>true</ternaryOperator> + <variableAssignment>false</variableAssignment> + <variableIdentifier>false</variableIdentifier> + </alignment> + <backup> + <directory>bak</directory> + <level>0</level> + </backup> + <blanklines> + <after> + <block>0</block> + <braceLeft>0</braceLeft> + <class>1</class> + <declaration>0</declaration> + <footer>1</footer> + <header>1</header> + <interface>1</interface> + <lastImport>1</lastImport> + <method>1</method> + <package>1</package> + </after> + <before> + <block>0</block> + <braceRight>0</braceRight> + <caseBlock>0</caseBlock> + <comment> + <javadoc>1</javadoc> + <multiline>0</multiline> + <singleline>0</singleline> + </comment> + <controlStatement>0</controlStatement> + <declaration>0</declaration> + <footer>0</footer> + <header>0</header> + <package>2</package> + </before> + <keepUpTo>1</keepUpTo> + </blanklines> + <braces> + <empty> + <cuddle>false</cuddle> + <insertStatement>false</insertStatement> + </empty> + <insert> + <dowhile>false</dowhile> + <for>false</for> + <ifelse>false</ifelse> + <while>false</while> + </insert> + <remove> + <block>true</block> + <dowhile>true</dowhile> + <for>true</for> + <ifelse>true</ifelse> + <while>true</while> + </remove> + <treatDifferent> + <methodClass>true</methodClass> + <methodClassIfWrapped>false</methodClassIfWrapped> + </treatDifferent> + </braces> + <chunks> + <blanklines>true</blanklines> + <comments>true</comments> + </chunks> + <comments> + <format> + <multiline>false</multiline> + </format> + <javadoc> + <check> + <innerclass>false</innerclass> + <tags>false</tags> + <throwsTags>false</throwsTags> + </check> + <fieldsShort>false</fieldsShort> + <generate> + <class>0</class> + <constructor>0</constructor> + <field>0</field> + <method>0</method> + </generate> + <parseComments>false</parseComments> + <tags> + <in-line /> + <standard /> + </tags> + <templates> + <method> + <bottom> */</bottom> + <exception> * @throws $exceptionType$ DOCUMENT ME!</exception> + <param> * @param $paramType$ DOCUMENT ME!</param> + <return> * @return DOCUMENT ME!</return> + <top>/**| * DOCUMENT ME!</top> + </method> + </templates> + </javadoc> + <remove> + <javadoc>false</javadoc> + <multiline>false</multiline> + <singleline>false</singleline> + </remove> + <separator> + <fillCharacter>-</fillCharacter> + <insert>false</insert> + <insertRecursive>false</insertRecursive> + <text> + <class>Inner Classes</class> + <constructor>Constructors</constructor> + <field>Instance fields</field> + <initializer>Instance initializers</initializer> + <interface>Inner Interfaces</interface> + <method>Methods</method> + <static>Static fields/initializers</static> + </text> + </separator> + </comments> + <environment /> + <footer> + <keys /> + <smartMode>0</smartMode> + <use>false</use> + </footer> + <header> + <keys /> + <smartMode>0</smartMode> + <use>false</use> + </header> + <history> + <policy>disabled</policy> + </history> + <imports> + <grouping> + <defaultDepth>1</defaultDepth> + <packages>*:0|gnu:1|java:1|javax:1|org:1</packages> + </grouping> + <policy>disabled</policy> + <sort>true</sort> + </imports> + <indentation> + <caseFromSwitch>true</caseFromSwitch> + <continuation> + <block>true</block> + <operator>true</operator> + </continuation> + <firstColumnComments>false</firstColumnComments> + <label>true</label> + <policy> + <deep>true</deep> + </policy> + <sizes> + <braceCuddled>1</braceCuddled> + <braceLeft>2</braceLeft> + <braceRight>2</braceRight> + <braceRightAfter>0</braceRightAfter> + <continuation>0</continuation> + <deep>55</deep> + <extends>-1</extends> + <general>2</general> + <implements>-1</implements> + <leading>0</leading> + <tabs>8</tabs> + <throws>2</throws> + <trailingComment>1</trailingComment> + </sizes> + <tabs> + <enable>true</enable> + <onlyLeading>true</onlyLeading> + </tabs> + </indentation> + <misc> + <arrayBracketsAfterIdent>false</arrayBracketsAfterIdent> + <forceFormatting>false</forceFormatting> + <insertExpressionParentheses>false</insertExpressionParentheses> + <insertLoggingConditional>false</insertLoggingConditional> + <insertTrailingNewline>true</insertTrailingNewline> + <insertUID>false</insertUID> + </misc> + <sorting> + <declaration> + <class>false</class> + <constructor>false</constructor> + <enable>false</enable> + <interface>false</interface> + <method>false</method> + <order>static|field|initializer|constructor|method|interface|class</order> + <variable>false</variable> + </declaration> + <modifier> + <enable>true</enable> + <order>public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp</order> + </modifier> + </sorting> + <whitespace> + <after> + <comma>true</comma> + <semicolon>true</semicolon> + <typeCast>true</typeCast> + </after> + <before> + <braces>true</braces> + <brackets>false</brackets> + <bracketsTypes>false</bracketsTypes> + <caseColon>false</caseColon> + <operator> + <not>true</not> + </operator> + <parentheses> + <methodCall>false</methodCall> + <methodDeclaration>false</methodDeclaration> + <statement>true</statement> + </parentheses> + </before> + <padding> + <braces>true</braces> + <brackets>false</brackets> + <operator> + <assignment>true</assignment> + <bitwise>true</bitwise> + <logical>true</logical> + <mathematical>true</mathematical> + <relational>true</relational> + <shift>true</shift> + </operator> + <parenthesis>false</parenthesis> + <typeCast>false</typeCast> + </padding> + </whitespace> + <wrapping> + <always> + <after> + <arrayElement>0</arrayElement> + <braceRight>true</braceRight> + <extendsTypes>false</extendsTypes> + <implementsTypes>false</implementsTypes> + <label>true</label> + <methodCallChained>false</methodCallChained> + <ternaryOperator> + <first>false</first> + <second>false</second> + </ternaryOperator> + <throwsTypes>false</throwsTypes> + </after> + <before> + <braceLeft>true</braceLeft> + <extends>false</extends> + <implements>false</implements> + <throws>false</throws> + </before> + <parameter> + <methodCall>false</methodCall> + <methodCallNested>false</methodCallNested> + <methodDeclaration>false</methodDeclaration> + </parameter> + </always> + <general> + <beforeOperator>true</beforeOperator> + <enable>true</enable> + <lineLength>79</lineLength> + </general> + <ondemand> + <after> + <assignment>false</assignment> + <leftParenthesis>false</leftParenthesis> + <parameter>false</parameter> + <types> + <extends>false</extends> + <implements>false</implements> + <throws>false</throws> + </types> + </after> + <before> + <rightParenthesis>false</rightParenthesis> + </before> + <groupingParentheses>false</groupingParentheses> + </ondemand> + </wrapping> + </printer> +</jalopy> + |