-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from perlpunk/perlcritic-plugins
Fix and test perlcritic plugins
- Loading branch information
Showing
12 changed files
with
119 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: 'Unit Tests' | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: perldocker/perl-tester | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: make test-t |
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...tic/Policy/ArgumentInUseStrictWarnings.pm → ...icy/OpenQA/ArgumentInUseStrictWarnings.pm
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...l/Critic/Policy/RedundantStrictWarning.pm → ...c/Policy/OpenQA/RedundantStrictWarning.pm
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/perl | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
use strict; | ||
use warnings; | ||
use FindBin '$Bin'; | ||
use lib "$Bin/../lib/perlcritic"; | ||
use Test::Perl::Critic::Policy qw/ all_policies_ok /; | ||
|
||
all_policies_ok(); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## name Passing | ||
## failures 0 | ||
## cut | ||
|
||
use strict; | ||
use warnings; | ||
|
||
## name Failing | ||
## failures 1 | ||
## cut | ||
|
||
use warnings 'redefined'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
my %h; | ||
## name Passing | ||
## failures 0 | ||
## cut | ||
|
||
$h{bare} = 1; | ||
$h{"line\nbreak"} = 2; | ||
$h{'special!'} = 3; | ||
$h{'concatenate_' . 'strings'} = 4; | ||
$h{bare2 } = 5; | ||
|
||
## name Failing | ||
## failures 4 | ||
## cut | ||
|
||
$h{'single'} = 1; | ||
$h{ 'single' } = 2; | ||
$h{"double"} = 3; | ||
$h{"double2" } = 4; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## name Passing | ||
## failures 0 | ||
## cut | ||
|
||
use Mojo::Base 'DBIx::Class::Core'; | ||
|
||
## name Passing | ||
## failures 0 | ||
## TODO It can be neessary to use two modules that both enable strict | ||
## cut | ||
|
||
use Mojo::Base 'DBIx::Class::Core'; | ||
|
||
use Moose; | ||
extends 'OpenQA::Schema::Result::Jobs'; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## name Passing | ||
## failures 0 | ||
## cut | ||
|
||
sub long ($self, $jobid, $job_labels, $aggregated, $failed_modules, $actually_failed_modules, | ||
$todo = undef) | ||
{ | ||
} | ||
|
||
sub long2 | ||
($x, $y) { | ||
} | ||
|
||
sub a ($x) { | ||
} | ||
|
||
## name Failing | ||
## failures 4 | ||
## cut | ||
|
||
sub foo($x) { | ||
} | ||
|
||
sub foo ($x){ | ||
} | ||
|
||
sub foo ($x) { | ||
} | ||
|
||
sub foo ($x) { | ||
} |