[libvirt] [PATCH 0/2] Fix syntax check

Jiri Denemark (2): build: Fix sc_prohibit_exit_in_tests syntax check build: Fix syntax check in VPATH cfg.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.12.2

This check makes sense only in *.c files. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 36f70bfb9..ceca27f5d 100644 --- a/cfg.mk +++ b/cfg.mk @@ -808,7 +808,7 @@ sc_prohibit_semicolon_at_eol_in_python: # mymain() in test files should use return, not exit, for nicer output sc_prohibit_exit_in_tests: @prohibit='\<exit *\(' \ - in_vc_files='^tests/' \ + in_vc_files='^tests/.*\.c$$' \ halt='use return, not exit(), in tests' \ $(_sc_search_regexp) -- 2.12.2

Matching the beginning of a path in syntax check does not work because each path is enriched with a prefix of the source tree. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- cfg.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cfg.mk b/cfg.mk index ceca27f5d..89e03ca0e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -666,7 +666,7 @@ sc_prohibit_useless_translation: halt='found useless translation' \ $(_sc_search_regexp) @prohibit='\<N?_ *\(' \ - in_vc_files='^(tests|examples)/' \ + in_vc_files='(tests|examples)/' \ halt='no translations in tests or examples' \ $(_sc_search_regexp) @@ -808,7 +808,7 @@ sc_prohibit_semicolon_at_eol_in_python: # mymain() in test files should use return, not exit, for nicer output sc_prohibit_exit_in_tests: @prohibit='\<exit *\(' \ - in_vc_files='^tests/.*\.c$$' \ + in_vc_files='tests/.*\.c$$' \ halt='use return, not exit(), in tests' \ $(_sc_search_regexp) @@ -878,7 +878,7 @@ sc_prohibit_wrong_filename_in_comment: sc_prohibit_virConnectOpen_in_virsh: @prohibit='\bvirConnectOpen[a-zA-Z]* *\(' \ - in_vc_files='^tools/virsh-.*\.[ch]$$' \ + in_vc_files='tools/virsh-.*\.[ch]$$' \ halt='Use vshConnect() in virsh instead of virConnectOpen*' \ $(_sc_search_regexp) -- 2.12.2
participants (2)
-
Jiri Denemark
-
Peter Krempa