Skip to content

feat: add lint groups for standard convention bundles (#69)#71

Open
olavostauros wants to merge 1 commit into
KnickKnackLabs:mainfrom
olavostauros:feat/lint-groups
Open

feat: add lint groups for standard convention bundles (#69)#71
olavostauros wants to merge 1 commit into
KnickKnackLabs:mainfrom
olavostauros:feat/lint-groups

Conversation

@olavostauros

Copy link
Copy Markdown

Summary

Adds first-class lint groups / presets so repos can opt into convention bundles with a single reference instead of enumerating every rule.

Fixes #69.

Syntax

Use @group-name in the existing [_.codebase].lint array:

[_.codebase]
lint = ["@maintained-tool"]

Exclude a rule from a group:

[_.codebase]
lint = ["@maintained-tool"]
lint_exclude = ["caller-pwd-contract"]

Add extra rules beyond the group:

[_.codebase]
lint = ["@maintained-tool", "mise-usage-examples"]

Built-in groups

Group Rules
@maintained-tool 9 rules: mise-settings, gum-table, bats-test-helper, bats-test-task, mcr-scope, or-true, shellcheck, caller-pwd-contract, github-actions

Files changed

File Change
lib/lint-groups.sh New — group registry, expansion functions, members lookup
lib/codebase-config.sh Source lint-groups.sh, expand @groups in codebase_configured_lint_rules(), support lint_exclude
.mise/tasks/lint/_default Show expanded group count preamble; updated error hint to mention groups
.mise/tasks/lint/groups New — lint:groups discoverability task
test/lint/lint-groups/lint-groups.bats New — 17 BATS tests (library + aggregate dispatch)

Validation

  • mise run test235/235 tests pass (17 new + 218 existing, zero regressions)
  • mise run lint:groups — discoverability task works
  • mise run lint:groups --all — shows expanded rules per group
  • bash -n on all modified files — clean
  • git diff --check — no whitespace errors

Self-hosting

The codebase repo does not use [_.codebase].lint, so self-hosting is trivially clean. A downstream test with a synthetic repo using @maintained-tool passes all 9 rules.

Adds first-class lint groups/presets so repos can opt into convention
bundles with a single @maintained-tool reference instead of enumerating
every lint rule individually.

Includes:
- lib/lint-groups.sh — built-in group registry, expansion, and
  discoverability functions
- lib/codebase-config.sh — source lint-groups.sh, expand @group
  references in codebase_configured_lint_rules(), support lint_exclude
- .mise/tasks/lint/_default — show expanded group count in preamble;
  updated error hint to mention groups
- .mise/tasks/lint/groups — new lint:groups discoverability task
- test/lint/lint-groups/ — 17 BATS tests

Closes KnickKnackLabs#69
@olavostauros olavostauros changed the title feat: add lint groups for standard convention bundles feat: add lint groups for standard convention bundles (#69) Jun 25, 2026
@olavostauros olavostauros reopened this Jul 10, 2026
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.

Add lint groups for standard convention bundles

1 participant