fix(reporter): show project-level check count in summary #17

Closed
opened 2026-05-19 18:39:35 +02:00 by michael · 1 comment
Owner

Problem

When running a pack with only target_type: project rules, the summary
shows 0 file(s) checked which is misleading -- files were checked for
existence and content, just not via per-file scan.

Current output:
[SUMMARY] 0 file(s) checked, 0 warning(s), 0 error(s)

Solution

Track project-level checks separately and include in summary:

[SUMMARY] 0 file(s), 13 check(s), 0 warning(s), 0 error(s)

Or when only project checks:
[SUMMARY] 13 check(s), 0 warning(s), 0 error(s)

Affected Files

  • core/runner.lua: count project-level rule runs
  • core/reporter.lua: adjust summary format
  • core/commands.lua: pass check_count to reporter
## Problem When running a pack with only target_type: project rules, the summary shows 0 file(s) checked which is misleading -- files were checked for existence and content, just not via per-file scan. Current output: [SUMMARY] 0 file(s) checked, 0 warning(s), 0 error(s) ## Solution Track project-level checks separately and include in summary: [SUMMARY] 0 file(s), 13 check(s), 0 warning(s), 0 error(s) Or when only project checks: [SUMMARY] 13 check(s), 0 warning(s), 0 error(s) ## Affected Files - core/runner.lua: count project-level rule runs - core/reporter.lua: adjust summary format - core/commands.lua: pass check_count to reporter
Author
Owner

Related: core/reporter.lua uses string.format with %d for file_count without nil check. Once runner collects errors instead of fail-fast (#43), file_count could be 0 or nil in edge cases. Defensive check needed before string.format call.

Related: core/reporter.lua uses string.format with %d for file_count without nil check. Once runner collects errors instead of fail-fast (#43), file_count could be 0 or nil in edge cases. Defensive check needed before string.format call.
michael added this to the Basic Version milestone 2026-05-30 16:05:10 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#17
No description provided.