go-agent/codex/qa/commands/lint.md
Snider 61e01bfdf1 feat: initial go-agent — agentci + jobrunner + plugins marketplace
Consolidates three codebases into a single agent orchestration repo:

- agentci (from go-scm): Clotho dual-run verification, agent config,
  SSH security (sanitisation, secure commands, token masking)
- jobrunner (from go-scm): Poll-dispatch-report pipeline with 7 handlers
  (dispatch, completion, auto-merge, publish draft, dismiss reviews,
  send fix command, tick parent epic)
- plugins marketplace (from agentic/plugins): 27 Claude/Codex/Gemini
  plugins with shared MCP server

All 150+ tests passing across 6 packages.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 15:47:19 +00:00

78 lines
1.4 KiB
Markdown

---
name: lint
description: Run linter and fix issues
args: [--check|--fix]
---
# Lint
Run linter and optionally fix issues.
## Usage
```
/qa:lint # Run lint, report issues
/qa:lint --check # Check only, no fixes
/qa:lint --fix # Auto-fix where possible
```
## Process
### Go
```bash
# Check
core go lint
# Some issues can be auto-fixed
golangci-lint run --fix
```
### PHP
```bash
# Check
core php stan
# PHPStan doesn't auto-fix, but can suggest fixes
```
## Common Issues
### Go
| Issue | Fix |
|-------|-----|
| `undefined: X` | Add import or define variable |
| `ineffectual assignment` | Use variable or remove |
| `unused parameter` | Use `_` prefix or remove |
| `error return value not checked` | Handle the error |
### PHP
| Issue | Fix |
|-------|-----|
| `Undefined variable` | Define or check existence |
| `Parameter $x has no type` | Add type hint |
| `Method has no return type` | Add return type |
## Output
```markdown
## Lint Results
**Linter**: golangci-lint
**Issues**: 3
### Errors
1. **pkg/api/handler.go:42** - undefined: ErrNotFound
→ Add `var ErrNotFound = errors.New("not found")`
2. **pkg/api/handler.go:87** - error return value not checked
→ Handle error: `if err != nil { return err }`
### Warnings
1. **pkg/api/handler.go:15** - unused parameter ctx
→ Rename to `_` or use it
---
Run `/qa:lint --fix` to auto-fix where possible.
```