alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (checkstyle-langtools.xml)

This example Java source code file (checkstyle-langtools.xml) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

avoidstarimport, checks, configuration, crawl\/\/dtd, emptyforinitializerpad, genericwhitespace, illegalimport, importorder, miscellaneous, public, puppy, redundantimport, unusedimports, whitespaceafter

The checkstyle-langtools.xml Java example source code

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

<!--
   Checks for initial langtools code conventions, we are starting with
   imports and import orders and this will grow to encompass other
   violations over time. 
-->

<module name="Checker">
    
    <!-- Checks for whitespace. -->
    <module name="FileTabCharacter">
        <property name="fileExtensions" value=".java"/>
    </module>

    <!-- Miscellaneous other checks.                   -->
    <module name="RegexpSingleline">
        <property name="format" value="\s+$"/>
        <property name="minimum" value="0"/>
        <property name="maximum" value="0"/>
        <property name="message" value="Line has trailing spaces."/>
        <property name="fileExtensions" value=".java .html"/>
    </module>

    <module name="TreeWalker">
    <!-- Checks for imports                              -->
    <!--
        <module name="AvoidStarImport"/>
        <module name="IllegalImport"/>
    -->
        <module name="GenericWhitespace"/>
        <module name="RedundantImport"/>
        <module name="UnusedImports"/>  
        <module name="ImportOrder">
            <property name="groups" value="java, javax, org, com"/>
            <property name="ordered" value="true"/>
            <property name="separated" value="true"/>
        </module>        
        <module name="EmptyForInitializerPad">
            <property name="option" value="space"/>
        </module>
        <module name="WhitespaceAfter"/>
    </module>
</module>

Other Java examples (source code examples)

Here is a short list of links related to this Java checkstyle-langtools.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.