Java Checkstyle reports formatting as a warning, not an error despite my explicit severity

This page summarizes the projects mentioned and recommended in the original post on /r/javahelp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Checkstyle

    Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.

    I'm trying to use Google's checkstyle. I want certain things to be an error, such as using Tabs for indentation. When I run mvn checkstyle:check with a file with a tab in the first column, it always gives a [WARN] rather than the error that I've asked for. Pom snippet: org.apache.maven.plugins maven-surefire-plugin ${maven-surefire-plugin.version} ${maven-surefire-plugin.skipUnitTests} org.apache.maven.plugins maven-checkstyle-plugin 3.1.2 checkstyle validate check google_checks.xml UTF-8 true true warning true I'm using google_checks.xml as from https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml. I have changed the severity for the FileTabCharacter to "error"

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts