<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright © 2014 <NAME>, Inc.

  Licensed under the Apache License, Version 2.0 (the "License"); you may not
  use this file except in compliance with the License. You may obtain a copy of
  the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  License for the specific language governing permissions and limitations under
  the License.
  -->

<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!-- This is a checkstyle configuration file. For descriptions of
what the following rules do, please see the checkstyle configuration
page at http://checkstyle.sourceforge.net/config.html -->

<module name="Checker">

    <module name="UnusedImports">
        <property name="severity" value="error"/>
    </module>

    <module name="FileTabCharacter">
        <property name="severity" value="error"/>
        <!-- Checks that there are no tab characters in the file.
        -->
    </module>

    <!--

    LENGTH CHECKS FOR FILES

    -->

    <module name="FileLength">
        <property name="max" value="3000"/>
        <property name="severity" value="warning"/>
    </module>


    <module name="NewlineAtEndOfFile">
        <property name="lineSeparator" value="lf"/>
    </module>

    <module name="RegexpSingleline">
        <!-- Checks that FIXME is not used in comments.  TODO is preferred.
        -->
        <property name="format" value="((//.*)|(\*.*))FIXME"/>
        <property name="message"
                  value='TODO is preferred to FIXME.  e.g. "TODO: (ENG-123) -  Refactor when v2 is released."'/>
    </module>

    <module name="RegexpSingleline">
        <!-- Checks that TODOs are named with some basic formatting. Checks for the following pattern  TODO: (
        -->
        <property name="format" value="((//.*)|(\*.*))TODO[^: (]"/>
        <property name="message"
                  value='All TODOs should be named.  e.g. "TODO: (ENG-123) - Refactor when v2 is released."'/>
    </module>

    <module name="JavadocPackage">
        <!-- Checks that each Java package has a Javadoc file used for commenting.
          Only allows a package-info.java, not package.html. -->
        <property name="severity" value="error"/>
    </module>

    <!-- All Java AST specific tests live under TreeWalker module. -->
    <module name="TreeWalker">

        <!-- required for SupressionCommentFilter and SuppressWithNearbyCommentFilter -->
        <module name="FileContentsHolder"/>

        <!--

        IMPORT CHECKS

        -->

        <module name="AvoidStarImport">
            <property name="allowClassImports" value="false"/>
            <property name="severity" value="error"/>
        </module>

        <module name="RedundantImport">
            <!-- Checks for redundant import statements. -->
            <property name="severity" value="error"/>
        </module>

        <module name="ImportOrder">
            <!-- Checks for out of order import statements. -->
            <property name="severity" value="error"/>
            <property name="ordered" value="true"/>
            <property name="groups" value="/([^j]|.[^a]|..[^v]|...[^a])/,/^javax?\./"/>
            <!-- This ensures that static imports go to the end. -->
            <property name="option" value="bottom"/>
            <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
        </module>

        <module name="IllegalImport">
            <property name="illegalPkgs" value="junit.framework"/>
        </module>

        <!--

        METHOD LENGTH CHECKS

        -->

        <module name="MethodLength">
            <property name="tokens" value="METHOD_DEF"/>
            <property name="max" value="300"/>
            <property name="countEmpty" value="false"/>
            <property name="severity" value="warning"/>
        </module>

        <!--

        JAVADOC CHECKS
<commit_msg>Added unused imports check<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright © 2014 <NAME>, Inc.

  Licensed under the Apache License, Version 2.0 (the "License"); you may not
  use this file except in compliance with the License. You may obtain a copy of
  the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  License for the specific language governing permissions and limitations under
  the License.
  -->

<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!-- This is a checkstyle configuration file. For descriptions of
what the following rules do, please see the checkstyle configuration
page at http://checkstyle.sourceforge.net/config.html -->

<module name="Checker">

    <module name="FileTabCharacter">
        <property name="severity" value="error"/>
        <!-- Checks that there are no tab characters in the file.
        -->
    </module>

    <!--

    LENGTH CHECKS FOR FILES

    -->

    <module name="FileLength">
        <property name="max" value="3000"/>
        <property name="severity" value="warning"/>
    </module>


    <module name="NewlineAtEndOfFile">
        <property name="lineSeparator" value="lf"/>
    </module>

    <module name="RegexpSingleline">
        <!-- Checks that FIXME is not used in comments.  TODO is preferred.
        -->
        <property name="format" value="((//.*)|(\*.*))FIXME"/>
        <property name="message"
                  value='TODO is preferred to FIXME.  e.g. "TODO: (ENG-123) -  Refactor when v2 is released."'/>
    </module>

    <module name="RegexpSingleline">
        <!-- Checks that TODOs are named with some basic formatting. Checks for the following pattern  TODO: (
        -->
        <property name="format" value="((//.*)|(\*.*))TODO[^: (]"/>
        <property name="message"
                  value='All TODOs should be named.  e.g. "TODO: (ENG-123) - Refactor when v2 is released."'/>
    </module>

    <module name="JavadocPackage">
        <!-- Checks that each Java package has a Javadoc file used for commenting.
          Only allows a package-info.java, not package.html. -->
        <property name="severity" value="error"/>
    </module>

    <!-- All Java AST specific tests live under TreeWalker module. -->
    <module name="TreeWalker">

        <!-- required for SupressionCommentFilter and SuppressWithNearbyCommentFilter -->
        <module name="FileContentsHolder"/>

        <!--

        IMPORT CHECKS

        -->

        <module name="AvoidStarImport">
            <property name="allowClassImports" value="false"/>
            <property name="severity" value="error"/>
        </module>

        <module name="RedundantImport">
            <!-- Checks for redundant import statements. -->
            <property name="severity" value="error"/>
        </module>

        <module name="ImportOrder">
            <!-- Checks for out of order import statements. -->
            <property name="severity" value="error"/>
            <property name="ordered" value="true"/>
            <property name="groups" value="/([^j]|.[^a]|..[^v]|...[^a])/,/^javax?\./"/>
            <!-- This ensures that static imports go to the end. -->
            <property name="option" value="bottom"/>
            <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
        </module>

        <module name="IllegalImport">
            <property name="illegalPkgs" value="junit.framework"/>
        </module>

        <module name="UnusedImports"/>

        <!--

        METHOD LENGTH CHECKS

        -->

        <module name="MethodLength">
            <property name="tokens" value="METHOD_DEF"/>
            <property name="max" value="300"/>
            <property name="countEmpty" value="false"/>
            <property name="severity" value="warning"/>
        </module>

        <!--

        JAVADOC CHECKS

{'fraction_non_alphanumeric': 0.14307912981114032, 'fraction_numerical': 0.007171886206072197, 'mean_word_length': 2.358892011240466, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 2, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6108806', 'n_tokens_mistral': 2375, 'n_tokens_neox': 2223, 'n_words': 705}