diff options
author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2023-02-09 12:45:37 +0200 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2023-02-09 15:44:41 +0000 |
commit | f59d449ecfc078765dfaa2e150a21a7e4b330932 (patch) | |
tree | 3b0bef74b68c8059b65b92f59a16f92bfc7527f1 /solenv | |
parent | 665964c2d36791df4a6586f54167bbd1563cb4e0 (diff) |
check-last-commit: more detailed advice on using clang-format
Change-Id: I7e25acd02573c3e173eccefe9326dc42e2940f05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146688
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/clang-format/check-last-commit | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/solenv/clang-format/check-last-commit b/solenv/clang-format/check-last-commit index 0de5ac4b0783..bd26258c5ad4 100755 --- a/solenv/clang-format/check-last-commit +++ b/solenv/clang-format/check-last-commit @@ -65,7 +65,11 @@ sub check_style() { print("\nERROR: The above differences were found between the code to commit \n"); print("and the clang-format rules. Tips:\n"); - print("\n- You may run '/opt/lo/bin/clang-format -i <problematic file>' to fix up style automatically.\n"); + print("\n- On your local machine you may check how clang-format would modify the problematic file by saying\n"); + print(" diff --unified <problematic file> <(/opt/lo/bin/clang-format <problematic file>)\n"); + print("- NOTE: you should only correct the lines that you changed. Do not add unrelated formatting to your patch.\n"); + print("- If the suggested corrections only apply to the lines you changed, you may run\n"); + print(" '/opt/lo/bin/clang-format -i <problematic file>' to fix up style automatically.\n"); print("- See solenv/clang-format/README on where to get the required version of clang-format binaries.\n"); print("- If you renamed an excluded file, update solenv/clang-format/excludelist accordingly to keep it excluded.\n"); print("\nsolenv/clang-format/check-last-commit: KO\n"); |