-
Notifications
You must be signed in to change notification settings - Fork 9
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
Unify Perl Critic #32
Conversation
lib/OpenQA/Test/PatchDeparse.pm
Outdated
# This is not our code, and formatting should stay the same for | ||
# better comparison with new versions of B::Deparse | ||
# <---- PATCH | ||
package B::Deparse; | ||
no warnings 'redefine'; | ||
no strict 'refs'; | ||
|
||
*{"B::Deparse::walk_lineseq"} = sub { | ||
*{'B::Deparse::walk_lineseq'} = sub { |
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.
The comment above says "This is not our code, and formatting should stay the same for better comparison with new versions of B::Deparse" so changing the formatting here seems wrong.
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.
The quote type changes are irrelevant to the inner workings of the code. It'll perform exactly the same task regardless of the quote.
Why keeping it out-of-style?
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.
"for better comparison with new versions of B::Deparse" - although I'm just quoting the comment here. I guess I personally don't care much about it.
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.
It says so in the comment: for better comparison with new versions of B::Deparse
.
I can take a new version and do a diff to this snippet to see if anything has changed.
I just checked again, nothing has changed.
I wonder how much work it would be to create a reproducer for a bugreport. It's annoying to keep this patch around.
If it's easier, just exclude this file completely from linting instead of excluding certain lines.
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.
for context: https://progress.opensuse.org/issues/40895
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.
@josegomezr Be sure to resolve comments, or otherwise respond if you consider the matter addressed. Otherwise it looks like there's an open question here.
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.
Just unified tabs to spaces, does that also constitute a unacceptable change as per:
"This is not our code, and formatting should stay the same for better comparison with new versions of B::Deparse"
?
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.
Yes, tabs to spaces is a change.
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.
just to confirm: tabs to spaces is not acceptable for this file in particular?
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.
That part of the code should stay exactly the same. Only in this file, for the reason stated in the comment.
This pull request is now in conflicts. Could you fix it? 🙏 |
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.
Because of the discussion around B::Deparse: https://github.com/os-autoinst/os-autoinst-common/pull/32/files#r1427773102
d91c023
to
8b7d4d4
Compare
Ping (?) |
Ping x2 (?) |
8b7d4d4
to
14c704b
Compare
- Introducing `tools/perlcritic` an improved wrapper over perl's `perlcritic`. It automatically appends this project's policies that are defined under the `openqa` theme. - Adds a complementary GitHub Action to run `tools/perlcritic` automatically on Pull Requests & Master. - Fixed `perlcritics` complaints. Branched off os-autoinst#30. Co-authored-by: Oliver Kurz <[email protected]> Co-authored-by: Martchus <[email protected]>
14c704b
to
c045e31
Compare
os-autoinst/os-autoinst#2443 edit: all good now, we fixed a couple of things. |
Introducing
tools/perlcritic
an improved wrapper over perl'sperlcritic
.It automatically appends this project's policies that are defined under the
openqa
theme.Adds a complementary GitHub Action to run
tools/perlcritic
automatically on Pull Requests & Master.Fixed
perlcritics
complaints.Branched off #30.