Two fixes for documentation-file-ref-check
Subsystems (4)
cover Two fixes for documentation-file-ref-check
Hi Jon,
This small series contain two fixes for documentation-file-ref-check, in order to remove some (false) positives.
The first one makes it to ignore files that start with a dot. It prevents the script to try parsing hidden files.
The second one shuts up (currently) two false-positives for some documents under:
tools/bpf/bpftool/Documentation/
Mauro Carvalho Chehab (2):
scripts: documentation-file-ref-check: ignore hidden files
scripts: documentation-file-ref-check: fix bpf selftests path
scripts/documentation-file-ref-check | 4 ++++ 1 file changed, 4 insertions(+)
Signature · 1 line
2.31.1
PATCH 1/2 scripts: documentation-file-ref-check: ignore hidden files
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:
/\.*
---
To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/2] at: https://lore.kernel.org/all/[email protected]/
scripts/documentation-file-ref-check | 3 +++ 1 file changed, 3 insertions(+)
scripts/documentation-file-ref-check +3 -0
@@ -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);
Signature · 1 line
2.31.1
PATCH 2/2 scripts: documentation-file-ref-check: fix bpf selftests path
In reply to Mauro Carvalho Chehabtools/testing/selftests/bpf/test_bpftool_synctypes.py use relative patches on the top of BPFTOOL_DIR:
BPFTOOL_DIR = os.path.join(LINUX_ROOT, 'tools/bpf/bpftool')
Change the script to automatically convert:
testing/selftests/bpf -> bpf/bpftool
In order to properly check the files used by such script.
---
To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/2] at: https://lore.kernel.org/all/[email protected]/
scripts/documentation-file-ref-check | 1 + 1 file changed, 1 insertion(+)
scripts/documentation-file-ref-check +1 -0
@@ -147,6 +147,7 @@ while (<IN>) { if ($f =~ m/tools/) { my $path = $f; $path =~ s,(.*)/.*,$1,; + $path =~ s,testing/selftests/bpf,bpf/bpftool,; next if (grep -e, glob("$path/$ref $path/../$ref $path/$fulref")); }
Signature · 1 line
2.31.1
Jonathan Corbet
maintainerQuoted 11 lines · Mauro Carvalho Chehab
Hi Jon,
This small series contain two fixes for documentation-file-ref-check, in order to remove some (false) positives.
The first one makes it to ignore files that start with a dot. It prevents the script to try parsing hidden files.
The second one shuts up (currently) two false-positives for some documents under:
Quoted 8 lines
tools/bpf/bpftool/Documentation/Mauro Carvalho Chehab (2):
scripts: documentation-file-ref-check: ignore hidden files
scripts: documentation-file-ref-check: fix bpf selftests pathscripts/documentation-file-ref-check | 4 ++++ 1 file changed, 4 insertions(+)
Set applied, thanks.
jon