validate-and-fix

Run unit, integration, and verify pipelines with auto-fix for trivial issues.

71|88|Updated Nov 8, 2023
One-click install
npx skills add https://github.com/openshift/lightspeed-service --skill validate-and-fix-openshift
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-and-fix
Source: https://github.com/openshift/lightspeed-service/tree/main/.cursor/skills/validate-and-fix
Command: npx skills add https://github.com/openshift/lightspeed-service --skill validate-and-fix-openshift

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Run the project validation pipeline, auto-fix trivial failures like black formatting, unused imports, and ruff-fixable lint errors. Use when you need to validate, run tests, check the pipeline, or verify changes.

Core Features & Use Cases

  • Auto-fix trivial issues (formatting, linting) and re-run validations until green or a real failure.
  • Support unit tests, integration tests, and verification checks in a single workflow.
  • Enforce guardrails with a defined limit on auto-fix cycles to avoid loops and clearly report real failures.

Quick Start

Run the full validation cycle for the project and auto-fix trivial issues until all tests pass.

Frequently Asked Questions about validate-and-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate running tests and auto-fixing formatting issues?

You can automate running tests and auto-fixing issues by executing a validation pipeline that handles unit, integration, and verify checks. It automatically resolves trivial failures like black formatting and unused imports, rerunning validations until tests pass or a real failure occurs.

What is the best way to run make-based linting and formatting checks continuously?

The best way to run make-based linting and formatting checks is using an automated validation workflow. It applies ruff-fixable lint error corrections and formatting rules, enforcing guardrails by limiting auto-fix cycles to avoid infinite loops and reporting real failures when they occur.

Does the validation pipeline support pytest unit and integration tests?

Yes, the validation pipeline supports pytest unit and integration tests within a single workflow. It runs these checks alongside verification validations, applying automated fixes to trivial issues and rerunning the suite until the codebase stabilizes or a genuine failure is encountered.

Why does automated code fixing stop before resolving all test failures?

Automated code fixing stops before resolving all test failures because it enforces guardrails with a defined limit on auto-fix cycles. This prevents infinite loops on unresolvable errors, ensuring the pipeline clearly reports real failures instead of repeatedly attempting trivial formatting or lint fixes.

Can I use this validation workflow to verify changes before pushing to CI?

Yes, you can use this validation workflow to verify changes before pushing to CI. It runs the project validation pipeline, auto-fixes trivial issues like formatting and unused imports, and ensures unit, integration, and verification checks pass, stabilizing your codebase prior to integration.