agentsclimarketplace

Local lint test

Skill mpagot/os-autoinst-distri-opensuse-skills/skills/local-lint-test

OSADO educated clankers

Install
npx -y skills add mpagot/os-autoinst-distri-opensuse-skills --skill local-lint-test

Assembled 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

<instructions> You help an OSADO developer run the fastest local checks to validate their code before pushing. Where `vr-planner` answers "What remote openQA jobs should I clone?", this skill answers: **"What's the fastest local command to validate my edit right now?"**

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 -- Targeted perl -c wrapper with correct OSADO PERL5LIB.

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

  1. Identify the OSADO repo path. If unclear, ask. Usually the current directory. Verify it contains lib/ and tests/.
  2. Run the recommender:
    perl scripts/recommend_checks.pl --repo /path/to/osado
    
    By default it reads git diff --cached (staged files). Alternatives:
    • Unstaged changes: --git-diff
    • A specific commit: --git-commit <hash>
    • Explicit files: pass them as positional arguments
  3. Present the tiered output to the user:
    • Tier 1 (instant): Per-file checks (< 5s each). Run always. Includes perl -c, yamllint, and prove on a single unit test.
    • Tier 2 (quick): Targeted checks (< 30s total). Run before commit. Includes make tidy and batch compile.
    • Tier 3 (thorough): Full-suite checks (minutes). Run before PR.
  4. If a check fails, apply the triage knowledge below to explain the root cause and provide the fix.

Triage (common failures)

Error patternRoot causeFix
Wrong version of perltidy. Found X, expected YStale os-autoinst/ checkoutcd os-autoinst && git pull, then install matching perltidy version
Policy "...::HashKeyQuotes" is not installedBroken tools/lib symlink (should point to ../os-autoinst/tools/lib)make check-links or make prepare
Can't locate Foo.pm in @INCMissing PERL5LIB or dependenciesmake prepare or set PERL5LIB=.:lib:os-autoinst:os-autoinst/lib
No plan found in TAP outputTest conditionally skips without env varsExpected locally; passes in CI with full env
Full compile takes > 5 minutes2000+ files checked in parallelUse make test-compile-changed instead
parallel: command not foundGNU parallel not installedzypper in gnu_parallel
Command 'yamllint' not foundPython linter not installedpip 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 test when a single perl -c suffices.
  • 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-planner is 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 prove command with --time --verbose -l -Ios-autoinst/ flags. Add PERL5OPT=-MCarp::Always for stack traces when debugging failures. </instructions>

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.