Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Print policy name in perlcritic messages
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 13 Apr 2020 15:46:18 +0000 (11:46 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 13 Apr 2020 15:46:18 +0000 (11:46 -0400)
This makes it easier to do a web search for details of the policy that's
been violated, as well as displaying the name that might be needed for a
policy override.

Various perlcritic settings changes are being discussed, but this one
should be uncontroversial.

src/tools/perlcheck/perlcriticrc

index 12c09a453e77b9611002da4fb20da05bc93d360b..bd848a9a6532ac0e72d125a434f019c29383d403 100644 (file)
@@ -10,6 +10,12 @@ severity = 5
 
 theme = core
 
+# print the policy name as well as the normal output
+verbose = %f: %m at line %l, column %c.  %e.  ([%p] Severity: %s)\n
+
+# Note: for policy descriptions see https://metacpan.org/release/Perl-Critic
+
+
 # allow octal constants with leading zeros
 [-ValuesAndExpressions::ProhibitLeadingZeros]