From 3cb3976ae021d2a801ed232aca76934be2b17c67 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Fri, 29 Oct 2021 10:50:09 +0200 Subject: [PATCH] dist/tools/doccheck: add create_pattern.sh --- dist/tools/doccheck/create_pattern.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 dist/tools/doccheck/create_pattern.sh diff --git a/dist/tools/doccheck/create_pattern.sh b/dist/tools/doccheck/create_pattern.sh new file mode 100755 index 0000000000..8da929fb1d --- /dev/null +++ b/dist/tools/doccheck/create_pattern.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# This sed script converts doxygen error messages to line number agnostic regex +# patterns as used by doccheck/check.sh +# +# Example: +# +# dist/tools/doccheck/check.sh \ +# | grep boards/nucleo-g071rb/include/periph_conf.h \ +# | dist/tools/doccheck/create_pattern.sh >> dist/tools/doccheck/exclude_patterns +# +# This would add all remaining warnings of nucleo-g071rb's periph_conf.h to the +# exclude_patterns. +# + +sed -E -e "s#^(.*:)([0-9]+): #\1DIGITS_MAGIC: #" \ + -e 's/[]\\.$*{}|+?()[^-]/\\&/g' \ + -e 's/:DIGITS_MAGIC:/:[0-9]+:/'