Open petdance opened 2 years ago
I'm not sure this is worth catching. So far, :prototype doesn't tend to be used by the target audience of this policy (newbies who think ($)
is a normal thing to add to a sub definition). But perhaps.
It would be a bit more complex to recognize, because right now it completely ignores a file using the signatures feature, as it then assumes you know what you're doing.
I'm just hitting this issue where we enable by default function signature in most of our codebase using a custom package
so was adding this to our policy.. but this is useless as the current Community::Prototypes does not recognize:prototype
# Don't use function prototypes
[Community::Prototypes]
# Upgraded severity. Default severity: 3.
# Enforced by cPLint.
severity = 4
signature_enablers = cPstrict
foo
andbaz
get caught correctly.bat
is ignored correctly because it's an empty prototype.bar
should be caught but is not.This looks like the same problem as https://github.com/Perl-Critic/Perl-Critic/issues/978