From 55172e72315f82bf70912707b5a933def6cff74e Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Sun, 22 Dec 2024 11:45:05 -0700 Subject: [PATCH 1/3] automatic migration: bump-2024 --- .github/workflows/linux.yml | 3 ++- .gitignore | 2 ++ .vscode/settings.json | 6 ++++++ dist.ini | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 33fcd26..6b2d948 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,7 +17,8 @@ jobs: fail-fast: false matrix: cip_tag: - - "5.39" + - "5.41" + - "5.40" - "5.38" - "5.36" - "5.34" diff --git a/.gitignore b/.gitignore index 4b2980c..fb8c44e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /Perl-Critic-Plicease-* /.build +*.old +*.orig diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..578c5ee --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "pls.perlcritic.perlcriticrc": "perlcriticrc", + "pls.inc": [ + "$ROOT_PATH/lib" + ] +} diff --git a/dist.ini b/dist.ini index e057fbb..305c37a 100644 --- a/dist.ini +++ b/dist.ini @@ -6,7 +6,7 @@ copyright_year = 2019-2024 version = 0.07 [@Author::Plicease] -:version = 2.69 +:version = 2.79 release_tests = 1 installer = Author::Plicease::MakeMaker test2_v0 = 1 From 3c4fc70efd3736e9810e3cdc769743ea86b54502 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Fri, 27 Dec 2024 09:35:08 -0700 Subject: [PATCH 2/3] spelling --- author.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/author.yml b/author.yml index bc89db3..ce268c6 100644 --- a/author.yml +++ b/author.yml @@ -14,6 +14,7 @@ pod_spelling_system: - MITHALDU - Walde - wchristian + - Skyttä # ug macos - Sawa From 4fde710f9207e280a0b03e7b6ab352c5224ffa0e Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Fri, 27 Dec 2024 09:46:10 -0700 Subject: [PATCH 3/3] update documentation --- README.md | 8 ++++++++ lib/Perl/Critic/Plicease.pm | 8 ++++++++ .../Plicease/ProhibitSignaturesAndAtUnderscore.pm | 12 +++++++----- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a065d9e..e30d6a5 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,14 @@ case basis. This is a slight remix on the prohibit leading zeros policy with some helpful exceptions. +- [Perl::Critic::Policy::Plicease::ProhibitSignaturesAndAtUnderscore](https://metacpan.org/pod/Perl::Critic::Policy::Plicease::ProhibitSignaturesAndAtUnderscore) + + Prohibit the use of `@_` in subroutine using signatures + +- [Perl::Critic::Policy::Plicease::ProhibitSpecificModules](https://metacpan.org/pod/Perl::Critic::Policy::Plicease::ProhibitSpecificModules) + + Prohibit the use of specific modules or pragmas + - [Plicease::ProhibitUnicodeDigitInRegexp](https://metacpan.org/pod/Perl::Critic::Policy::Plicease::ProhibitUnicodeDigitInRegexp) Prohibit `\d` (match any digit) in regular expressions without the `/a` or `/u` modifier. diff --git a/lib/Perl/Critic/Plicease.pm b/lib/Perl/Critic/Plicease.pm index d68ab56..2ae3df5 100644 --- a/lib/Perl/Critic/Plicease.pm +++ b/lib/Perl/Critic/Plicease.pm @@ -20,6 +20,14 @@ case basis. This is a slight remix on the prohibit leading zeros policy with some helpful exceptions. +=item L + +Prohibit the use of C<@_> in subroutine using signatures + +=item L + +Prohibit the use of specific modules or pragmas + =item L Prohibit C<\d> (match any digit) in regular expressions without the C or C modifier. diff --git a/lib/Perl/Critic/Policy/Plicease/ProhibitSignaturesAndAtUnderscore.pm b/lib/Perl/Critic/Policy/Plicease/ProhibitSignaturesAndAtUnderscore.pm index 6052819..9edf8a2 100644 --- a/lib/Perl/Critic/Policy/Plicease/ProhibitSignaturesAndAtUnderscore.pm +++ b/lib/Perl/Critic/Policy/Plicease/ProhibitSignaturesAndAtUnderscore.pm @@ -30,14 +30,16 @@ None. This policy can be configured to recognize additional modules as enabling the signatures feature, by putting an entry in a .perlcriticrc file like this: - [Community::Prototypes] - signature_enablers = Plicease::ProhibitSignaturesAndAtUnderscore + [Plicease::ProhibitSignaturesAndAtUnderscore] + signature_enablers = Foo::Bar =head1 CAVEATS -This module assumes that "prototypes" detected in a source file that has signatures enabled are actually -subroutine signatures. This is because through static analysis alone it is not possible to determine if -a "prototype" is really a prototype and not a signature. There thus may be false negatives/positives. +For older versions of L (newer version is yet unreleased as of this writing), this module assumes +that "prototypes" detected in a source file that has signatures enabled are actually subroutine signatures. +This is because through static analysis alone it is not possible to determine if a "prototype" is really a +prototype and not a signature. There thus may be false negatives/positives. Future versions of this module +will require a L with better signature detection. =cut