Commit e4cef58
Improve interactions between
Mainly, make all whitespace requests into no-ops if we haven't written anything significant yet. This lets us remove various existing special cases.
But also, start setting `wroteAnythingSignificant` in some locations where we write to `output` without using `writeToken` (which would set `wroteAnythingSignificant` automatically).
PiperOrigin-RevId: 945842813wroteAnythingSignificant and whitespace requests.1 parent adf9252 commit e4cef58
2 files changed
Lines changed: 18 additions & 28 deletions
File tree
- core/src
- main/java/com/google/googlejavaformat/java/javadoc
- test/java/com/google/googlejavaformat/java
Lines changed: 15 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 148 | + | |
151 | 149 | | |
152 | 150 | | |
153 | 151 | | |
| |||
234 | 232 | | |
235 | 233 | | |
236 | 234 | | |
237 | | - | |
238 | | - | |
239 | | - | |
| 235 | + | |
240 | 236 | | |
241 | 237 | | |
242 | 238 | | |
| |||
262 | 258 | | |
263 | 259 | | |
264 | 260 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 261 | + | |
268 | 262 | | |
269 | 263 | | |
270 | 264 | | |
271 | 265 | | |
272 | 266 | | |
273 | 267 | | |
274 | 268 | | |
275 | | - | |
276 | | - | |
277 | | - | |
| 269 | + | |
278 | 270 | | |
279 | 271 | | |
280 | 272 | | |
281 | 273 | | |
282 | 274 | | |
283 | 275 | | |
284 | 276 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 277 | + | |
288 | 278 | | |
289 | 279 | | |
290 | 280 | | |
| |||
304 | 294 | | |
305 | 295 | | |
306 | 296 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 297 | + | |
310 | 298 | | |
311 | 299 | | |
312 | 300 | | |
| |||
355 | 343 | | |
356 | 344 | | |
357 | 345 | | |
358 | | - | |
| 346 | + | |
359 | 347 | | |
360 | 348 | | |
361 | 349 | | |
| |||
371 | 359 | | |
372 | 360 | | |
373 | 361 | | |
| 362 | + | |
374 | 363 | | |
375 | 364 | | |
376 | 365 | | |
377 | 366 | | |
378 | | - | |
| 367 | + | |
379 | 368 | | |
380 | 369 | | |
381 | 370 | | |
| |||
385 | 374 | | |
386 | 375 | | |
387 | 376 | | |
| 377 | + | |
388 | 378 | | |
389 | 379 | | |
390 | 380 | | |
| |||
419 | 409 | | |
420 | 410 | | |
421 | 411 | | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
422 | 416 | | |
423 | 417 | | |
424 | 418 | | |
| |||
466 | 460 | | |
467 | 461 | | |
468 | 462 | | |
| 463 | + | |
469 | 464 | | |
470 | 465 | | |
471 | 466 | | |
| |||
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
| |||
1995 | 1994 | | |
1996 | 1995 | | |
1997 | 1996 | | |
1998 | | - | |
1999 | | - | |
| 1997 | + | |
2000 | 1998 | | |
2001 | 1999 | | |
2002 | | - | |
2003 | 2000 | | |
2004 | 2001 | | |
2005 | 2002 | | |
| |||
2259 | 2256 | | |
2260 | 2257 | | |
2261 | 2258 | | |
2262 | | - | |
| 2259 | + | |
| 2260 | + | |
2263 | 2261 | | |
2264 | 2262 | | |
2265 | 2263 | | |
| |||
2286 | 2284 | | |
2287 | 2285 | | |
2288 | 2286 | | |
2289 | | - | |
2290 | | - | |
2291 | 2287 | | |
2292 | 2288 | | |
2293 | | - | |
2294 | 2289 | | |
2295 | 2290 | | |
2296 | 2291 | | |
| |||
0 commit comments