Skip to content

fix(cli): distinguish info vs warning severity in lint output#127

Closed
miguel-heygen wants to merge 1 commit into03-29-fix_core_separate_info_count_from_warning_count_in_linter_resultsfrom
03-29-fix_cli_distinguish_info_vs_warning_severity_in_lint_output
Closed

fix(cli): distinguish info vs warning severity in lint output#127
miguel-heygen wants to merge 1 commit into03-29-fix_core_separate_info_count_from_warning_count_in_linter_resultsfrom
03-29-fix_cli_distinguish_info_vs_warning_severity_in_lint_output

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Mar 29, 2026

PR Stack

# PR Status
1 #122 — fix: info width/height swap ← base
2 #123 — fix: include all 9 templates in build
3 #124 — fix: suppress ANSI in non-TTY
4 #125 — fix: lint --json error paths
5 #126 — fix: separate info/warning counts
6 #127 — fix: lint severity display
7 #128 — fix: render output path error
8 #129 — fix: zero-duration error message ← top

Summary

  • The lint CLI displayed info-level findings with the warning ⚠ icon and counted them in the warning total
  • JSON output correctly reported severity: "info" but human output said "1 warning(s)"
  • Now info findings show a distinct ℹ icon and the summary includes a separate info count

Reproducer

# Create composition with timed element missing class="clip"
npx hyperframes lint
# Was: "⚠  timed_element_missing_visibility_hidden ... 0 error(s), 1 warning(s)"
# Now: "ℹ  timed_element_missing_visibility_hidden ... 0 error(s), 0 warning(s), 1 info(s)"

Stack

6/8 — Depends on #126. Pairs with #126 (core linter change).

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator Author

@miguel-heygen miguel-heygen left a comment

Choose a reason for hiding this comment

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

Two issues:

1. Missing pluralization for info count in check-hyperframe-static.ts

formatCounts outputs "3 info" instead of "3 infos". Warnings get proper conditional pluralization (warning vs warnings), but info doesn't:

// Current
parts.push(`${result.infoCount} info`);

// Should be
parts.push(`${result.infoCount} info${result.infoCount === 1 ? "" : "s"}`);

2. Verify findings loop in check-hyperframe-static.ts

The CLI lint command now has a three-way severity prefix ( / / ), but the findings output loop in check-hyperframe-static.ts is not in this diff. If it still uses a two-way check, info findings will render with the warning prefix there — the same problem this PR fixes in the CLI.

The lint command displayed info-level findings with the warning icon
and counted them in the warning total, while JSON correctly reported
severity as "info". Now info findings show a distinct icon (ℹ) and
are counted separately in both human and JSON output.

Reproducer:
  # Create a composition with a timed element missing class="clip"
  npx hyperframes lint        # Was: "1 warning(s)" with ⚠ icon
  npx hyperframes lint --json # Was: severity: "info" but warningCount: 1
  # Human and JSON output now agree
@miguel-heygen miguel-heygen force-pushed the 03-29-fix_cli_distinguish_info_vs_warning_severity_in_lint_output branch from d4af810 to 9c93dff Compare March 29, 2026 11:51
@miguel-heygen miguel-heygen force-pushed the 03-29-fix_core_separate_info_count_from_warning_count_in_linter_results branch from 3995974 to d649ad3 Compare March 29, 2026 11:51
Copy link
Copy Markdown
Collaborator Author

@miguel-heygen miguel-heygen left a comment

Choose a reason for hiding this comment

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

Addressed: added pluralization for info count (infoinfos). The check-hyperframe-static.ts findings loop already uses severity.toUpperCase() which correctly outputs "INFO" — no change needed there.

@miguel-heygen
Copy link
Copy Markdown
Collaborator Author

Consolidated into fix/lint-improvements.

@miguel-heygen miguel-heygen deleted the 03-29-fix_cli_distinguish_info_vs_warning_severity_in_lint_output branch April 6, 2026 23:24
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