mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
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>
This commit is contained in:
parent
4cd23083be
commit
5f3631916a
1 changed files with 7 additions and 0 deletions
7
Makefile
7
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue