From 55d05565d038c39d4b4e008db02bd728fd7dee7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 24 Oct 2021 23:48:21 +0200 Subject: 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). --- misc/scripts/clang_format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/scripts') diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh index bcd63aa73b..b0020da597 100755 --- a/misc/scripts/clang_format.sh +++ b/misc/scripts/clang_format.sh @@ -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 -- cgit v1.2.3