This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit e222597
authored
Ignore CRLF endings when determining the names of header guards. (#50227)
Reported by @loic-sharma.
The tl;dr is it should be OK to have `\r\n` (CRLF) endings if the header
guard is otherwise correct.
This minor refactor (and test) discounts the existence of `\r` when
determining the name of a header guard, i.e.:
```h
#ifndef FLUTTER_MATAN_WHY_H_
```
... is now (correctly) considered a value of `FLUTTER_MATAN_WHY_H_` not
`FLUTTER_MATAN_WHY_H_\r`.1 parent f2b9921 commit e222597
File tree
2 files changed
+51
-15
lines changed- tools/header_guard_check
- lib/src
- test
2 files changed
+51
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
39 | 69 | | |
40 | 70 | | |
41 | 71 | | |
| |||
44 | 74 | | |
45 | 75 | | |
46 | 76 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 77 | + | |
52 | 78 | | |
53 | 79 | | |
54 | 80 | | |
| |||
70 | 96 | | |
71 | 97 | | |
72 | 98 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 99 | + | |
78 | 100 | | |
79 | 101 | | |
80 | 102 | | |
| |||
94 | 116 | | |
95 | 117 | | |
96 | 118 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 119 | + | |
102 | 120 | | |
103 | 121 | | |
104 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
329 | 347 | | |
330 | 348 | | |
331 | 349 | | |
| |||
0 commit comments