osmith has uploaded this change for review.
lint: run clang-format only on specific projects
For most C projects, running checkpatch works best with the coding style
we use. Run clang-format only in specific projects that seem to be fully
formatted with that tool.
Related: https://gerrit.osmocom.org/c/osmo-mgw/+/41529
Related: https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/39470
Related: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/39471
Change-Id: I2c07b30f9254b54027b721b77ab6f35249b5e2de
---
M lint/lint_diff.sh
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/92/41592/1
diff --git a/lint/lint_diff.sh b/lint/lint_diff.sh
index d76d951..e37de17 100755
--- a/lint/lint_diff.sh
+++ b/lint/lint_diff.sh
@@ -61,10 +61,28 @@
}
test_clang_format() {
+ local check_projects="
+ osmo-asf4-dfu
+ osmo-ccid-firmware
+ "
+ local skip=true
+ local i
+
if ! [ -e ".clang-format" ] || ! command -v clang-format >/dev/null; then
return
fi
+ for i in $check_projects; do
+ if [ "$i" = "$PROJECT" ]; then
+ skip=false
+ break
+ fi
+ done
+
+ if $skip; then
+ return
+ fi
+
echo "Running clang-format on 'git diff $COMMIT'..."
echo
To view, visit change 41592. To unsubscribe, or for help writing mail filters, visit settings.