Skip to content

RFC: Include core perlcritic rules as well#7056

Draft
perlpunk wants to merge 1 commit intoos-autoinst:masterfrom
perlpunk:more-perlcritic
Draft

RFC: Include core perlcritic rules as well#7056
perlpunk wants to merge 1 commit intoos-autoinst:masterfrom
perlpunk:more-perlcritic

Conversation

@perlpunk
Copy link
Copy Markdown
Contributor

...with some exceptions

We can exclude more rules, or configure some of them, e.g. which magic numbers are allowed and which not, or which number of subroutine arguments is the allowed maximum.

See output of checkstyle test

https://metacpan.org/pod/Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins for example will require

push @foo, 'bar';

instead of

push(@foo, 'bar');

@perlpunk
Copy link
Copy Markdown
Contributor Author

perlpunk commented Mar 2, 2026

I will create separate PRs for single rules, e.g. CodeLayout::ProhibitParensWithBuiltins, ValuesAndExpressions::ProhibitMagicNumbers

@perlpunk
Copy link
Copy Markdown
Contributor Author

perlpunk commented Mar 5, 2026

@perlpunk
Copy link
Copy Markdown
Contributor Author

perlpunk commented Mar 5, 2026

@perlpunk
Copy link
Copy Markdown
Contributor Author

perlpunk commented Mar 9, 2026

Next I will make a PR for ValuesAndExpressions::ProhibitMagicNumbers

@perlpunk perlpunk force-pushed the more-perlcritic branch 2 times, most recently from 5061624 to 97e1b7d Compare March 30, 2026 11:11
...with some exceptions

We can exclude more rules, or configure some of them, e.g. which magic
numbers are allowed and which not, or which number of subroutine arguments
is the allowed maximum.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant