-
Notifications
You must be signed in to change notification settings - Fork 23
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 #282 from perlpunk/subrepo-update
git-subrepo: update external/os-autoinst-common
- Loading branch information
Showing
22 changed files
with
494 additions
and
73 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
external/os-autoinst-common/.github/workflows/base-commit-message-checker.yml
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,58 @@ | ||
--- | ||
name: 'Commit message check' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_call: | ||
secrets: | ||
accessToken: | ||
required: true | ||
|
||
jobs: | ||
base-check-commit-message: | ||
name: Check commit message | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check subject beginning | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^([A-Z]|\S+:|git subrepo pull)' | ||
flags: 'g' | ||
error: 'The subject does not start with a capital or tag.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} | ||
|
||
- name: Check subject line length | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.{1,72}(\n|$)' | ||
flags: 'g' | ||
error: 'The maximum subject line length of 72 characters is exceeded.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} | ||
|
||
- name: Check subject ending | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.+(?<!\.)(\n|$)' | ||
flags: 'g' | ||
error: 'The subject cannot not end with a dot.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} | ||
|
||
- name: Check empty line | ||
uses: gsactions/commit-message-checker@v2 | ||
with: | ||
pattern: '^.*(\n\n|$)' | ||
flags: 'g' | ||
error: 'No newline between title and description.' | ||
excludeDescription: 'true' | ||
excludeTitle: 'true' | ||
checkAllCommitMessages: 'true' | ||
accessToken: ${{ secrets.accessToken }} |
16 changes: 16 additions & 0 deletions
16
external/os-autoinst-common/.github/workflows/commit-message-checker.yml
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: 'Commit message check' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
# we must not fix commit messages when they already reached master | ||
- '!master' | ||
|
||
jobs: | ||
check-commit-message: | ||
secrets: | ||
accessToken: "${{ secrets.GITHUB_TOKEN }}" | ||
uses: ./.github/workflows/base-commit-message-checker.yml |
41 changes: 0 additions & 41 deletions
41
external/os-autoinst-common/.github/workflows/commit_message_checker.yml
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
external/os-autoinst-common/.github/workflows/perl-critic.yml
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 @@ | ||
--- | ||
name: 'Perl critic' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
perl-critic-checks: | ||
runs-on: ubuntu-latest | ||
name: "Perlcritic" | ||
container: | ||
image: perldocker/perl-tester | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: ./tools/perlcritic --quiet . |
19 changes: 19 additions & 0 deletions
19
external/os-autoinst-common/.github/workflows/perl-lint-checks.yml
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 @@ | ||
--- | ||
name: 'Perl static checks' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
perl-lint-checks: | ||
runs-on: ubuntu-latest | ||
name: "Perltidy" | ||
container: | ||
image: perldocker/perl-tester | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: GITHUB_ACTIONS=1 ./tools/tidyall --check-only --all --quiet |
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 @@ | ||
.tidyall.d/ |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
[subrepo] | ||
remote = [email protected]:os-autoinst/os-autoinst-common.git | ||
branch = master | ||
commit = a62482b1461da31d436e6ccaf838604ababe0b2c | ||
parent = 5a9f2d23546689931d8ee90db08a95c6aa77fc6d | ||
commit = 3d6106cb21f6320edc144297546cda0aaa155f01 | ||
parent = b2d511aaf0923896d37cb46c4a3190cee62c4319 | ||
method = merge | ||
cmdver = 0.4.3 | ||
cmdver = 0.4.6 |
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,49 @@ | ||
theme = community + openqa | ||
severity = 4 | ||
include = strict ValuesAndExpressions::ProhibitInterpolationOfLiterals | ||
|
||
verbose = ::warning file=%f,line=%l,col=%c,title=%m - severity %s::[%p] %e\n | ||
|
||
# == Perlcritic Policies | ||
# -- Test::Most brings in strict & warnings | ||
[TestingAndDebugging::RequireUseStrict] | ||
equivalent_modules = Test::Most | ||
|
||
[TestingAndDebugging::RequireUseWarnings] | ||
equivalent_modules = Test::Most | ||
|
||
# -- Avoid double quotes unless there's interpolation or a single quote. | ||
[ValuesAndExpressions::ProhibitInterpolationOfLiterals] | ||
allow_if_string_contains_single_quote = 1 | ||
severity = 3 | ||
|
||
# -- Prohibit deep nesting | ||
[ControlStructures::ProhibitDeepNests] | ||
severity = 4 | ||
add_themes = community | ||
max_nests = 4 | ||
|
||
# == Community Policies | ||
# -- Test::Most brings in strict & warnings | ||
[Freenode::StrictWarnings] | ||
extra_importers = Test::Most | ||
|
||
# -- Test::Most brings in strict & warnings | ||
[Community::StrictWarnings] | ||
extra_importers = Test::Most | ||
|
||
[Community::DiscouragedModules] | ||
severity = 3 | ||
|
||
# Test modules have no package declaration | ||
[Community::PackageMatchesFilename] | ||
severity = 1 | ||
|
||
# == Custom Policies | ||
# -- Useless quotes on hashes | ||
[HashKeyQuotes] | ||
severity = 5 | ||
|
||
# -- Superfluous use strict/warning. | ||
[RedundantStrictWarning] | ||
equivalent_modules = Test::Most |
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,14 @@ | ||
# Workaround needed for handling non-ASCII in files. | ||
# # See <https://github.com/houseabsolute/perl-code-tidyall/issues/84>. | ||
--character-encoding=none | ||
--no-valign | ||
-l=160 | ||
-fbl # don't change blank lines | ||
-fnl # don't remove new lines | ||
-nsfs # no spaces before semicolons | ||
-baao # space after operators | ||
-bbao # space before operators | ||
-pt=2 # no spaces around () | ||
-bt=2 # no spaces around [] | ||
-sbt=2 # no spaces around {} | ||
-sct # stack closing tokens )} |
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,3 @@ | ||
[PerlTidy] | ||
select = **/*.{pl,pm,t} tools/tidyall tools/perlcritic tools/update-deps | ||
argv = --profile=$ROOT/.perltidyrc |
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,26 @@ | ||
################################################## | ||
# WARNING | ||
# This file is autogenerated by tools/update-deps | ||
# from dependencies.yaml | ||
################################################## | ||
|
||
requires 'Module::CPANfile'; | ||
requires 'Storable', '>= 3.06'; | ||
|
||
on 'test' => sub { | ||
requires 'Test::Most'; | ||
requires 'Test::Warnings'; | ||
|
||
}; | ||
|
||
on 'develop' => sub { | ||
requires 'Code::TidyAll'; | ||
requires 'Perl::Critic'; | ||
requires 'Perl::Critic::Community'; | ||
requires 'Perl::Tidy', '== 20230912'; | ||
|
||
}; | ||
|
||
feature 'coverage', 'coverage for CI' => sub { | ||
|
||
}; |
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,32 @@ | ||
--- | ||
# % is placeholder for section. | ||
# e.g.: | ||
# % => develop | ||
# %_requires => develop_requires | ||
targets: | ||
# List all %_requires into a cpanfile | ||
cpanfile: [main, develop, test] | ||
cpanfile-targets: | ||
# save %_require into cpanfile section | ||
develop: develop | ||
test: test | ||
|
||
main_requires: | ||
# Needed until preaction/Log-Any#105 is solved. | ||
perl(Storable): '>= 3.06' | ||
perl(Module::CPANfile): | ||
perl(version): | ||
|
||
develop_requires: | ||
perl(Perl::Tidy): '== 20230912' | ||
perl(Code::TidyAll): | ||
perl(Perl::Critic): | ||
perl(Perl::Critic::Community): | ||
|
||
cover_requires: | ||
perl(Devel::Cover): | ||
perl(Devel::Cover::Report::Codecov): | ||
|
||
test_requires: | ||
perl(Test::Most): | ||
perl(Test::Warnings): |
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
42 changes: 42 additions & 0 deletions
42
external/os-autoinst-common/lib/perlcritic/Perl/Critic/Policy/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
package Perl::Critic::Policy::ArgumentInUseStrictWarnings; | ||
|
||
use strict; | ||
use warnings; | ||
use experimental 'signatures'; | ||
use base 'Perl::Critic::Policy'; | ||
|
||
use Perl::Critic::Utils qw( :severities :classification :ppi ); | ||
|
||
our $VERSION = '0.0.1'; | ||
|
||
sub default_severity { return $SEVERITY_HIGH } | ||
sub default_themes { return qw(openqa) } | ||
sub applies_to { return qw(PPI::Statement::Include) } | ||
|
||
my $desc = q{use strict/warnings with arguments}; | ||
my $expl = q{Remove argument from: %s.}; | ||
|
||
# check that use use strict and warnings don't have arguments. | ||
sub violates ($self, $elem, $document) { | ||
# skip if it's not a use | ||
return unless $elem->type() eq 'use'; | ||
# skip if it's not a pragma | ||
return unless my $pragma = $elem->pragma(); | ||
# skip if it's not warnings or strict | ||
return unless ($pragma eq 'warnings' || $pragma eq 'strict'); | ||
|
||
my @args = $elem->arguments(); | ||
# skip if it doesn't have arguments | ||
return if scalar(@args) == 0; | ||
|
||
# allow promoting warnings to FATAL | ||
return if scalar(grep { $_->content eq 'FATAL' } @args); | ||
|
||
# Report the problem. | ||
return $self->violation($desc, sprintf($expl, $elem), $elem); | ||
} | ||
|
||
1; |
Oops, something went wrong.