Skip to content

style: Add rules to perlcritic config#7092

Merged
mergify[bot] merged 3 commits intoos-autoinst:masterfrom
perlpunk:perlcritic-rules
Mar 9, 2026
Merged

style: Add rules to perlcritic config#7092
mergify[bot] merged 3 commits intoos-autoinst:masterfrom
perlpunk:perlcritic-rules

Conversation

@perlpunk
Copy link
Copy Markdown
Contributor

@perlpunk perlpunk commented Mar 9, 2026

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (a9347c1) to head (bbd51c3).
⚠️ Report is 15 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@okurz
Copy link
Copy Markdown
Member

okurz commented Mar 9, 2026

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.

approved. how about a draft in os-autoinst-common with all the rules so that we don't forget?

@perlpunk
Copy link
Copy Markdown
Contributor Author

perlpunk commented Mar 9, 2026

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).
You can look into the output already and check if all the rules make sense or not.

perlpunk added 3 commits March 9, 2026 18:14
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.
@perlpunk
Copy link
Copy Markdown
Contributor Author

perlpunk commented Mar 9, 2026

We also still have various perlcritic tickets in future.
https://progress.opensuse.org/issues/188058
https://progress.opensuse.org/issues/155191

@mergify mergify bot merged commit acd232f into os-autoinst:master Mar 9, 2026
51 of 52 checks passed
@perlpunk perlpunk deleted the perlcritic-rules branch March 9, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants