1
0
Fork 0
Commit graph

2 commits

Author SHA1 Message Date
Patryk Obara
68a1291bc6 Update clang-format rules to 9.0
Set AllowAllConstructorInitializersOnNextLine to false. This prevents
formatting problem when initializer list is long enough to be wrapped
once, but all initializers fitted into the next line.

Turn on AlignConsecutiveMacros option.
2020-04-02 03:30:17 +02:00
Patryk Obara
0759165f45 Implement script for re-formatting recent commits
This script is intended to be used in two situations:

- When user can't configure clang-format in code editor or IDE
- Potentially to be used in CI in the future

Normal usecase is to run this script after commit, then review and
add formatted code, and amend the commit, e.g.:

  git commit -m "Edit some C++ code"
  ./scripts/format-commit.sh
  git add -p  # select formatting changes you want to use
  git commit --amend

Run:

  ./scripts/format-commit.sh --help

to learn about other options.
2020-04-01 07:38:05 +02:00