Commit e0a904e
authored
[BUGFIX] Ensure valid position after
This is the backport of #1263, #1262 and #1265.
Since `getLineNo()` and `getColNo()`, which always returned an `int`, are
deprecated, using their replacements, which may return `null`, for `Rule`s in
a `RuleSet` may cause issues.
The fixes ensure that such `Rule`s will always have a valid position, so the
new methods will not return `null` in that situation, and a straightforward
replacement can be done.
Part of #974.AddRule (#1271)1 parent 7a469b2 commit e0a904e
File tree
3 files changed
+15
-13
lines changed- src/RuleSet
- tests/Unit/RuleSet
3 files changed
+15
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
| 135 | + | |
| 136 | + | |
132 | 137 | | |
133 | 138 | | |
134 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
106 | 102 | | |
107 | 103 | | |
108 | 104 | | |
109 | | - | |
110 | | - | |
111 | 105 | | |
112 | 106 | | |
113 | 107 | | |
| |||
128 | 122 | | |
129 | 123 | | |
130 | 124 | | |
131 | | - | |
| 125 | + | |
132 | 126 | | |
133 | 127 | | |
134 | 128 | | |
135 | | - | |
136 | | - | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
140 | 132 | | |
141 | 133 | | |
142 | 134 | | |
143 | 135 | | |
144 | | - | |
| 136 | + | |
| 137 | + | |
145 | 138 | | |
146 | 139 | | |
147 | 140 | | |
| |||
0 commit comments