Skip to content

medvedev/checkstyle-google-formatter-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project demonstrates a case when checkstyle with "google_checks.xml" fails to validate code formatted with latest google-java-formatter

!!! Java 8 is required by latest google java formatter.

To observe the issue, please checkout code and run:
./gradlew googleJavaFormat checkstyleMain

Output errors (full paths replaced with "..."):

[ant:checkstyle] [WARN] .../Test.java:10: 'params' has incorrect indentation level 2, expected level should be 4. [Indentation]
[ant:checkstyle] [WARN] .../Test.java:12: '}' has incorrect indentation level 2, expected level should be 4. [Indentation]

Related google java formetter issue:
google/google-java-format#159

Source of truth, requiring "4 spaces or more" for indentation of wrapped line:
https://google.github.io/styleguide/javaguide.html#s4.5.2-line-wrapping-indent

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages