From f083257a171dbd64960154c72619d5be27f7473e Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Fri, 17 Jan 2025 16:16:37 -0500 Subject: [PATCH] Improve git grep code quality checks --- test/check-paths.sh | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/test/check-paths.sh b/test/check-paths.sh index b88c7775cf2..b43b1053f50 100755 --- a/test/check-paths.sh +++ b/test/check-paths.sh @@ -23,34 +23,35 @@ exactly() { # exactly N name search [mode] [filter] # With the potential exception of << if you increase any of these numbers you're probably doing it wrong # Additional exception August 2020: \b is a regex symbol as well as a BYOND macro. -exactly 1 "escapes" '\\\\(red|blue|green|black|b|i[^mc])' -exactly 8 "Del()s" '\WDel\(' +exactly 3 "escapes" '\\(red|blue|green|black|b|i[^mc])' +exactly 3 "Del()s" '(?> uses" '>>(?!>)' -P +exactly 1 "world<< uses" 'world\s*<<' +exactly 75 "'in world' uses" '\s+\bin world\b(?=\s*$|\s*//|\s*\))' -P +exactly 1 "world.log<< uses" 'world.log\s*<<' +exactly 18 "<< uses" '(?> uses" '(?\\])>>(?!>)' -P exactly 0 "incorrect indentations" '^( {4,})' -P exactly 23 "text2path uses" 'text2path' -exactly 4 "update_icon() override" '/update_icon\((.*)\)' -P -exactly 0 "goto uses" 'goto ' +exactly 4 "update_icon() overrides" '\/update_icon\(' -P +exactly 0 "goto uses" '\bgoto\b' exactly 9 "atom/New uses" '^/(obj|atom|area|mob|turf).*/New\(' exactly 1 "decl/New uses" '^/decl.*/New\(' -exactly 0 "tag uses" '\stag = ' -P '*.dmm' -exactly 3 "unmarked globally scoped variables" '^(/|)var/(?!global)' -P -exactly 0 "global-marked member variables" '\t(/|)var.*/global/.+' -P -exactly 0 "static-marked globally scoped variables" '^(/|)var.*/static/.+' -P +exactly 3 "tag uses" '(?