Browse Source

test: Disable perlcritic ValuesAndExpressions::RequireNumberSeparators

This test produces false positives on long hex numbers, even when they
have been separated with underscores.
Guillem Jover 7 years ago
parent
commit
1bb3cb87b1
2 changed files with 3 additions and 5 deletions
  1. 0 1
      t/critic.t
  2. 3 4
      t/critic/perlcriticrc

+ 0 - 1
t/critic.t

@@ -97,7 +97,6 @@ my @policies = qw(
     ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
     ValuesAndExpressions::ProhibitVersionStrings
     ValuesAndExpressions::RequireConstantVersion
-    ValuesAndExpressions::RequireNumberSeparators
     ValuesAndExpressions::RequireQuotedHeredocTerminator
     ValuesAndExpressions::RequireUpperCaseHeredocTerminator
     Variables::ProhibitAugmentedAssignmentInDeclaration

+ 3 - 4
t/critic/perlcriticrc

@@ -23,10 +23,6 @@ minimum_regex_length_to_complain_about = 60
 # TODO: switch these to q{} ?
 allow_if_string_contains_single_quote = 1
 
-[ValuesAndExpressions::RequireNumberSeparators]
-# Up to 5 digits considered visually clear.
-min_value = 99999
-
 ##
 ## Disable tests
 ##
@@ -127,3 +123,6 @@ min_value = 99999
 
 # TODO: Check it out, some magic numbers are fine, octals for example.
 [-ValuesAndExpressions::ProhibitMagicNumbers]
+
+# FIXME: False positives on long hex numbers, even when separated.
+[-ValuesAndExpressions::RequireNumberSeparators]