Skip to content

feat: add taplo formatter check#224

Merged
zeitlinger merged 8 commits intomainfrom
feat/taplo-check
Apr 24, 2026
Merged

feat: add taplo formatter check#224
zeitlinger merged 8 commits intomainfrom
feat/taplo-check

Conversation

@zeitlinger
Copy link
Copy Markdown
Member

What changed

This adds basic taplo support as a formatter-style TOML check.

It also updates the runner so per-check environment overrides only apply in default mode, while --verbose preserves full native tool output. For taplo, that means the noisy INFO logs are reduced in normal runs, but actionable file-path diagnostics are still kept and verbose mode still shows the full native output.

The Taplo end-to-end cases now use the real binary, including coverage for both normal failure output and --verbose failure output.

Why

flint did not have a built-in TOML formatter check. taplo is a good fit for the basic use case here: formatting checks and auto-fix for TOML files already written in a TOML 1.0-compatible style.

While wiring that up, the repo's renovate-deps review started failing because newer Renovate versions changed the shape of their extraction logs. This PR updates the parser to handle both the older and newer log formats so dependency tracking continues to work.

Impact

Users can now run taplo through flint for TOML formatting checks and fixes.

The real-binary e2e coverage also verifies that:

  • normal mode keeps Taplo's actionable diagnostics concise
  • --verbose preserves full native Taplo output

Validation

  • cargo test -q
  • mise run lint:fix via the repo's pre-push hook

renovate-sh-app Bot and others added 7 commits April 23, 2026 22:29
| datasource | package  | from     | to       |
| ---------- | -------- | -------- | -------- |
| npm        | renovate | 43.133.0 | 43.136.1 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Signed-off-by: Gregor Zeitlinger <[email protected]>
Signed-off-by: Gregor Zeitlinger <[email protected]>
Signed-off-by: Gregor Zeitlinger <[email protected]>
Signed-off-by: Gregor Zeitlinger <[email protected]>
@zeitlinger zeitlinger marked this pull request as ready for review April 24, 2026 11:02
@zeitlinger zeitlinger requested a review from a team as a code owner April 24, 2026 11:02
Copilot AI review requested due to automatic review settings April 24, 2026 11:02
@zeitlinger zeitlinger enabled auto-merge (squash) April 24, 2026 11:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Taplo as a built-in TOML formatter check to flint, and adjusts runner/test harness behavior to support concise default output while still allowing full native tool output in --verbose runs.

Changes:

  • Introduce a new taplo built-in check (check + fix) and document it across README/docs.
  • Update the runner to support per-check environment overrides and stderr prefix filtering (disabled in --verbose).
  • Extend e2e test harness to allow substring-based stdout/stderr assertions and add Taplo e2e cases (clean/failure/fix/verbose-failure).

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/registry/checks.rs Registers the new taplo check and configures stderr prefix filtering.
src/registry/types.rs Adds env and stderr_filter_prefixes to Check for runner customization.
src/runner.rs Applies per-check env/stderr filtering in non-verbose mode; adds stderr filtering + Taplo non-verbose failure normalization; adds unit tests for stderr filtering.
tests/e2e.rs Adds stderr_contains / stdout_contains support for e2e fixtures.
tests/cases/taplo/** New Taplo end-to-end fixtures (clean, failure, auto-fix, verbose failure).
tests/cases/general/list/test.toml Updates “linters list” fixture to include Taplo.
tests/cases/general/list/files/mise.toml Adds Taplo to the mise toolset for list fixture.
tests/cases/general/init-idempotent/files/mise.toml Adds Taplo to init-idempotent fixture.
docs/linters.md Documents the new taplo check.
README.md Adds Taplo to the supported linters table.
mise.toml Adds Taplo as a managed tool.
default.json Adds Taplo to the default tool list.
.github/renovate.json5 Adds Taplo to Renovate-managed tool list.
.github/renovate-tracked-deps.json Tracks Taplo as a dependency.
.github/config/lychee.toml Fixes TOML list trailing comma (format correctness).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/e2e.rs
Comment thread src/registry/types.rs Outdated
@zeitlinger zeitlinger disabled auto-merge April 24, 2026 11:09
Signed-off-by: Gregor Zeitlinger <[email protected]>
@zeitlinger zeitlinger enabled auto-merge (squash) April 24, 2026 11:21
@zeitlinger zeitlinger merged commit 57dcb98 into main Apr 24, 2026
13 checks passed
@zeitlinger zeitlinger deleted the feat/taplo-check branch April 24, 2026 11:29
zeitlinger added a commit that referenced this pull request Apr 27, 2026
### Added

- add flint setup preflight migrations
([#233](#233))
- support managed linter configs and aqua-backed tool keys
([#228](#228))
- switch xmloxide to github backend
([#229](#229))
- add taplo formatter check
([#224](#224))
- *(init)* configure line length during init
([#218](#218))

### Fixed

- support renovate v43.136.3
([#223](#223))
- switch yaml-lint to ryl
([#226](#226))
- *(ruff)* install via github releases
([#227](#227))
- resolve init rollout regressions
([#220](#220))

### Other

- reduce fake-bin fixture coverage
([#240](#240))
- *(deps)* update dependency npm:renovate to v43.141.1
([#221](#221))
- guard fixture case groups
([#238](#238))
- *(deps)* update dependency grafana/flint to v0.20.4
([#235](#235))
- *(deps)* lock file maintenance
([#237](#237))
- *(deps)* update dependency mise to v2026.4.19
([#236](#236))
- *(deps)* update rust crate json5 to v1
([#232](#232))
- *(deps)* update taiki-e/install-action digest to 787505c
([#219](#219))
- *(deps)* update dependency grafana/flint to v0.20.3
([#225](#225))

> [!IMPORTANT]
> Close and reopen this PR to trigger CI checks.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gregor Zeitlinger <[email protected]>
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.

3 participants