Commit 636b693
fix(report): three Copilot review fixes — TTY detection + CHANGELOG accuracy
PR #20 review surfaced two distinct issues, both real:
1. Color decisions were made against the StringIO sink, not the
real terminal. Each detector's print_report instantiated
Report::Style.new(io: @output), and the rake task passes
`output: sink` (a StringIO) so the sink can be flushed around
the top/bottom Summary renders. StringIO is never a TTY, so
the body of the report came out plain even on a real terminal,
while the Summary (rendered directly to $stdout) was colored.
Inconsistent and silently dead — exactly the failure mode TTY
detection is supposed to prevent.
Fix: build one Report::Style instance in the rake task bound
to $stdout (the real terminal), thread it through every
detector via the existing `style:` constructor parameter, and
pass the same instance to Summary. Detectors keep writing to
sink but make their color decisions consistently against the
real output target.
Audit was the one detector that didn't accept `style:` yet
(every other migrated detector did) — added the parameter.
2. CHANGELOG severity table claimed inline_style and
helper_recommended were errors, but SEVERITY_FOR_TYPE in
audit.rb classifies them as warnings (and the rake task's
summary entries match the warning classification). Updated
the CHANGELOG table to match the code. Also added a note
about a11y_deep: section heading is a fixed banner, but
per-finding severity varies based on axe impact —
critical/serious become error, moderate becomes warning,
minor becomes suggestion.
Full suite 498/498.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 8626523 commit 636b693
3 files changed
Lines changed: 30 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
114 | 124 | | |
| 125 | + | |
115 | 126 | | |
| 127 | + | |
116 | 128 | | |
117 | | - | |
| 129 | + | |
| 130 | + | |
118 | 131 | | |
119 | | - | |
| 132 | + | |
120 | 133 | | |
| 134 | + | |
121 | 135 | | |
122 | | - | |
123 | | - | |
| 136 | + | |
| 137 | + | |
124 | 138 | | |
| 139 | + | |
125 | 140 | | |
126 | 141 | | |
| 142 | + | |
127 | 143 | | |
128 | | - | |
| 144 | + | |
129 | 145 | | |
130 | | - | |
| 146 | + | |
131 | 147 | | |
132 | 148 | | |
133 | 149 | | |
| |||
187 | 203 | | |
188 | 204 | | |
189 | 205 | | |
190 | | - | |
| 206 | + | |
191 | 207 | | |
192 | 208 | | |
193 | 209 | | |
| |||
0 commit comments