[dpkg] 127/200: test: Disable perlcritic ValuesAndExpressions::RequireNumberSeparators

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:17:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository dpkg.

commit 1bb3cb87b16eefefb1e7e2728f50b2c7bad38846
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Jan 26 13:21:49 2017 +0100

    test: Disable perlcritic ValuesAndExpressions::RequireNumberSeparators
    
    This test produces false positives on long hex numbers, even when they
    have been separated with underscores.
---
 t/critic.t            | 1 -
 t/critic/perlcriticrc | 7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/t/critic.t b/t/critic.t
index 108f121..14e27bd 100644
--- a/t/critic.t
+++ b/t/critic.t
@@ -97,7 +97,6 @@ my @policies = qw(
     ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
     ValuesAndExpressions::ProhibitVersionStrings
     ValuesAndExpressions::RequireConstantVersion
-    ValuesAndExpressions::RequireNumberSeparators
     ValuesAndExpressions::RequireQuotedHeredocTerminator
     ValuesAndExpressions::RequireUpperCaseHeredocTerminator
     Variables::ProhibitAugmentedAssignmentInDeclaration
diff --git a/t/critic/perlcriticrc b/t/critic/perlcriticrc
index 1708e1f..a968009 100644
--- a/t/critic/perlcriticrc
+++ b/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]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list