diff --git a/.github/workflows/check_critic.yml b/.github/workflows/check_critic.yml new file mode 100644 index 0000000..1e714dc --- /dev/null +++ b/.github/workflows/check_critic.yml @@ -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]') diff --git a/.perlcriticrc b/.perlcriticrc new file mode 120000 index 0000000..48360c8 --- /dev/null +++ b/.perlcriticrc @@ -0,0 +1 @@ +external/os-autoinst-common/.perlcriticrc \ No newline at end of file diff --git a/main.pm b/main.pm index 7134c7f..86a6be5 100644 --- a/main.pm +++ b/main.pm @@ -2,6 +2,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later use strict; +use warnings; use testapi; use autotest; diff --git a/tests/boot.pm b/tests/boot.pm index 45ec6b0..e16a368 100644 --- a/tests/boot.pm +++ b/tests/boot.pm @@ -3,6 +3,7 @@ use base 'basetest'; use strict; +use warnings; use testapi; sub run {