Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKir Kolyshkin <kolyshkin@gmail.com>2021-04-23 00:56:54 +0300
committerAndrei Vagin <avagin@gmail.com>2021-09-03 20:31:00 +0300
commit5f3631916a7b994fe16fd4e1402f2c4ceb3bfc0d (patch)
treeb8a277346d81fbee55cf39abbf684a7a51942b36 /Makefile
parent4cd23083bedaab42d5be8d6a89d05b3212697452 (diff)
Makefile: amend lint with pr_perror/fail checks
In many cases developers forget that pr_perror and fail macros are a bit special, in particular: 1. they already show errno; 2. they already append \n to the message. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b627c2099..6de731bd6 100644
--- a/Makefile
+++ b/Makefile
@@ -404,6 +404,13 @@ lint:
shellcheck scripts/*.sh
shellcheck scripts/ci/*.sh scripts/ci/apt-install
shellcheck test/others/crit/*.sh
+ # Do not append \n to pr_perror or fail
+ ! git --no-pager grep -E '^\s*\<(pr_perror|fail)\>.*\\n"'
+ # Do not use %m with pr_perror or fail
+ ! git --no-pager grep -E '^\s*\<(pr_perror|fail)\>.*%m'
+ # Do not use errno with pr_perror or fail
+ ! git --no-pager grep -E '^\s*\<(pr_perror|fail)\>\(".*".*errno'
+.PHONY: lint
codecov: SHELL := $(shell which bash)
codecov: