Local lint test
Skill mpagot/os-autoinst-distri-opensuse-skills/skills/local-lint-test
OSADO educated clankers
npx -y skills add mpagot/os-autoinst-distri-opensuse-skills --skill local-lint-testAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Recommends the fastest local commands to validate edited OSADO code before pushing. Activate when the user asks "how do I check my code", "what should I run locally", "lint my changes", "does this compile", "run perltidy", "run perlcritic", "run a unit test", "check formatting", or after editing files to verify correctness. Covers compilation, formatting, linting, unit tests, YAML validation, and static analysis -- always preferring the lightest targeted command over full-suite runs.
SKILL.md
4.0 KB, as published. Nobody here has run it
Tools
Script paths are relative to this skill's installed directory.
scripts/recommend_checks.pl-- Main recommender. Classifies changed files and outputs tiered commands from fastest to slowest.scripts/test_compile.sh-- Targetedperl -cwrapper with correct OSADOPERL5LIB.
The full command reference is in references/check_reference.md. Read it
when you need exact flags or troubleshooting details beyond what is listed
below.
Process
- Identify the OSADO repo path. If unclear, ask. Usually the current
directory. Verify it contains
lib/andtests/. - Run the recommender:
By default it readsperl scripts/recommend_checks.pl --repo /path/to/osadogit diff --cached(staged files). Alternatives:- Unstaged changes:
--git-diff - A specific commit:
--git-commit <hash> - Explicit files: pass them as positional arguments
- Unstaged changes:
- Present the tiered output to the user:
- Tier 1 (instant): Per-file checks (< 5s each). Run always. Includes
perl -c,yamllint, andproveon a single unit test. - Tier 2 (quick): Targeted checks (< 30s total). Run before commit.
Includes
make tidyand batch compile. - Tier 3 (thorough): Full-suite checks (minutes). Run before PR.
- Tier 1 (instant): Per-file checks (< 5s each). Run always. Includes
- If a check fails, apply the triage knowledge below to explain the root cause and provide the fix.
Triage (common failures)
| Error pattern | Root cause | Fix |
|---|---|---|
Wrong version of perltidy. Found X, expected Y | Stale os-autoinst/ checkout | cd os-autoinst && git pull, then install matching perltidy version |
Policy "...::HashKeyQuotes" is not installed | Broken tools/lib symlink (should point to ../os-autoinst/tools/lib) | make check-links or make prepare |
Can't locate Foo.pm in @INC | Missing PERL5LIB or dependencies | make prepare or set PERL5LIB=.:lib:os-autoinst:os-autoinst/lib |
No plan found in TAP output | Test conditionally skips without env vars | Expected locally; passes in CI with full env |
| Full compile takes > 5 minutes | 2000+ files checked in parallel | Use make test-compile-changed instead |
parallel: command not found | GNU parallel not installed | zypper in gnu_parallel |
Command 'yamllint' not found | Python linter not installed | pip install yamllint or zypper in python3-yamllint |
For detailed troubleshooting steps, read references/check_reference.md.
Rules
- Always prefer the lightest command that covers the change. Never suggest
make testwhen a singleperl -csuffices. - Do NOT modify OSADO source code. This skill only analyses and recommends.
- Do NOT run the recommender redundantly if the user already knows what to run.
- Do NOT re-implement the script's logic in shell or file exploration. Always call the Perl script.
- When
vr-planneris also installed, suggest it for remote verification after local checks pass. - If the user wants to run a single unit test, always include the full
provecommand with--time --verbose -l -Ios-autoinst/flags. AddPERL5OPT=-MCarp::Alwaysfor stack traces when debugging failures. </instructions>