]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax-check: Only prohibit empty first lines in non-empty files
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 14 Jun 2021 16:57:58 +0000 (18:57 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 15 Jun 2021 12:15:42 +0000 (14:15 +0200)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
build-aux/syntax-check.mk
src/esx/README

index 1037d10cd2793d50360fa3660fbde2f1507b053c..eda89f40add3e0edf508318fabdf8beca74b0024 100644 (file)
@@ -978,7 +978,8 @@ sc_require_locale_h:
 
 sc_prohibit_empty_first_line:
        @$(VC_LIST_EXCEPT) | xargs awk 'BEGIN { fail=0; } \
-       FNR == 1 { if ($$0 == "") { print FILENAME ":1:"; fail=1; } } \
+       FNR == 1 { maybe_fail = $$0 == ""; } \
+       FNR == 2 { if (maybe_fail == 1) { print FILENAME ":1:"; fail=1; } } \
        END { if (fail == 1) { \
          print "$(ME): Prohibited empty first line" > "/dev/stderr"; \
        } exit fail; }'
@@ -1835,7 +1836,7 @@ exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \
   ^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$
 
 exclude_file_name_regexp--sc_prohibit_empty_first_line = \
-  ^(src/esx/README|tests/(vmwarever|virhostcpu|vircaps2xml)data/.*)$$
+  ^tests/vmwareverdata/fusion-5.0.3.txt$$
 
 exclude_file_name_regexp--sc_prohibit_useless_translation = \
   ^tests/virpolkittest.c
index 372227cc9c763803409200bae6399eff7c5ed3cf..cc52d9e3282aba77852f96f55b55ef10e73093ec 100644 (file)
@@ -1,4 +1,3 @@
-
 Some links to relevant documentation
 ====================================