Commit 8135fbb
committed
Address review: pre-existing comments, AAA markers, TODOs
Three changes from the review at 09e6b2b.
A reindent or a code move no longer resurfaces comments nobody wrote.
git marks a reformatted line as added, so line membership alone reported
pre-existing findings: a whitespace-only reindent of PageImageLocator.java
turned a banner at line 88 into a blocking error, and moving a block does
the same. Findings are now matched against the comment text present at the
base, so only genuinely new comment content reports. Costs one `git show`
per changed file, memoised. Verified on both engines, and a genuinely new
banner in the same file still blocks.
Arrange/Act/Assert and Given/When/Then are exempt from CMT001. 85 of 537
findings were bare `// Assert` markers, all in test files. They restate the
code by the rule's letter and carry real structure, and this is a blocking
rule, so leaving it to be relitigated in every test PR was the wrong
trade. Kept narrow: the marker first and at most four words, so
`// Assert the cap is clamped ...` is still judged on its merits.
CMT009 advises on a TODO that names no issue. 21 of the 25 in the tree
name neither issue nor owner, which makes them the one comment category
demonstrably rotting. Advisory, not blocking, because unlike CMT001/002/005
its false-positive rate here is unmeasured. Anchored at the start of the
comment, after the unanchored version flagged the paragraph describing it.
Doc changes: the contract bound now sits next to the instruction it bounds
rather than 40 lines away in the per-language notes; references are split
by durability with the supplementary-not-load-bearing rule demonstrated
rather than only stated; a TODO section; and an explicit statement that
this is not a push for fewer comments.1 parent 3eb293b commit 8135fbb
7 files changed
Lines changed: 266 additions & 34 deletions
File tree
- devGuide
- scripts/lint
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| |||
31 | 44 | | |
32 | 45 | | |
33 | 46 | | |
34 | | - | |
35 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
36 | 67 | | |
37 | 68 | | |
38 | 69 | | |
| |||
84 | 115 | | |
85 | 116 | | |
86 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
87 | 137 | | |
88 | 138 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
94 | 144 | | |
95 | 145 | | |
96 | 146 | | |
| |||
149 | 199 | | |
150 | 200 | | |
151 | 201 | | |
152 | | - | |
| 202 | + | |
153 | 203 | | |
154 | 204 | | |
155 | 205 | | |
156 | 206 | | |
157 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
158 | 218 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 219 | + | |
| 220 | + | |
163 | 221 | | |
164 | 222 | | |
165 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
| |||
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
| |||
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
91 | | - | |
| 107 | + | |
| 108 | + | |
92 | 109 | | |
93 | 110 | | |
94 | 111 | | |
95 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
99 | 119 | | |
100 | 120 | | |
101 | 121 | | |
102 | | - | |
| 122 | + | |
| 123 | + | |
103 | 124 | | |
104 | 125 | | |
105 | 126 | | |
| |||
111 | 132 | | |
112 | 133 | | |
113 | 134 | | |
114 | | - | |
| 135 | + | |
115 | 136 | | |
116 | 137 | | |
117 | 138 | | |
| |||
146 | 167 | | |
147 | 168 | | |
148 | 169 | | |
149 | | - | |
| 170 | + | |
150 | 171 | | |
151 | 172 | | |
152 | 173 | | |
| |||
163 | 184 | | |
164 | 185 | | |
165 | 186 | | |
166 | | - | |
| 187 | + | |
167 | 188 | | |
168 | 189 | | |
169 | 190 | | |
| |||
186 | 207 | | |
187 | 208 | | |
188 | 209 | | |
189 | | - | |
| 210 | + | |
| 211 | + | |
190 | 212 | | |
191 | 213 | | |
192 | 214 | | |
193 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
194 | 254 | | |
195 | 255 | | |
196 | 256 | | |
| |||
0 commit comments