scripts: documentation-file-ref-check: ignore hidden files
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Oct 2021 07:42:50 +0000 (08:42 +0100)
committerJonathan Corbet <corbet@lwn.net>
Tue, 26 Oct 2021 15:42:28 +0000 (09:42 -0600)
There's a warning there from a .gitignore file:

tools/perf/.gitignore: Documentation/doc.dep

This is not really a cross-reference type of warning, so
no need to report it.

In a matter of fact, it doesn't make sense at all to even
parse hidden files, as some text editors may create such
files for their own usage.

So, just ignore everything that matches this pattern:

/\.*

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/dd0125a931b4fecf8fab6be8aa527faa18f78e43.1634629094.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/documentation-file-ref-check

index 7187ea5e5149b47d00d8a01d9b8edf7373a93bc4..6865d8e63d5c88cfb87a0bfff84365472a0ab4c7 100755 (executable)
@@ -94,6 +94,9 @@ while (<IN>) {
        # Makefiles and scripts contain nasty expressions to parse docs
        next if ($f =~ m/Makefile/ || $f =~ m/\.sh$/);
 
+       # It doesn't make sense to parse hidden files
+       next if ($f =~ m#/\.#);
+
        # Skip this script
        next if ($f eq $scriptname);