scripts/documentation-file-ref-check: ignore output dir
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 13 Jun 2019 10:29:17 +0000 (07:29 -0300)
committerJonathan Corbet <corbet@lwn.net>
Fri, 14 Jun 2019 20:43:01 +0000 (14:43 -0600)
When there's no Documentation/output directory, the script will
complain about those missing references:

Documentation/doc-guide/sphinx.rst: Documentation/output
Documentation/doc-guide/sphinx.rst: Documentation/output
Documentation/process/howto.rst: Documentation/output
Documentation/translations/it_IT/doc-guide/sphinx.rst: Documentation/output
Documentation/translations/it_IT/doc-guide/sphinx.rst: Documentation/output
Documentation/translations/it_IT/process/howto.rst: Documentation/output
Documentation/translations/ja_JP/howto.rst: Documentation/output
Documentation/translations/ko_KR/howto.rst: Documentation/output

Those are false positives, so add an ignore rule for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/documentation-file-ref-check

index a4139a5767265785fd54ec2f1de65f68c7a70cc1..7784c54aa38b4e6e9ab0b7c2f9dcf33f346f0935 100755 (executable)
@@ -90,6 +90,9 @@ while (<IN>) {
        # Skip this script
        next if ($f eq $scriptname);
 
+       # Ignore the dir where documentation will be built
+       next if ($ln =~ m,\b(\S*)Documentation/output,);
+
        if ($ln =~ m,\b(\S*)(Documentation/[A-Za-z0-9\_\.\,\~/\*\[\]\?+-]*)(.*),) {
                my $prefix = $1;
                my $ref = $2;