verify-and-fix

Format, lint, test, and build Go and Terraform provider codebases locally.

16|5|Updated Jul 19, 2023
One-click install
npx skills add https://github.com/ubie-oss/terraform-provider-lightdash --skill verify-and-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: verify-and-fix
Source: https://github.com/ubie-oss/terraform-provider-lightdash/tree/main/.claude/skills/verify-and-fix
Command: npx skills add https://github.com/ubie-oss/terraform-provider-lightdash --skill verify-and-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers waste time manually running formatting, linting, unit tests, and build validation across codebases. This skill automates a fast, local verification loop to ensure code quality, correctness, and readiness for commit.

Core Features & Use Cases

  • Formatting: automatically formats code across the repository with trunk fmt --all.
  • Linting and quality checks: runs make lint and pre-commit checks to surface violations.
  • Testing and build: executes unit tests (make test) and build verification (make build) to ensure correctness and compile-time stability.
  • Safe automation: avoids TF_ACC-related tests and interaction with live infrastructure, aligning with local development workflows.

Quick Start

Use the verify-and-fix skill to automatically format, lint, test, and fix violations locally.

Frequently Asked Questions about verify-and-fix

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

FAQPage Schema
How do I automate Go code formatting and linting before a commit?

Automate Go code formatting and linting by running trunk fmt --all followed by make lint. This sequence automatically formats the codebase and surfaces static analysis violations to ensure consistent quality before committing.

What is the best way to run local build checks and unit tests for a Terraform provider?

Run local build checks and unit tests for a Terraform provider using make test and make build. This validates compile-time stability and code correctness while safely avoiding TF_ACC tests and live infrastructure interactions.

Does this local code verification workflow support repositories outside of Go and Terraform?

This local code verification workflow primarily targets Go-based repositories and Terraform providers. It enforces specific Makefile and trunk commands, so compatibility with repositories outside this tech stack is not guaranteed.

Why does automated local testing avoid running acceptance tests on live infrastructure?

Automated local testing avoids acceptance tests to prevent unintended modifications to live infrastructure. It enforces safe local development by skipping TF_ACC-related tests and focusing solely on formatting, linting, unit testing, and build validation.

Can I use pre-commit hooks to automate formatting and static analysis in my repository?

Yes, you can use pre-commit hooks to automate formatting and static analysis. The workflow integrates pre-commit checks alongside make lint to automatically surface and fix code quality violations locally.

What steps are needed to format, lint, and build a Go codebase locally?

To format, lint, and build a Go codebase locally, execute the workflow sequence: run trunk fmt --all for formatting, make lint for static analysis, make test for unit tests, and make build to verify compilation.