osmith submitted this change.

View Change

Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
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(-)

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.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I2c07b30f9254b54027b721b77ab6f35249b5e2de
Gerrit-Change-Number: 41592
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>