Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 882 Bytes

File metadata and controls

29 lines (20 loc) · 882 Bytes
alwaysApply true

Code Formatting

Use the Project's Tools

  • Use whatever formatter and linter the project already has configured
  • Don't introduce a new formatter without team consensus
  • Don't bikeshed style — let the tooling decide

CI Integration

  • Run format/lint checks before tests in CI — catch style issues early and cheaply
  • Format checks should be a separate CI step that runs fast

Separation of Concerns

  • Never mix formatting changes with functional changes in the same commit
  • If code needs reformatting, do it in a dedicated commit before or after the functional change
  • This keeps diffs reviewable and bisectable

Basics

  • Remove trailing whitespace
  • End files with a single newline
  • Use consistent indentation (whatever the project standard is)
  • These should be enforced by editor config or pre-commit hooks, not manual effort