1
0
Fork 0
Commit graph

1 commit

Author SHA1 Message Date
Carlos Garnacho
38f8680817 build: Add script to check code style
Borrowed from Tracker, this script has different mode usages:
* --sha allows specifying a commit SHA, HEAD^ by default.
* --dry-run shows suggested changes in stdout, by default
  the local tree is changed.
* --rewrite amends the last commit, in addition to performing
  the changes.

This allows from simple style checks in the development tree,
automatically rewriting with the suggested changes (e.g. with
`git rebase --exec ./check-style -r`) and CI integration.

The script has per-function granularity, and works by re-styling
individually every commit, and inside every commit every chunk.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1924>
2021-08-22 21:26:16 +02:00