aboutsummaryrefslogtreecommitdiff
path: root/perlcritic
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-09-27 15:53:01 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-09-27 15:53:01 +1300
commite85104ab65c02e76e4988e39384013a00d317067 (patch)
tree96aaac47ec6e7e31966a0135f4c79aa19a1b4655 /perlcritic
parentUpdate addenda to allowed num-suffixed idents (diff)
downloaddotfiles-e85104ab65c02e76e4988e39384013a00d317067.tar.gz
dotfiles-e85104ab65c02e76e4988e39384013a00d317067.zip
Allow a few more numeric literals in Perl
Diffstat (limited to 'perlcritic')
-rw-r--r--perlcritic/perlcriticrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/perlcritic/perlcriticrc b/perlcritic/perlcriticrc
index 25343d50..c3fda080 100644
--- a/perlcritic/perlcriticrc
+++ b/perlcritic/perlcriticrc
@@ -9,3 +9,8 @@ severity = brutal
# Add some networking terms to the list of legal numbered names
[Bangs::ProhibitNumberedNames]
add_exceptions = inet4 inet6 ipv4 ipv6
+
+# Soften this policy a bit; tolerate all the single-digit integers as literals,
+# and also 100 (for calculating percentages)
+[ValuesAndExpressions::ProhibitMagicNumbers]
+allowed_values = 0..9 100