Skip to content

Commit

Permalink
Enable perlcritic checks in CI
Browse files Browse the repository at this point in the history
Run perlcritic against all the perl git files.

https://progress.opensuse.org/issues/138416
Signed-off-by: ybonatakis <ybonatakis@suse.com>
  • Loading branch information
b10n1k committed Feb 12, 2024
1 parent 10683a4 commit 66cb0a9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/check_critic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: perlcritic
on: [push, pull_request]

jobs:
perlcritic_checks:
runs-on: ubuntu-latest
container:
image: registry.opensuse.org/devel/openqa/containers/os-autoinst_dev
steps:
- uses: actions/checkout@v4
- name: Static analysis
run: |
git config --global --add safe.directory '*'
./external/os-autoinst-common/tools/perlcritic --quiet $(git ls-files -- '*.p[ml]')
1 change: 1 addition & 0 deletions .perlcriticrc
1 change: 1 addition & 0 deletions main.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later

use strict;
use warnings;
use testapi;
use autotest;

Expand Down
1 change: 1 addition & 0 deletions tests/boot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use base 'basetest';
use strict;
use warnings;
use testapi;

sub run {
Expand Down

0 comments on commit 66cb0a9

Please sign in to comment.