GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing checkstyle.org — Checkstyle 14.4.0 – checkstyle Automate Java coding standards with CheckstyleCheckstyle analyzes Java source code against configurable rules for naming, imports, formatting, Javadoc, class design, and more. It helps teams enforce consistent coding standards automatically. See Checkstyle in ActionConfigure a rule, run Checkstyle against your Java source, and get a precise violation. 1 - Configure <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> <module name="AvoidStarImport"/> </module> </module> →
2 - Your Java code import java.util.*; class Test { List names; } →
3 - Run Checkstyle $ java -jar checkstyle-14.4.0-all.jar -c config.xml Test.java [ERROR] Test.java:1:1: Using the '.*' form of import should be avoided - java.util.*. [AvoidStarImport] Learn more about configuration and running Checkstyle. What can Checkstyle check?Naming Set conventions for types, methods, parameters, fields, and constants. Imports Control star, unused, illegal, and out-of-order imports. Javadoc Check documentation presence, structure, summaries, and tags. Formatting & Whitespace Enforce spacing, indentation, line wrapping, and other layout rules. Class Design Check visibility, extension, utility classes, and type structure. Coding Practices Check declarations, control flow, common structural, and complexity issues. Try a few more checks:
TypeName
AvoidStarImport
InvalidJavadocPosition
LeftCurly
FinalClass
MagicNumber
class myClass {}
ERROR Test.java:1:7: Type name 'myClass' must match pattern '^[A-Z][a-zA-Z0-9]*$'. [TypeName] Enforces PascalCase naming for classes, interfaces, enums, and annotations for consistency. import java.util..*; ERROR Test.java:1:1: Using the '.*' form of import should be avoided. [AvoidStarImport] Prevents star imports that can make dependencies unclear and cause naming conflicts. @SuppressWarnings("serial") /** Javadoc at wrong location */ class MyClass {} ERROR Test.java:2:1: Javadoc comment is placed in the wrong location. [InvalidJavadocPosition] Ensures Javadoc comments are placed before annotations for proper documentation generation. public void method() { // code } ERROR MyClass.java:2:1: '{' should be on the previous line. [LeftCurly] Enforces opening braces to be on the same line as the declaration for consistent formatting. class MyClass { private MyClass() {} public void method() {} } ERROR MyClass.java:1:1: Class 'MyClass' should be declared as final. [FinalClass] Ensures classes that are not designed for extension are marked as final to prevent inheritance issues. if (retries > 3) { throw new RuntimeException(); } ERROR Retry.java:1:15: '3' is a magic number. [MagicNumber] Flags unexplained numeric literals buried in logic that should be named constants. Where Checkstyle fits Checkstyle focuses on configurable, source-level checks and processes Java files one at a time — naming, imports, Javadoc, formatting, and class design. It doesn't determine expression types or build a full inheritance hierarchy, so it's commonly used alongside tools that perform whole-program analysis. Read the detailed limitations for specifics. Make Checkstyle YoursAdopt an established configuration as a practical starting point, or define exactly which rules apply to your codebase.
Start from Checkstyle's supplied configuration and coverage notes. See the Google Java Style guide
Use the supplied Sun-style configuration and review its coverage. See the Sun Code Conventions
Use the OpenJDK-style configuration for modern Java development. Follows the conventions used in the OpenJDK codebase. See the OpenJDK Style guide
Use the Doc-style configuration focused on Javadoc and documentation quality. Ensures comprehensive and consistent documentation. See the Doc Comments Style guide
Select checks, tune their properties, and set project-specific policies. See Configuration Use It In Your WorkflowOne configuration, everywhere it needs to run — your build, your terminal, and your CI pipeline.
Run checks automatically during a Maven build, or generate a standalone project report. Powered by the Maven Checkstyle Plugin
Wire Checkstyle into your Gradle verification tasks with the built-in Gradle Checkstyle plugin — no extra setup required.
Integrate Checkstyle into your ANT build process using the ANT task. Configure checks and generate reports directly from your build.
Run the all-in-one JAR straight from your terminal with a supplied or custom configuration. See the command line interface docs.
Get real-time feedback as you type in Eclipse, IntelliJ IDEA, NetBeans, and more. See the Active Tools for available plugins. Checkstyle also plugs into your CI/CD pipeline. See the Active Tools. Ready to Try CheckstyleChoose an integration above, adopt a supplied configuration or write your own, and run Checkstyle against your Java sources. Current release is 14.4.0. Get Started Configuration Browse Checks Download the latest release from the GitHub releases page or Maven Central . To build from source, check out the development code on GitHub or use jitpack.io to build artifacts directly, even from your own fork. Additional InformationPrevious Version Documentation
The current website contains the documentation for the latest release only. We only support this latest version. Development CycleRelease:
Checkstyle is following its own view of Hybrid Romantic and Semantic Versioning: This is in the form of "First.Second.Third"
First digit is representing Romantic version. When it is the only number increasing, the maintainers marked it as a noticeably large breaking compatibility or major conceptual change which occurred from their perspective. Checkstyle is not using Semantic Versioning due to the reason explained at issue #3709. JRE and JDKRuntime of Checkstyle is limited only by minimal version of JRE.
Checkstyle currently is confirmed to be buildable by all JDKs from 21 through 25. Most recent JDKs may be supported. Please report an issue if there are any problems with recent JDKs. Supported Java Language VersionCheckstyle can parse all Java language features introduced in Java 25 and below. We may support preview features depending on community demand. Please report an issue if you encounter any issues with the support of the latest Java language features. LimitationsCheckstyle is a single file static analysis tool, for more details please read the full list of limitations. Additional ChecksThere are other projects that provide additional checks:
Auto FixSome Checkstyle violations can be fixed automatically using checkstyle-openrewrite-recipes . See also OpenRewrite's guide to automatically fixing Checkstyle violations . Related ToolsCheckstyle is most useful if you integrate it into your build process or your development environment. The distribution includes:
Additionally plug-ins are written by third-parties. Some of them are still based on the Checkstyle 2.4 release, although there have been many improvements since then. The known plug-ins are: Active Tools
Inactive or Old Tools
If you have written a plugin for other IDEs, please let us know, so we can provide a link here. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |