clang-format: Enable --Wno-error=unknown for compat with older versions

This prevents errors when encountering options which have been defined in newer
versions of clang-format, and are invalid in the YAML for the old version.

Bump minimum supported clang-format version to 12 (where `--Wno-error=unknown`
was added).

Use clang-format 12 on CI (13 is not available yet on the Ubuntu 20.04 images).
This commit is contained in:
Rémi Verschelde 2021-10-24 23:48:21 +02:00
parent f5b85cd066
commit 55d05565d0
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 5 additions and 5 deletions

View file

@ -23,7 +23,7 @@ while IFS= read -rd '' f; do
for extension in ${CLANG_FORMAT_FILE_EXTS[@]}; do
if [[ "$f" == *"$extension" ]]; then
# Run clang-format.
clang-format -i "$f"
clang-format --Wno-error=unknown -i "$f"
# Fix copyright headers, but not all files get them.
if [[ "$f" == *"inc" ]]; then
continue 2