Skip to content

style: fix all checkstyle violations and enable CI enforcement#95

Merged
wangzichichi merged 1 commit intodevelopfrom
style/enforce-checkstyle-google-java-format
Apr 9, 2026
Merged

style: fix all checkstyle violations and enable CI enforcement#95
wangzichichi merged 1 commit intodevelopfrom
style/enforce-checkstyle-google-java-format

Conversation

@wangzichichi
Copy link
Copy Markdown
Collaborator

Summary

  • Fix all 18,978 checkstyle violations across 692 files using google-java-format and targeted manual fixes
  • Enable checkstyle enforcement on test sources (previously exclude 'test/**' caused NO-SOURCE)
  • Add develop branch to CI workflow triggers so checkstyle runs on PR merge

What changed

Category Count Fix method
Indentation 11,773 google-java-format
LineLength (>100) 2,781 google-java-format + manual string splitting
CommentsIndentation 1,520 google-java-format
CustomImportOrder 851 google-java-format
WhitespaceAround 619 google-java-format
AvoidStarImport 63 Expanded to explicit imports
EmptyLineSeparator 264 Added missing blank lines
Other (FallThrough, EmptyCatchBlock, etc.) ~1,100 Manual fixes

Config changes

  • testcase/build.gradle: removed exclude 'test/**' from lint task so it actually checks test sources
  • .github/workflows/ci.yml: added develop to push/PR branch triggers

Test plan

  • ./gradlew clean build passes (compile + checkstyle + lint)
  • java -jar checkstyle-8.7-all.jar reports 0 violations
  • Verify existing tests still pass in CI environment (JDK 8)
  • Confirm checkstyle job blocks PRs with new violations

- Apply google-java-format to all 700 Java files for consistent Google Java Style
- Expand star imports to explicit imports across 44 files
- Fix overloaded method ordering, empty catch blocks, array type style
- Fix broken string literals in long hex/ABI constants
- Add missing Assume import for fuzz test files
- Enable checkstyle on test sources by removing exclude 'test/**' in lint task
- Add develop branch to CI workflow triggers
@wangzichichi wangzichichi merged commit 5edbe25 into develop Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant