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

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2c8939544fed8de058695a129e72c1228a6d86f8

commit 2c8939544fed8de058695a129e72c1228a6d86f8
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Sep 8 14:55:00 2024 +0200

    test: Enable ValuesAndExpressions::ProhibitMagicNumbers except for octals
    
    Warned-by: perlcritic
---
 t/critic/perlcriticrc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/t/critic/perlcriticrc b/t/critic/perlcriticrc
index 6bdebc0d2..102beabb3 100644
--- a/t/critic/perlcriticrc
+++ b/t/critic/perlcriticrc
@@ -35,6 +35,10 @@ allow_delegation_to = new clone
 # TODO: Switch these to q{} ?
 allow_if_string_contains_single_quote = 1
 
+[ValuesAndExpressions::ProhibitMagicNumbers]
+allowed_types = Octal
+allowed_values = all_integers
+
 ##
 ## Disable tests
 ##
@@ -128,8 +132,5 @@ allow_if_string_contains_single_quote = 1
 # TODO: Octals are fine, but revisit with perl 5.34 octal syntax 0o<nnnn>.
 [-ValuesAndExpressions::ProhibitLeadingZeros]
 
-# TODO: Check it out, some magic numbers are fine, octals for example.
-[-ValuesAndExpressions::ProhibitMagicNumbers]
-
 # BUG: False positives on long hex numbers, even when separated.
 [-ValuesAndExpressions::RequireNumberSeparators]

-- 
Dpkg.Org's dpkg

Reply via email to