-
Notifications
You must be signed in to change notification settings - Fork 210
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 #5434 from perlpunk/subrepo-update
Update os-autoinst-common and yaml files
- Loading branch information
Showing
30 changed files
with
535 additions
and
415 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
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 |
---|---|---|
@@ -1,22 +1,33 @@ | ||
extends: default | ||
ignore: | | ||
t/data/job-templates/invalid-yaml-schema.yaml | ||
t/data/job-templates/duplicate-key.yaml | ||
t/data/08-opensuse-test.yaml | ||
t/data/08-opensuse.yaml | ||
container/helm/** | ||
dbicdh | ||
node_modules | ||
|
||
|
||
rules: | ||
line-length: | ||
max: 160 | ||
document-start: disable | ||
indentation: | ||
indent-sequences: whatever | ||
indent-sequences: true | ||
spaces: 2 | ||
|
||
# Allows aligning subsequent lines with [] sequences | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: -1 | ||
commas: | ||
max-spaces-after: -1 | ||
|
||
# Allows aligning key value pairs | ||
colons: | ||
max-spaces-after: -1 | ||
|
||
ignore: | | ||
t/data/job-templates/invalid-yaml-schema.yaml | ||
t/data/job-templates/duplicate-key.yaml | ||
container/helm/** | ||
truthy: | ||
allowed-values: ['true', 'false'] | ||
check-keys: false |
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,8 @@ | ||
--- | ||
v: v0.1 | ||
indentation: | ||
spaces: 2 | ||
block-sequence-in-mapping: 2 | ||
trailing-spaces: fix | ||
scalar-style: | ||
default: plain |
1 change: 0 additions & 1 deletion
1
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
name: 'Commit message check' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_call: | ||
secrets: | ||
|
1 change: 0 additions & 1 deletion
1
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
name: 'Commit message check' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
push: | ||
|
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
name: 'Perl critic' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
push: | ||
|
1 change: 0 additions & 1 deletion
1
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
name: 'Perl static checks' | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
pull_request: | ||
push: | ||
|
19 changes: 19 additions & 0 deletions
19
external/os-autoinst-common/.github/workflows/yamllint.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: 'YAML-lint' | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
yaml-lint: | ||
runs-on: ubuntu-latest | ||
name: "YAML-lint" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker://registry.opensuse.org/home/okurz/container/containers/tumbleweed:yamllint | ||
with: | ||
entrypoint: yamllint | ||
args: -c .yamllint --strict ./ --format github |
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 = 3d6106cb21f6320edc144297546cda0aaa155f01 | ||
parent = 98e54f9632959aed6a15e3d0afe0a9bdb6249bd4 | ||
commit = a94b58b23be8ddb5bf85a7b1f87914ba9e71b9e6 | ||
parent = 1e9bfef6f182ff6e30268174f6414bf48c35b89c | ||
method = merge | ||
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
Empty file.
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,25 @@ | ||
extends: default | ||
ignore-from-file: [.gitignore, .yamlignore] | ||
|
||
rules: | ||
line-length: | ||
max: 160 | ||
document-start: disable | ||
indentation: | ||
indent-sequences: true | ||
spaces: 2 | ||
|
||
# Allows aligning subsequent lines with [] sequences | ||
brackets: | ||
min-spaces-inside: 0 | ||
max-spaces-inside: -1 | ||
commas: | ||
max-spaces-after: -1 | ||
|
||
# Allows aligning key value pairs | ||
colons: | ||
max-spaces-after: -1 | ||
|
||
truthy: | ||
allowed-values: ['true', 'false'] | ||
check-keys: false |
61 changes: 61 additions & 0 deletions
61
external/os-autoinst-common/lib/perlcritic/Perl/Critic/Policy/SpaceAfterSubroutineName.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,61 @@ | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
package Perl::Critic::Policy::SpaceAfterSubroutineName; | ||
|
||
use strict; | ||
use warnings; | ||
use version 0.77; | ||
use experimental 'signatures'; | ||
|
||
use base 'Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes'; | ||
|
||
use Perl::Critic::Utils qw{ :severities }; | ||
|
||
our $VERSION = '0.0.1'; | ||
|
||
my $DESC = q{Inconsistent sub declaration}; | ||
my $EXPL = q{Sub '%s' must have only one space surrounding name, parenthesis and/or block body.}; | ||
|
||
sub default_themes { qw(openqa) } | ||
sub default_severity { $SEVERITY_HIGHEST } | ||
sub supported_parameters { () } | ||
sub applies_to { 'PPI::Statement::Sub' } | ||
|
||
# check that use strict/warnings is not present when equivalent modules are. | ||
sub violates ($self, $elem, $doc) { | ||
# Grep the first 7 tokens: | ||
# Case 1: bare sub | ||
# 0. literal "sub" | ||
# 1. :space: # must be 1 | ||
# 2. sub_name | ||
# 3. :space: # must be 1 | ||
# 4. block/structure | ||
# Case 2: sub with prototype/signature | ||
# 0. literal "sub" | ||
# 1. :space: # must be 1 | ||
# 2. sub_name | ||
# 3. :space: # must be 1 | ||
# 4. prototype | ||
# 5. :space: # must be 1 | ||
# 6. block/structure | ||
|
||
my @tokens = ($elem->tokens())[0 .. 6]; | ||
return $self->violation($DESC, sprintf($EXPL, $elem->name), $elem) unless _is_surrounded_by_one_space($tokens[2]); | ||
|
||
return () if $tokens[4]->isa('PPI::Token::Structure'); | ||
|
||
return $self->violation($DESC, sprintf($EXPL, $elem->name), $elem) unless _is_surrounded_by_one_space($tokens[4]); | ||
|
||
return (); | ||
} | ||
|
||
sub _is_only_one_space ($token) { | ||
return $token->isa('PPI::Token::Whitespace') && $token->content eq ' '; | ||
} | ||
|
||
sub _is_surrounded_by_one_space ($token) { | ||
return _is_only_one_space($token->previous_sibling) && _is_only_one_space($token->next_sibling); | ||
} | ||
|
||
1; |
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
Oops, something went wrong.