TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Java

Checkstyle Tool Features

Overview

In this tutorial, we will learn about Checkstyle tool features. Checkstyle enforces a set of coding standard rules on the Java source code. We can enforce the checks with a configurable configuration file.

Introduction to the tool:

https://www.testingdocs.com/checkstyle-source-code-analyzer-tool/

Checkstyle Tool Features

Some of the tool features are as follows:

Easy to use

The tool can be installed in IDE as plugin, integrate into build management tool like Maven.

IDE Support

We can install the tool on major IDEs like Eclipse, IntelliJ IDEA, etc.

CheckStyle IntelliJ IDEA Plugin.

CheckStyle IDEA Plugin

Naming conventions

The tool enforces specified naming conventions. For example, names of packages, classes, interfaces, constants, static variables, instance variables, local variables, method names, etc.

Missing Javadoc

Enforces missing Javadoc comments. The tool reports classes, interfaces, etc that violates with missing Javadoc comments.

Reports Javadoc comments that are missing summaries, etc.

Checkstyle Missing JavaDoc Comment

 

Example fix for the missing Javadoc comment Checkstyle violation for the Java class.

 

Fixing Missing Javadoc Comment

Size Violations

We can configure the tool to report different types of size violations. For example, we can set the line width to 100 characters, class lines of code to 3000 LOC, etc.

Indentation Checks

We can configure the tool to checks for proper indented source code blocks. Indentation improves readability of source code.

Imports Order

The tool checks for lexicographic order for the import statements.

Checkstyle Import Order

 

—

Java Tutorials

Java Tutorials on this website:

https://www.testingdocs.com/java-tutorial/

For more information on Java, visit the official website :

https://www.oracle.com/in/java/

Related Posts

Download Greenfoot Windows

Java /

Download & Install Greenfoot on Windows

Java /

Java Static Code Analysis

Java /

Java Testing Tools

Java /

Handle Multiple Exceptions in Java

Exceptions_In_Java

Java /

Exceptions in Java Programs

‹ JConsole User Interface Overview› JVM Process Status Tool

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle
  • Draw Parallel Lines using Flowgorithm Graphics

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version