style: Add rules to perlcritic config#7092
Conversation
c9ab09d to
e8cb071
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7092 +/- ##
=======================================
Coverage 99.72% 99.72%
=======================================
Files 416 416
Lines 43093 43116 +23
=======================================
+ Hits 42973 42996 +23
Misses 120 120 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e8cb071 to
1b77cf7
Compare
approved. how about a draft in os-autoinst-common with all the rules so that we don't forget? |
We don't know yet which rules we want. For that I have Which includes the core theme (and excludes some rules already we very probably don't want). |
This way we can gradually adjust it with new rules, until we have a ruleset that we want to use for all our perl projects.
ProhibitParensWithBuiltins, RequireBlockMap, ProhibitStringySplit The code has already been modified recently to adhere to those rules
CodeLayout::ProhibitParensWithBuiltins complained about the `shift()`, and
a simple `+shift` would have fixed it (+ would be necessary inside the
`@{...}`). But we should avoid using shift in subroutines anyway, and the
signature makes it much clearer.
1b77cf7 to
bbd51c3
Compare
|
We also still have various perlcritic tickets in future. |
With this we temporarily make .perlcriticrc a real file instead of a symlink to the os-autoinst-common subrepo.
That makes it easier to gradually add new rules.