diff --git a/Makefile b/Makefile index bf4b0aa20d106..b2a67684b74b7 100644 --- a/Makefile +++ b/Makefile @@ -232,7 +232,8 @@ lint_perltidy: #Checking with Perl::Critic -TO_CRITIC_CHECK=$(shell git diff main --name-only | grep '.*\.\(pl\|pm\|t\)$$') +# adding an echo of search.pl in case no files are edited +TO_CRITIC_CHECK=$(shell git fetch origin main ; git diff remotes/origin/main --name-only | grep '.*\.\(pl\|pm\|t\)$$' || echo './cgi/search.pl') check_critic: @echo "🥫 Checking with perlcritic" ${DOCKER_COMPOSE} run --rm --no-deps backend perlcritic ${TO_CRITIC_CHECK}