diff options
author | Kir Kolyshkin <kolyshkin@gmail.com> | 2021-04-23 00:56:54 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2021-09-03 20:31:00 +0300 |
commit | 5f3631916a7b994fe16fd4e1402f2c4ceb3bfc0d (patch) | |
tree | b8a277346d81fbee55cf39abbf684a7a51942b36 /Makefile | |
parent | 4cd23083bedaab42d5be8d6a89d05b3212697452 (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-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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: |