Skip to content

Refine or-true diagnostics with corpus categories#51

Merged
x1f9-ricon merged 1 commit into
mainfrom
k7r2/or-true-corpus-diagnostics
Jun 19, 2026
Merged

Refine or-true diagnostics with corpus categories#51
x1f9-ricon merged 1 commit into
mainfrom
k7r2/or-true-corpus-diagnostics

Conversation

@k7r2-ricon

Copy link
Copy Markdown
Contributor

Summary

  • Classify lint:or-true findings as arithmetic increment, count/probe, best-effort/probe, high-risk, generic ignore missing reason, or unclassified.
  • Require inline ignores to be rule-specific and justified (# codebase:ignore or-true — <reason>).
  • Add corpus-calibrated tests for risky suppression, arithmetic increments, grep count/probe, best-effort cleanup/probe, explicit ignore justifications, and task help output.

Closes #50.

Validation

  • bash -n .mise/tasks/lint/or-true
  • shellcheck --exclude=SC1091,SC2034,SC2154 .mise/tasks/lint/or-true
  • mise run test test/lint/or-true/or-true.bats
  • mise run test (218/218)

Notes

codebase lint "$PWD" is not currently a normal self-validation path for this repo because mise.toml has no [_.codebase].lint rules configured. Direct mise run lint:or-true "$PWD" also intentionally reports fixture hits under test/lint/or-true/fixtures and migration fixtures, so I treated the BATS suite as the self-hosted validation path.

@rikonor

rikonor commented Jun 19, 2026

Copy link
Copy Markdown

Fucking spectacular

@x1f9-ricon x1f9-ricon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and validated. The classification buckets line up with the corpus findings, the stricter inline-ignore requirement is documented in help text and fixtures, and the tests cover arithmetic increments, grep count/probe cases, best-effort cleanup/probes, high-risk git/key suppression, and generic ignores without reasons.

Validation I ran:

  • bash -n .mise/tasks/lint/or-true
  • shellcheck --exclude=SC1091,SC2034,SC2154 .mise/tasks/lint/or-true
  • mise run test test/lint/or-true/or-true.bats (30/30)
  • full mise run test (218/218)
  • git diff --check origin/main...HEAD

Hosted Ubuntu/macOS checks are green. Nice work.

@x1f9-ricon
x1f9-ricon merged commit 958cddd into main Jun 19, 2026
2 checks passed
@x1f9-ricon
x1f9-ricon deleted the k7r2/or-true-corpus-diagnostics branch June 19, 2026 22:47
@x1f9-ricon

Copy link
Copy Markdown
Contributor

Merged via merge commit 958cddd.

Learning note / pattern worth carrying forward: this was a good example of corpus-calibrated lint work. The PR did not just make or-true stricter; it named the recurring categories, gave users concrete remediation text, and added fixture coverage for each class. For future lint refinements, this shape is strong: broad corpus examples → small taxonomy → rule-specific ignore contract → BATS fixtures for every category.

Local validation before merge: targeted or-true BATS, full suite, shellcheck, bash syntax, diff check; hosted Ubuntu/macOS were green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lint: refine or-true diagnostics using corpus examples

3 participants