feat: add ci-lint-enforcement rule (#49)#58
Open
olavostauros wants to merge 2 commits into
Open
Conversation
…ts in CI Implements KnickKnackLabs#49 — a new lint rule that detects repos with [_.codebase].lint configured but no aggregate codebase lint enforcement in CI workflows. Key features: - Scans workflow YAMLs for direct patterns (codebase lint "$PWD"), mise exec indirection, and indirect delegation via local tasks - Warns on drift-prone hard-coded per-rule loops - --fix mode adds aggregate enforcement step and provisions codebase CLI tooling - Respects codebase:ignore mechanism - 13 BATS tests across 7 fixture scenarios (direct, indirect, missing, hardcoded-loop, loop-only, no-config, ignored, no-workflows) All 232 tests pass (13 ci-lint-enforcement tests at indices 45-57).
This was referenced Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a new lint rule
ci-lint-enforcementthat checks repos with[_.codebase].lintconfigured have aggregate codebase lint enforcement in CI.Fixes #49.
Rule behavior
OK <repo> (N rule(s) enforced in M workflow(s))OK <repo> ...WARN <repo> ... (drift-prone)FAIL <repo>: lint configured but no aggregate enforcement in CI[_.codebase].lintSKIP <repo>--fixmodeshiv:codebaseDetection patterns
codebase lint "$PWD",codebase lint .,codebase lint $PWDmise exec -- codebase lint ...mise run test→ checks.mise/tasks/testforcodebase lint/$CODEBASE_BIN lintcodebase lint:<rule-name>→ WARN (drift-prone, not FAIL)Files changed
.mise/tasks/lint/ci-lint-enforcementtest/lint/ci-lint-enforcement/ci-lint-enforcement.batstest/lint/ci-lint-enforcement/fixtures/Validation
mise run test— all 232 tests pass (13 new ci-lint-enforcement tests at indices 45–57)codebase lint:ci-lint-enforcement .— SKIP (codebase repo has no[_.codebase].lint)codebase-config.shhelpers,resolve_target(),collect_workflows(),codebase:ignoremechanism