Commit 699acfa
authored
Enable new analyzers CA1510/11/12/13 and CA1856/57/58 (#80149)
* Enable new analyzers CA1510/11/12/13 and CA1856/57/58
CA1510: Use ArgumentNullException throw helper
CA1511: Use ArgumentException throw helper
CA1512: Use ArgumentOutOfRangeException throw helper
CA1513: Use ObjectDisposedException throw helper
CA1856: Incorrect usage of ConstantExpected attribute
CA1857: A constant is expected for the parameter
CA1858: Use 'StartsWith' instead of 'IndexOf'
* More fixes
* Address PR feedback1 parent ca5e54a commit 699acfa
139 files changed
Lines changed: 393 additions & 724 deletions
File tree
- eng
- src
- coreclr
- nativeaot
- Common/src/System/Collections/Generic
- System.Private.CoreLib/src
- Internal/Reflection
- Core/Execution
- Extensions/NonPortable
- System
- Reflection
- Metadata
- Runtime
- Assemblies
- EventInfos/NativeFormat
- FieldInfos/NativeFormat
- General
- MethodInfos
- PropertyInfos/NativeFormat
- TypeInfos
- Runtime
- CompilerServices
- InteropServices
- Threading
- System.Private.Reflection.Execution/src/Internal/Reflection/Execution
- System.Private.TypeLoader/src/Internal/Runtime/TypeLoader
- tools
- Common/TypeSystem/Common/Utilities
- aot
- Mono.Linker.Tests.Cases.Expectations
- Assertions
- Metadata
- Mono.Linker.Tests/Extensions
- libraries
- Common/src/System
- CodeDom
- Data/Common
- Security/Cryptography
- Asn1
- Microsoft.VisualBasic.Core/src
- System.Collections/src/System/Collections/Generic
- System.Data.Common/src
- Resources
- System/Data/SQLTypes
- System.Diagnostics.TraceSource/src/System/Diagnostics
- System.Net.Http/src/System/Net/Http/BrowserHttpHandler
- System.Resources.Writer/src
- System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Marshaling
- System.Threading/src/System/Threading
- mono/wasm
- debugger/BrowserDebugProxy
- Common
- host
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
241 | 253 | | |
242 | 254 | | |
243 | 255 | | |
| |||
420 | 432 | | |
421 | 433 | | |
422 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
423 | 444 | | |
424 | 445 | | |
425 | 446 | | |
| |||
471 | 492 | | |
472 | 493 | | |
473 | 494 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | 495 | | |
478 | 496 | | |
479 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
240 | 252 | | |
241 | 253 | | |
242 | 254 | | |
| |||
417 | 429 | | |
418 | 430 | | |
419 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
420 | 441 | | |
421 | 442 | | |
422 | 443 | | |
| |||
468 | 489 | | |
469 | 490 | | |
470 | 491 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | 492 | | |
475 | 493 | | |
476 | 494 | | |
| |||
Lines changed: 12 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 125 | + | |
130 | 126 | | |
131 | 127 | | |
132 | 128 | | |
| |||
160 | 156 | | |
161 | 157 | | |
162 | 158 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 159 | + | |
167 | 160 | | |
168 | 161 | | |
169 | 162 | | |
170 | 163 | | |
171 | 164 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 165 | + | |
176 | 166 | | |
177 | 167 | | |
178 | 168 | | |
| |||
298 | 288 | | |
299 | 289 | | |
300 | 290 | | |
301 | | - | |
302 | | - | |
| 291 | + | |
303 | 292 | | |
304 | 293 | | |
305 | 294 | | |
| |||
310 | 299 | | |
311 | 300 | | |
312 | 301 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 302 | + | |
| 303 | + | |
317 | 304 | | |
318 | 305 | | |
319 | 306 | | |
| |||
331 | 318 | | |
332 | 319 | | |
333 | 320 | | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 321 | + | |
| 322 | + | |
343 | 323 | | |
344 | 324 | | |
345 | 325 | | |
| |||
402 | 382 | | |
403 | 383 | | |
404 | 384 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 385 | + | |
409 | 386 | | |
410 | 387 | | |
411 | 388 | | |
| |||
438 | 415 | | |
439 | 416 | | |
440 | 417 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
| 418 | + | |
445 | 419 | | |
446 | 420 | | |
447 | 421 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
| |||
389 | 386 | | |
390 | 387 | | |
391 | 388 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 389 | + | |
396 | 390 | | |
397 | 391 | | |
398 | 392 | | |
399 | 393 | | |
400 | 394 | | |
401 | 395 | | |
402 | | - | |
403 | | - | |
| 396 | + | |
404 | 397 | | |
405 | 398 | | |
406 | 399 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| |||
0 commit comments