All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.puppycrawl.tools.checkstyle.meta.checks.metrics.ClassFanOutComplexityCheck.xml Maven / Gradle / Ivy

Go to download

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard

There is a newer version: 10.20.1
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle-metadata>
   <module>
      <check fully-qualified-name="com.puppycrawl.tools.checkstyle.checks.metrics.ClassFanOutComplexityCheck"
             name="ClassFanOutComplexity"
             parent="com.puppycrawl.tools.checkstyle.TreeWalker">
         <description>&lt;p&gt;
 Checks the number of other types a given class/record/interface/enum/annotation
 relies on. Also, the square of this has been shown to indicate the amount
 of maintenance required in functional programs (on a file basis) at least.
 &lt;/p&gt;
 &lt;p&gt;
 This check processes files in the following way:
 &lt;/p&gt;
 &lt;ol&gt;
 &lt;li&gt;
 Iterates over all tokens that might contain type reference.
 &lt;/li&gt;
 &lt;li&gt;
 If a class was imported with direct import (i.e. {@code import java.math.BigDecimal}),
 or the class was referenced with the package name (i.e. {@code java.math.BigDecimal value})
 and the package was added to the {@code excludedPackages} parameter,
 the class does not increase complexity.
 &lt;/li&gt;
 &lt;li&gt;
 If a class name was added to the {@code excludedClasses} parameter,
 the class does not increase complexity.
 &lt;/li&gt;
 &lt;/ol&gt;</description>
         <properties>
            <property default-value="^$"
                      name="excludeClassesRegexps"
                      type="java.util.regex.Pattern[]">
               <description>Specify user-configured regular
 expressions to ignore classes.</description>
            </property>
            <property default-value="ArrayIndexOutOfBoundsException, ArrayList, Boolean, Byte, Character, Class, Collection, Deprecated, Deque, Double, DoubleStream, EnumSet, Exception, Float, FunctionalInterface, HashMap, HashSet, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, IntStream, Integer, LinkedHashMap, LinkedHashSet, LinkedList, List, Long, LongStream, Map, NullPointerException, Object, Optional, OptionalDouble, OptionalInt, OptionalLong, Override, Queue, RuntimeException, SafeVarargs, SecurityException, Set, Short, SortedMap, SortedSet, Stream, String, StringBuffer, StringBuilder, SuppressWarnings, Throwable, TreeMap, TreeSet, UnsupportedOperationException, Void, boolean, byte, char, double, float, int, long, short, var, void"
                      name="excludedClasses"
                      type="java.lang.String[]">
               <description>Specify user-configured class names to ignore.</description>
            </property>
            <property default-value="" name="excludedPackages" type="java.lang.String[]">
               <description>Specify user-configured packages to ignore.</description>
            </property>
            <property default-value="20" name="max" type="int">
               <description>Specify the maximum threshold allowed.</description>
            </property>
         </properties>
         <message-keys>
            <message-key key="classFanOutComplexity"/>
         </message-keys>
      </check>
   </module>
</checkstyle-metadata>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy