summaryrefslogtreecommitdiffstats
path: root/doc/kernel-doc-check
diff options
context:
space:
mode:
Diffstat (limited to 'doc/kernel-doc-check')
-rw-r--r--doc/kernel-doc-check10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/kernel-doc-check b/doc/kernel-doc-check
new file mode 100644
index 0000000..23887d0
--- /dev/null
+++ b/doc/kernel-doc-check
@@ -0,0 +1,10 @@
+#!/bin/bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+kernel_doc=$(dirname $0)/kernel-doc
+
+"$kernel_doc" -none "$@" 2>&1 |
+ grep '\(warning\|error\)'
+
+# check that kernel-doc succeeded, but the grep failed
+[ ${PIPESTATUS[0]} -eq 0 -a ${PIPESTATUS[1]} -eq 1 ]