Skip to content

Auto format code by spotless

The code format is not fully comply with Google java format AOSP variant. The project uses checkstyle to detect format misbehaves, but that's annoying, inconvenient, and waste of time for developers. This MR takes a progressive approach to help format code automatically, and aims only at changed files in each commit (detected by git). It's better to enforce the code style automatically than manually check the style

Components

  • spotless gradle plugin
  • rules for java and general rules like tailing whitespace removal
  • amendment the pre-commit script to apply the format rules automatically

What can be done in the future

  • Replace checkstyle CI job with spotless to align the format rules
Edited by proletarius101

Merge request reports

Loading