Skip to content

fix(get-report-data): use real fixable counts from core (A1)#91

Merged
luojiyin1987 merged 1 commit into
masterfrom
fix/get-report-data-fixable-counts
Jul 10, 2026
Merged

fix(get-report-data): use real fixable counts from core (A1)#91
luojiyin1987 merged 1 commit into
masterfrom
fix/get-report-data-fixable-counts

Conversation

@luojiyin1987

@luojiyin1987 luojiyin1987 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • get-report-data.ts hardcoded per-file fixableErrorCount / fixableWarningCount to 0, overwriting @lint-md/core's real values, so the "potentially fixable with --fix" summary was always empty.
  • Forward the real counts from lintMarkdown's result through lint-worker into BatchLintItem (new optional fixableErrorCount? / fixableWarningCount? fields), and use them in getReportData (res.fixableErrorCount ?? 0). The existing aggregation/summary code was already correct — it was just fed zeros.
  • Also populate the counts for the --stdin report path.

Verification

  • npm run build (tsc cjs + esm) passes.
  • npm test: 11 suites / 106 tests pass (6 new get-report-data tests covering error/warning counting, multi-file aggregation, and fixable summary presence/absence).

@luojiyin1987 luojiyin1987 merged commit 6b7d805 into master Jul 10, 2026
5 checks passed
@luojiyin1987 luojiyin1987 deleted the fix/get-report-data-fixable-counts branch July 10, 2026 10:04
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.

1 participant