osmith submitted this change.
lint: enable BRACES_NOT_NECESSARY check
As seen in code review here:
https://gerrit.osmocom.org/c/libosmocore/+/30934
... we do care about not using braces for single statement blocks. Let
the linter comment on it.
src/osmo_io.c:143: WARNING:BRACES_NOT_NECESSARY: braces {} are not necessary for single statement blocks
src/osmo_io.c:271: WARNING:BRACES_NOT_NECESSARY: braces {} are not necessary for single statement blocks
src/osmo_io.c:306: WARNING:BRACES_NOT_NECESSARY: braces {} are not necessary for single statement blocks
src/osmo_io_poll.c:63: WARNING:BRACES_NOT_NECESSARY: braces {} are not necessary for single statement blocks
src/osmo_io_poll.c:117: WARNING:BRACES_NOT_NECESSARY: braces {} are not necessary for single statement blocks
Change-Id: I481d1b24a909173520a544ffd567bb8357729f2a
---
M lint/checkpatch/checkpatch_osmo.sh
1 file changed, 0 insertions(+), 2 deletions(-)
diff --git a/lint/checkpatch/checkpatch_osmo.sh b/lint/checkpatch/checkpatch_osmo.sh
index bc45f85..86d2fe1 100755
--- a/lint/checkpatch/checkpatch_osmo.sh
+++ b/lint/checkpatch/checkpatch_osmo.sh
@@ -53,7 +53,6 @@
# * ASSIGN_IN_IF: not followed (e.g. 'if ((u8 = gsup_msg->cause))')
# * AVOID_EXTERNS: we do use externs
# * BLOCK_COMMENT_STYLE: we don't use a trailing */ on a separate line
-# * BRACES_NOT_NECESSARY: not followed
# * COMPLEX_MACRO: we don't use parentheses when building macros of strings across multiple lines
# * CONSTANT_COMPARISON: not followed: "Comparisons should place the constant on the right side"
# * DEEP_INDENTATION: warns about many leading tabs, not useful if changing existing code without refactoring
@@ -91,7 +90,6 @@
--ignore ASSIGN_IN_IF \
--ignore AVOID_EXTERNS \
--ignore BLOCK_COMMENT_STYLE \
- --ignore BRACES_NOT_NECESSARY \
--ignore COMPLEX_MACRO \
--ignore CONSTANT_COMPARISON \
--ignore DEEP_INDENTATION \
To view, visit change 31020. To unsubscribe, or for help writing mail filters, visit settings.