aboutsummaryrefslogtreecommitdiffstats
path: root/lint/checkpatch
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-11-09 08:42:09 +0100
committerOliver Smith <osmith@sysmocom.de>2021-11-09 11:48:01 +0100
commitec43684471ca800f395c2ba85ac8adb36af2dc19 (patch)
treeabb4e37804aadd3f1149bdc4231c86a0d53106f9 /lint/checkpatch
parent761df2c7e6bdfe80aa248cfeaa7ee3861ffb55bb (diff)
lint: checkpatch_osmo: ignore TRAILING_STATEMENTS
In Osmocom code, we have the following written in one line: while (osmo_select_main_ctx(1) > 0); This currently causes the following linter error: ERROR:TRAILING_STATEMENTS: trailing statements should be on next line According to the linter, we should write it as follows: while (osmo_select_main_ctx(1) > 0) ; But this is not followed in Osmocom code, so let's ignore the check. Related: OS#5087 Change-Id: Iaffe979b771c97c77edaf4aa0d232cb8939d1279
Diffstat (limited to 'lint/checkpatch')
-rwxr-xr-xlint/checkpatch/checkpatch_osmo.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/lint/checkpatch/checkpatch_osmo.sh b/lint/checkpatch/checkpatch_osmo.sh
index f9cc74f..ec9384c 100755
--- a/lint/checkpatch/checkpatch_osmo.sh
+++ b/lint/checkpatch/checkpatch_osmo.sh
@@ -69,6 +69,7 @@ exclude_paths_project() {
# * SPDX_LICENSE_TAG: we don't place it on line 1
# * SPLIT_STRING: we do split long messages over multiple lines
# * STRING_FRAGMENTS: sometimes used intentionally to improve readability
+# * TRAILING_STATEMENTS: not followed, e.g. 'while (osmo_select_main_ctx(1) > 0);' is put in one line
# * UNNECESSARY_INT: not followed (see https://gerrit.osmocom.org/c/libosmocore/+/25345)
# * UNSPECIFIED_INT: not followed (doesn't seem useful for us)
@@ -103,6 +104,7 @@ $SCRIPT_DIR/checkpatch.pl \
--ignore SPDX_LICENSE_TAG \
--ignore SPLIT_STRING \
--ignore STRING_FRAGMENTS \
+ --ignore TRAILING_STATEMENTS \
--ignore UNNECESSARY_INT \
--ignore UNSPECIFIED_INT \
--max-line-length 120 \