hakamadare / webservice-pushover

WebService-Pushover - Perl support for Pushover API
http://search.cpan.org/dist/WebService-Pushover
7 stars 6 forks source link

good grief, Perl::Critic #14

Open hakamadare opened 9 years ago

hakamadare commented 9 years ago

clean up Perl::Critic complaints when running at some stricter level:

#   Failed test 'Test::Perl::Critic for "lib/WebService/Pushover.pm"'
#   at /opt/perl-5.18.2t/lib/site_perl/5.18.2/Test/Perl/Critic.pm line 110.
# 
# Perl::Critic found these violations in "lib/WebService/Pushover.pm":
# Variable, subroutine, and package names have to be in CamelCase at line 23, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 24, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 25, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 26, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 27, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 29, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 30, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 31, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 32, column 13.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 33, column 13.  (no explanation).  (Severity: 5)
# Use of low precedence operators is not allowed at line 45, column 47.  Replace low precedence operators with the high precedence substitutes.  (Severity: 5)
# Use of low precedence operators is not allowed at line 51, column 47.  Replace low precedence operators with the high precedence substitutes.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 75, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 76, column 9.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 78, column 60.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 79, column 28.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 79, column 33.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 80, column 28.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 80, column 33.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 88, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 89, column 8.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 113, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 114, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 114, column 41.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 115, column 30.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 123, column 81.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 129, column 83.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 137, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 138, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 143, column 30.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 143, column 53.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 152, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 153, column 25.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 159, column 34.  (no explanation).  (Severity: 5)
# Use of low precedence operators is not allowed at line 160, column 25.  Replace low precedence operators with the high precedence substitutes.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 160, column 35.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 160, column 47.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 169, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 170, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 170, column 41.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 171, column 30.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 179, column 81.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 192, column 67.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 200, column 69.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 205, column 8.  (no explanation).  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 206, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 207, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 208, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 209, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 210, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 211, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 212, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 213, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 214, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 215, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 216, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 217, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 218, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 221, column 8.  (no explanation).  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 222, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 223, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 224, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 227, column 8.  (no explanation).  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 228, column 20.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 229, column 20.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 232, column 8.  (no explanation).  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 233, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 237, column 22.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 238, column 22.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 239, column 22.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 240, column 22.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 244, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 245, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 245, column 16.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 245, column 25.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 245, column 32.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 247, column 8.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 247, column 16.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 247, column 21.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 247, column 31.  (no explanation).  (Severity: 5)
# Use of low precedence operators is not allowed at line 248, column 9.  Replace low precedence operators with the high precedence substitutes.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 249, column 8.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 249, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 249, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 249, column 33.  (no explanation).  (Severity: 5)
# Use of low precedence operators is not allowed at line 250, column 10.  Replace low precedence operators with the high precedence substitutes.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 251, column 8.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 251, column 28.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 251, column 35.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 253, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 254, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 255, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 255, column 26.  (no explanation).  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 255, column 26.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 255, column 36.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 256, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 259, column 12.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 259, column 17.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 259, column 24.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 259, column 32.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 259, column 38.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 259, column 46.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 262, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 263, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 263, column 16.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 265, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 266, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 266, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 267, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 267, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 268, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 272, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 273, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 273, column 16.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 275, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 276, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 276, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 277, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 277, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 278, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 282, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 283, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 283, column 16.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 285, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 286, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 286, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 287, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 291, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 292, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 292, column 16.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 294, column 12.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 295, column 18.  (no explanation).  (Severity: 5)
# Method invocation should use "()" at line 295, column 23.  Use "->MethodName()" instead of "->MethodName".  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 296, column 9.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 305, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 306, column 8.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 307, column 5.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 314, column 1.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 315, column 8.  (no explanation).  (Severity: 5)
# Variable, subroutine, and package names have to be in CamelCase at line 316, column 5.  (no explanation).  (Severity: 5)
hakamadare commented 9 years ago

also:

# Perl::Critic found these violations in "lib\WebService\Pushover.pm":
# Private Member Data shouldn't be accessed directly at line 206, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 207, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 208, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 209, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 210, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 211, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 212, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 213, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 214, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 215, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 216, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 217, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 218, column 22.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 222, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 223, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 224, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 228, column 20.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 229, column 20.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 233, column 19.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)
# Private Member Data shouldn't be accessed directly at line 255, column 26.  Accessing an objects data directly breaks encapsulation and should be avoided.  Example: $object->{ some_key }.  (Severity: 5)

this could probably be fixed with http://search.cpan.org/dist/Params-Validate-Checks or some such.

pjf commented 9 years ago

Are they custom/personal warnings? I'm very surprised to see anything about CamelCase being a severity 5.

hakamadare commented 9 years ago

nope; i got the CamelCase warnings from a CPANTS report: http://www.cpantesters.org/cpan/report/18248610-b71c-11e4-8d23-41908971dd2f iirc

olof commented 9 years ago

Hi, I got a similar bug report from a cpantester about camelcase warnings for a module i wrote (that's how I found this report), and they are indeed custom warnings provided by Perl::Critic::Policy::OTRS. You can disable them by adding theme = core in your .perlcriticrc. This means that you only run tests provided by Perl::Critic itself. Otherwise it will load any module in the Perl::Critic::Policy namespace.