<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--

  Checkstyle configuration for CSc 301 at Cal Poly.

  A relaxed version of these standards:
      http://www.csc.calpoly.edu/%7Ejdalbey/SWE/code_std.html

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

  Finally, it is worth reading the documentation:
      http://checkstyle.sourceforge.net/

  DOCUMENT HISTORY
  1/5/2016 Relaxed even more.
  5/3/2010 Relaxed some standards for CSc 301
  9/24/09 Branched from CSc 309 and simplified for CSc 103.
  4/9/06 Added Severity = Warning to several checks.
  4/14/06 Removed check: EqualsHashCode
          Don't require Javadoc on PRIVATE methods.
          Changed LineLength to 89: The length of a line in Eclipse at 800x600 resolution.
  4/19/06 Changed VisibilityModifier to protectedAllowed.
          Allow types to have underscore characters in the name.
  5/3/06  Made method length check a warning and instead
          made JavaNCSS count an error.
  5/22/06 Added custom check for one letter variable names.
          Added custom check for logic structure comments.

-->
<module name="Checker">

    <module name="TreeWalker">
        <!-- Custom checks written for Dalbey's coding standard -->
        <!-- Single character variable names not allowed.       -->
        <module name="VariableNameLength"/>
        <!-- Logic structures must be preceded by a comment.    -->
        <module name="LogicComment"/>
        <property name="tabWidth" value="4"/>

        <!-- Checks for Naming Conventions.                  -->
        <!-- See http://checkstyle.sf.net/config_naming.html -->
        <module name="LocalFinalVariableName"/>
        <module name="LocalVariableName"/>

        <module name="MemberName"/>
        <module name="MethodName"/>
        <module name="PackageName"/>
        <module name="ParameterName"/>
        <module name="StaticVariableName"/>
        <module name="TypeName">
            <property name="format" value="^[A-Z][_a-zA-Z0-9]*$"/>
        </module>

        <!-- Checks for Size Violations.                    -->
        <!-- See http://checkstyle.sf.net/config_sizes.html -->
        <module name="LineLength">
            <property name="max" value="89"/>
        </module>
        <module name="MethodLength">
            <property name="max" value="60"/>
            <property name="countEmpty" value="false"/>
            <property name="severity" value="warning"/>
        </module>
        <module name="ParameterNumber"/>


        <!-- Checks for whitespace                               -->
        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
        <module name="Indentation">
            <property name="basicOffset" value="4"/>
            <property name="braceAdjustment" value="0"/>
            <property name="caseIndent" value="4"/>
        </module>

        <module name="EmptyBlock">
		    <property name="option" value="stmt"/>
		    <property name="tokens" value="LITERAL_CATCH"/>
		</module>
        <module name="TabCharacter"/>
        <!-- left brace must be on a new line -->
        <module name="LeftCurly">
            <property name="option" value="nl"/>
        </module>
        <module name="NeedBraces"/>
        <module name="RightCurly">
            <property name="option" value="alone"/>
        </module>


        <!-- Checks for common coding problems               -->
        <!-- See http://checkstyle.sf.net/config_coding.html -->
        <module name="AvoidInlineConditionals"/>
        <module name="EmptyStatement"/>
        <module name="HiddenField">
            <property name="ignoreConstructorParameter" value="true"/>
            <property name="ignoreSetter" value="true"/>
        </module>

	
        <module name="IllegalInstantiation"/>
        <module name="InnerAssignment">
            <property name="severity" value="warning"/>
        </module>
        <module name="SimplifyBooleanExpression"/>
        <module name="SimplifyBooleanReturn"/>

        <!-- Checks for class design                         -->
        <!-- See http://checkstyle.sf.net/config_design.html -->
        <module name="FinalClass"/>
        <module name="InterfaceIsType"/>


        <!-- Metrics checks.                   -->
        <module name="ClassFanOutComplexity"/>

        <module name="CyclomaticComplexity">
            <property name="max" value="15"/>
            <property name="severity" value="warning"/>
        </module>

        <!-- Miscellaneous other checks.                   -->
        <!-- See http://checkstyle.sf.net/config_misc.html -->
        <module name="ArrayTypeStyle"/>

        <module name="StringLiteralEquality"/>
        <module name="InnerAssignment"/>
        <module name="FallThrough"/>
        <module name="TodoComment"/>
        <module name="UpperEll"/>
        <!-- checkstyle 5.5 needed for these checks 
        <module name="GenericWhitespace"/>   
        -->
    
 </module> <!-- end TreeWalker -->
    

    <!-- checkstyle 5.5 needed for these checks
    <module name="FileTabCharacter"/>
    -->

</module>


