--- name: lint description: Run the configured repo lint command and fix lint failures. allowed-tools: - Bash - Read - Grep - Glob - Edit --- # Lint Generated by `agent-workflow-kit`. Edit the kit template or `agent-workflow.config.json`, not this rendered file. Read `AGENTS.md` before making changes. ## Command ```bash cargo clippy -- -D warnings ``` ## Workflow ### 1. Run Lint ```bash cargo clippy -- -D warnings ``` Capture exact rule names, file paths, and line numbers. If the command is missing or the runtime/tool version is wrong, treat that as a local setup issue and report the setup fix before changing application code. ### 2. Classify Findings | Class | Typical fix | | --------------------- | ---------------------------------------------------------------------- | | Formatting | Run the repo formatter if documented, or make minimal formatting edits | | Unused imports/vars | Remove unused code when safe | | Type escape hatches | Replace with concrete types or `unknown` plus guards | | Unsafe patterns | Verify against repo instructions before editing | | Generated/vendor code | Confirm whether the file should be excluded before changing it | ### 3. Fix Narrowly Fix only issues related to the current task unless the user asked for broad cleanup. Do not reformat unrelated files or silence rules without explaining why the rule is wrong for that specific line. ### 4. Re-Run Lint ```bash cargo clippy -- -D warnings ``` If the repo has a broader check command, use it when the repo instructions or task require the full quality gate. Configured full check command: ```bash cargo fmt -- --check && cargo clippy -- -D warnings ``` ## Repo Overlay ### gitterm-v2 Lint Notes #### CI Command Set CI runs `cargo clippy -- -D warnings` twice — once with default features and once with `--features excalidraw`. Run both locally to mirror: ```bash cargo clippy -- -D warnings cargo clippy --features excalidraw -- -D warnings ``` **Do NOT pass `--all-targets`.** CI doesn't, and it scans examples and tests which have their own intentional patterns (and would surface false errors). #### Intentional Lint Allows `src/tab/mod.rs` carries `#[allow(clippy::large_enum_variant)]` on `TabKind`. The Terminal variant is ~5 KB and the Agent variant is ~200 B; boxing the larger one would add indirection to the dominant terminal path for negligible benefit. Tabs are pinned in a Vec and don't move. **Don't "fix" this lint.** #### Pre-existing Warnings (Not Our Code) `iced_term` (the fork at `../iced_term_fork`) has an unused-variable warning on `viewport` in `view.rs:423`. Ignore — it's the fork, not gitterm.