]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax-check: Add check prohibiting remote reference to local file
authorPeter Krempa <pkrempa@redhat.com>
Tue, 31 May 2022 07:50:58 +0000 (09:50 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 1 Jun 2022 10:27:10 +0000 (12:27 +0200)
Within a file we should use the internal reference syntax.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
build-aux/syntax-check.mk

index e8f9a91ceed59349f80f4a7fb305760655078a94..649eb91acb6adb8578b6cf354364d254c69df372 100644 (file)
@@ -1087,6 +1087,13 @@ sc_prohibit_backup_files:
          { echo 'found version controlled backup file' 1>&2; \
            exit 1; } || :
 
+# prohibit remote references to local file in RST files
+sc_avoid_remote_reference_to_local_file:
+       @prohibit='<#' \
+       in_vc_files='\.rst$$' \
+       halt='use local reference within a file' \
+         $(_sc_search_regexp)
+
 # This Perl code is slightly obfuscated.  Not only is each "$" doubled
 # because it's in a Makefile, but the $$c's are comments;  we cannot
 # use "#" due to the way the script ends up concatenated onto one line.