eBPF-based security platform
ci: raise the style check's line limit to its default
Daniel Borkmann25431cb877b7
diff --git a/.github/scripts/check-style.sh b/.github/scripts/check-style.shindex 95f8d00e..382aa984 100755--- a/.github/scripts/check-style.sh+++ b/.github/scripts/check-style.sh@@ -216,18 +216,17 @@ annotate() {fi}-# Check one patch stream, at the 80 columns of Documentation/coding-style.rst-# rather than checkpatch's 100. The // SPDX tag of a .c file becomes the-# /* */ form first, so the C99 check, which cannot tell the two uses of-# // apart, sees only real comments. checkpatch seeds a CamelCase cache-# from the include/ under its root and writes it where it runs, strict-# mode or not: it runs in the work directory, over an empty include/.+# Check one patch stream. The // SPDX tag of a .c file becomes the /* */+# form first, so the C99 check, which cannot tell the two uses of //+# apart, sees only real comments. checkpatch seeds a CamelCase cache from+# the include/ under its root and writes it where it runs, strict mode or+# not: it runs in the work directory, over an empty include/.check_patch() {sed -E 's|^([-+ ])// (SPDX-License-Identifier: .*)$|\1/* \2 */|' "$1" >"$work/patch"shiftrc=0(cd "$work" && perl "$checkpatch" --no-tree --root="$work" --strict \- --quiet --show-types --max-line-length=80 --ignore "$IGNORE" \+ --quiet --show-types --ignore "$IGNORE" \"$@" "$work/patch") >"$work/out" 2>&1 || rc=1check_block_comments "$work/patch" >>"$work/out" || rc=1annotate <"$work/out"diff --git a/AGENTS.md b/AGENTS.mdindex 3ac1c9e7..ee738e20 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -82,7 +82,8 @@ before the LSM hooks and `attr.keyring_id` is a key serial, not a name.Apply this whenever you add or touch a declaration block.- **Linux kernel coding style** (`Documentation/coding-style.rst` —the kernel's own coding-style.rst, copied into this tree). Tabs- (8-wide), 80-col soft limit, K&R braces, no spaces inside parens.+ (8-wide), 80-col soft limit and 100-col hard limit (checkpatch),+ K&R braces, no spaces inside parens.Apply to userspace too — eases review. **Comments are scarce andfollow §8**: WHAT/WHY at the function head, not HOW inside thebody; file headers are SPDX + Copyright + at most one line ofdiff --git a/Documentation/contributing.rst b/Documentation/contributing.rstindex 5b51607b..c15639bf 100644--- a/Documentation/contributing.rst+++ b/Documentation/contributing.rst@@ -215,7 +215,7 @@ Before sendingruns both.* Run ``.github/scripts/check-style.sh origin/main..HEAD`` on thecommits: it runs the kernel's ``checkpatch.pl`` in strict mode over- the C each commit touches, at the 80 columns of the coding style, and+ the C each commit touches, at its default limit of 100 columns, andover its message, with the checks that have no meaning in userspaceswitched off, each listed in the script with its reason, and itrejects a block comment whose text starts on the ``/*`` line, thediff --git a/testing/t0043-check-style.sh b/testing/t0043-check-style.shindex 12748cfa..4c599c2c 100644--- a/testing/t0043-check-style.sh+++ b/testing/t0043-check-style.sh@@ -3,7 +3,7 @@# Copyright (c) 2026 Authors of shirudo## t0043 -- .github/scripts/check-style.sh: the kernel style checkpatch.pl-# enforces on the C a commit touches at 80 columns, the block-comment+# enforces on the C a commit touches at 100 columns, the block-comment# opener and the subject length the wrapper adds, the message of a commit# that touches no C, the sources it leaves alone, the userspace spellings# it lets through and the list of what stays enabled, on a throwaway@@ -87,20 +87,31 @@ Why the change is made." &&grep -q "FILE: netdev.c:3:" "$W/out"'-test_expect_success 'a line beyond 80 columns is reported' '+test_expect_success 'a line of 100 columns passes' '+ put edge.c "// SPDX-License-Identifier: BSD-2-Clause" "" \+ "int edge(void)" "{" \+ " return 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 123456;" "}" &&+ commit "a: add edge++Why the change is made." &&+ check &&+ ! grep -q "LONG_LINE" "$W/out"+'++test_expect_success 'a line beyond 100 columns is reported' 'put wide.c "// SPDX-License-Identifier: BSD-2-Clause" "" \"int wide(void)" "{" \- " return 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 123456789;" "}" &&+ " return 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1234567890 + 1;" "}" &&commit "a: add wideWhy the change is made." &&! check &&- grep -q "^WARNING:LONG_LINE: line length of 9[0-9] exceeds 80 columns" "$W/out"+ grep -q "^WARNING:LONG_LINE: line length of 108 exceeds 100 columns" "$W/out"'-test_expect_success 'a string literal running past 80 columns is not reported' '+test_expect_success 'a string literal running past 100 columns is not reported' 'put names.h "/* SPDX-License-Identifier: BSD-2-Clause */" "" \- "#define NAMES_LONG_PIN_PATH NAMES_DIR \"/a_pin_name_that_runs_past_the_limit_link\"" &&+ "#define NAMES_LONG_PIN_PATH NAMES_DIR \"/a_pin_name_that_runs_well_past_the_limit_of_the_style_check_link\"" &&commit "a: add a long nameWhy the change is made." &&