-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable perlcritic checks in CI #37
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see that this already flagged two files
tests/boot.pm
Outdated
@@ -3,6 +3,7 @@ | |||
|
|||
use base 'basetest'; | |||
use strict; | |||
use warnings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already established that we don't want to have the explicit use strict
and use warnings
in test modules. I guess you can find a related discussion already in other pull requests in this repo. Please see http://open.qa/docs/#_test_module_interface for the suggested style. So basically replace the above three lines with
use Mojo::Base 'basetest';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know but i found it as that and i didnt want to interfere to the approach. i will change them
.github/workflows/check_critic.yml
Outdated
- name: Static analysis | ||
run: | | ||
git config --global --add safe.directory '*' | ||
./external/os-autoinst-common/tools/perlcritic --quiet $(git ls-files -- '*.p[ml]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the other PR, please use perlcritic like this:
https://github.com/os-autoinst/os-autoinst-common/blob/master/.github/workflows/perl-critic.yml
You don't need to pass it the list of files.
66cb0a9
to
fc4a2c2
Compare
.github/workflows/check_critic.yml
Outdated
- uses: actions/checkout@v4 | ||
- name: Static analysis | ||
run: | | ||
git config --global --add safe.directory '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now there is no need to do this anymore, as no git
command is called here.
git config --global --add safe.directory '*' |
fc4a2c2
to
8af551c
Compare
main.pm
Outdated
@@ -1,7 +1,8 @@ | |||
# Copyright 2014-2018 SUSE LLC | |||
# SPDX-License-Identifier: GPL-2.0-or-later | |||
|
|||
use strict; | |||
|
|||
use Mojo::Base; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this should be
use Mojo::Base; | |
use Mojo::Base -strict; |
As no base class is used here
Run perlcritic against all the perl git files. https://progress.opensuse.org/issues/138416 Signed-off-by: ybonatakis <[email protected]>
8af551c
to
a131cb3
Compare
Run perlcritic against all the perl git files.
https://progress.opensuse.org/issues/138416