Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New clang-format-diff returns a non-zero status code when diffs exist leading apply-format to fail #33

Open
ynyyn opened this issue Apr 10, 2024 · 0 comments

Comments

@ynyyn
Copy link

ynyyn commented Apr 10, 2024

Starting from llvm/llvm-project#70883 (around LLVM version 18.1.0), the clang-format-diff script now will exit with a non-zero status code if it detects there has formatting changes.

And this change from LLVM clang-format will break the assuming in apply-format script, here at L329,

"${git_args[@]}" "$@" \
| "${format_diff_args[@]}" \
-p1 \
-style="$style" \
-iregex="$exclusions_regex"'.*\.(c|cpp|cxx|cc|h|hpp|m|mm|js|java)' \
> "$patch_dest" \
|| exit 1

which stops apply-format to apply the diff as format fix to the local or git-staged files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant