Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(linter): print --rules catalog under agent output format - #26557

Open
Bartok9 wants to merge 1 commit into
oxc-project:mainfrom
Bartok9:bartok9/fix-oxlint-rules-empty-26343
Open

fix(linter): print --rules catalog under agent output format#26557
Bartok9 wants to merge 1 commit into
oxc-project:mainfrom
Bartok9:bartok9/fix-oxlint-rules-empty-26343

Conversation

@Bartok9

@Bartok9 Bartok9 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

oxlint --rules has printed nothing (exit 0) since 1.66.0. Bisect notes in #26343 pointed at agent output format.

When default_output_format() auto-selects OutputFormat::Agent (AI_AGENT / CLAUDECODE / CURSOR_AGENT / etc.), AgentOutputFormatter inherited InternalFormatter::all_rulesNone, so run_rules wrote an empty catalog.

This implements all_rules on the agent formatter with the same RuleTable catalog as default.

Test plan

  • cargo test -p oxlint --lib output_formatter::agent::test — 6 passed including all_rules_prints_catalog
  • Reproduce: oxlint --rules in an agent env should print ## Correctness / Total: instead of 0 bytes

Closes #26343

Never git reset --hard.

AgentOutputFormatter inherited InternalFormatter::all_rules → None, so
`oxlint --rules` printed nothing and still exited 0 when the default
format was auto-detected as agent (oxc-project#26343).

Print the same RuleTable catalog as the default formatter.

Closes oxc-project#26343
@Bartok9
Bartok9 requested a review from camc314 as a code owner September 11, 2026 14:07
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.

linter: --rules prints nothing since 1.66.0 and still exits 0

1 participant