aboutsummaryrefslogblamecommitdiff
path: root/perlcritic/perlcriticrc
blob: 37f033fe12572885c63969e38858e2d7915b1cf8 (plain) (tree)
1
2
3
4
5
6
7
8
9
           
                 




                                                                             
 
                                                               
                              
                                      
 



                                                                       


                                                   


                                    




                                                                             

                                                                            
                                                                         
                                            
                                            


                                                               
# No mercy!
severity = brutal

# I flatly disagree with this policy; sometimes bitwise operators are in fact
# what I want, and I don't have the problem of using | instead of || as the
# policy documentation suggests
[-Bangs::ProhibitBitwiseOperators]

# Add some networking terms to the list of legal numbered names
[Bangs::ProhibitNumberedNames]
add_exceptions = inet4 inet6 ipv4 ipv6

# I'll keep code running for old Perls, but users are on their own with
# documentation, so allow e.g. L<http://...> on Perl 5.6
[-Compatibility::PodMinimumVersion]

# This one causes more trouble than it's worth, too
[-Documentation::RequirePODUseEncodingUTF8]

# Cool story, bro
[-Editor::RequireEmacsFileVariables]

# Postfix dereferencing like $foo->@* causes false positives for this policy,
# a known bug; it's not fixed yet, so we'll just block this policy in the
# meantime: <https://github.com/Perl-Critic/Perl-Critic/issues/578>
[-References::ProhibitDoubleSigils]

# Soften this rather harsh policy a fair bit; tolerate negative one, all the
# single-digit integers as literals, three powers of 10 (for percentages,
# milliseconds etc), 60 (for angles and clocks), and 1900 (for localtime)
[ValuesAndExpressions::ProhibitMagicNumbers]
allowed_values = -1 0..9 10 60 100 1000 1900

# There's nothing wrong with $x == 2, and 2 == $x is just weird
[-ValuesAndExpressions::RequireConstantOnLeftSideOfEquality]