mvtk 1.0.3

AI-optimized developer toolkit — structured JSONL output for grep, read, tree, diff, blame, symbols, metrics, deps, changes, ctx, todos, refs, stash, test, lint
Documentation
# mvtk Lint Findings

Run: `mvtk lint --path /Users/travis/GitHub/mvtk`
Result: **3 errors, 43 warnings**

---

## Errors

### `src/search.rs:562,565``clippy::invalid_regex`
Regex patterns using lookahead/lookbehind syntax. Rust's `regex` crate does not support look-around. These will panic at runtime if executed.

### `src/symbol.rs:161``clippy::overly_complex_bool_expr`
Logic bug in a boolean expression — a branch is either always true or always false and can be optimized out entirely.

---

## Warnings (43 total)

### `manual_div_ceil` — affects every `cmd_*.rs` file
The same `div_ceil` reimplementation appears in:
`cmd_diff.rs`, `cmd_ctx.rs`, `cmd_test.rs`, `cmd_blame.rs`, `cmd_json.rs`, `cmd_symbols.rs`, `cmd_metrics.rs`, `cmd_deps.rs`, `cmd_changes.rs`, `cmd_todos.rs`, `cmd_refs.rs`, `cmd_stash.rs`, `cmd_lint.rs`

**Fix:** Replace manual `(a + b - 1) / b` pattern with `a.div_ceil(b)` (stable since Rust 1.73).

### `manual_strip``src/cmd_diff.rs:233,240,285,292`
Manually stripping a prefix with string slicing instead of `.strip_prefix()`.

### `type_complexity``src/cmd_diff.rs:197` (x2)
Very complex type used inline. Should be factored into a `type` alias.

### `if_same_then_else``src/cmd_ctx.rs:151`
`if` block with identical then/else branches.

### `manual_div_ceil``src/cmd_ctx.rs:329,364`
Same as above.

### `map_flatten``src/cmd_json.rs:465`
`.map(..).flatten()` on an iterator — use `.flat_map()` instead.

### `explicit_counter_loop``src/cmd_json.rs:562`
Variable `lineno` used as a manual loop counter — use `.enumerate()` instead.

### `lines_filter_map_ok``src/cmd_todos.rs:106`
`.flatten()` on `Lines` iterator will run forever if the iterator repeatedly produces an `Err`.

### `redundant_closure``src/config.rs:145`
Redundant closure wrapping — can be replaced with a direct function reference.

---

## Summary

| Severity | Count | Primary Cause |
|----------|-------|---------------|
| Error    | 3     | Invalid regex (lookahead), logic bug |
| Warning  | 43    | `manual_div_ceil` across all cmd files (shared pattern) |

The `manual_div_ceil` warnings are a single shared fix — one utility function or a global find/replace would clear ~20 of the 43 warnings in one shot.