Make code meet perlcritic severity level 4. - #3126
Open
drgrice1 wants to merge 1 commit into
Open
Conversation
drgrice1
force-pushed
the
perlcritic-workflow
branch
2 times, most recently
from
August 10, 2026 22:10
69e3983 to
8b30a4b
Compare
This adds a GitHub workflow that checks that Perl files in the `lib` directory satisfy perlcritic with the `.perlcriticrc` file included in this pull request. I have been working toward this for years now (since December of 2022 according to the date on this commit). Originally there were are large number of changes to files. At this point, there are not so many, so I think it is time for this to go in. Note there are some things that can't be helped (particularly with safe mode code). So those are disabled with `## no critic` annotations. Almost every method in the `lib/WeBWorK/DB.pm` file breaks the `Subroutines::RequireArgUnpacking` rule, and so that is disabled for the entire file. Note that if `no critic` annotations are added to the code, they should be specific and disable only the rule or rules that are to be ignored, and those rules should usually be enabled again later in the file after the rule breaking code. Other than the annotations already added in this pull request, this is generally something that should be avoided.
drgrice1
force-pushed
the
perlcritic-workflow
branch
from
August 10, 2026 22:10
8b30a4b to
92be955
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a GitHub workflow that checks that Perl files in the
libdirectory satisfy perlcritic with the.perlcriticrcfile included in this pull request.I have been working toward this for years now (since December of 2022 according to the date on this commit). Originally there were are large number of changes to files. At this point, there are not so many, so I think it is time for this to go in.
Note there are some things that can't be helped (particularly with safe mode code). So those are disabled with
## no criticannotations. Almost every method in thelib/WeBWorK/DB.pmfile breaks theSubroutines::RequireArgUnpackingrule, and so that is disabled for the entire file.Note that if
no criticannotations are added to the code, they should be specific and disable only the rule or rules that are to be ignored, and those rules should usually be enabled again later in the file after the rule breaking code. Other than the annotations already added in this pull request, this is generally something that should be avoided.