Skip to content

Commit be0aef1

Browse files
committed
docs: Use skiplist when checking sysctl admin-guide
Use a skiplist to "skip" the titles in the guide documentation (Documentation/admin-guide/sysctl/*) that are not sysctls. This will give a more accurate account of what sysctl are miss-documented. Signed-off-by: Joel Granados <[email protected]>
1 parent 89b491b commit be0aef1

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

scripts/check-sysctl-docs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ BEGIN {
1717
print "Please specify the table to look for using the table variable" > "/dev/stderr"
1818
exit 1
1919
}
20+
21+
# Documentation title skiplist
22+
skiplist[0] = "^Documentation for"
23+
skiplist[1] = "Network core options$"
24+
skiplist[2] = "POSIX message queues filesystem$"
25+
skiplist[3] = "Configuration options"
26+
skiplist[4] = ". /proc/sys/fs"
27+
skiplist[5] = "^Introduction$"
28+
skiplist[6] = "^seccomp$"
29+
skiplist[7] = "^pty$"
30+
skiplist[8] = "^firmware_config$"
31+
skiplist[9] = "^random$"
2032
}
2133

2234
# The following globals are used:
@@ -53,10 +65,11 @@ function printentry(entry) {
5365

5466
# Stage 1: build the list of documented entries
5567
FNR == NR && /^=+$/ {
56-
if (prevline ~ /Documentation for/) {
57-
# This is the main title
58-
next
59-
}
68+
for (i in skiplist) {
69+
if (prevline ~ skiplist[i]) {
70+
next
71+
}
72+
}
6073

6174
# The previous line is a section title, parse it
6275
$0 = prevline

0 commit comments

Comments
 (0)