YoshiRulz
cc0f1417f1
Enable a bunch of Analyzer rules re: `.Count()`/`.Any()` and fix cases
2025-01-31 14:49:41 +10:00
YoshiRulz
6ec2f0c49f
Enable RCS1156 and fix noncompliance
...
"Use string.Length instead of comparison with empty string"
inb4 this introduces an NRE somewhere
2025-01-31 14:49:40 +10:00
YoshiRulz
af32948756
Add Analyzer to warn about LINQ calls on string receivers
2025-01-31 14:49:40 +10:00
YoshiRulz
fe7ecceb64
Enable RCS1043 and fix noncompliance
...
"Remove 'partial' modifier from type with a single part"
2025-01-29 22:29:59 +10:00
YoshiRulz
8332a6bd5e
Add `Roslynator.Analyzers`
2025-01-29 22:16:49 +10:00
YoshiRulz
12cd7885ec
Enable CA1862 and fix noncompliance
...
"Use the 'StringComparison' method overloads to perform case-insensitive
string comparisons"
2025-01-29 22:11:54 +10:00
YoshiRulz
a3901f66e5
Add Analyzer to require `class`/`struct` keyword on records
...
fixes eef190d33
, e8c957a7a
, and c68dd703d
2024-10-19 04:53:35 +10:00
YoshiRulz
97a8e9011e
Add Analyzer to warn about decimal<=>float/double casts
...
fixes c882fe4ea
and 32a66a955
2024-09-17 03:02:09 +10:00
YoshiRulz
6dbee180e9
Fix typo in `TernaryInferredTypeMismatchAnalyzer`
...
fixes fa361ce06
2024-09-17 00:53:41 +10:00
YoshiRulz
21cdc86e8c
Enable MEN018 and fix noncompliance (except in Cores)
...
"Use Digit Separators" in integer literals
2024-09-15 23:19:07 +10:00
YoshiRulz
fa361ce06c
Add Analyzer for finding errors with ternaries in interpolated strings
...
why is this not part of the SDK
2024-09-14 02:44:08 +10:00
YoshiRulz
6b5bd34c07
Demote SA1137 to a warning
...
"Elements should have the same indentation"
2024-09-12 02:09:13 +10:00
YoshiRulz
29c15adbbf
Promote BHI1007 to a build error, fixing some cases and muting others
...
"Don't use target-typed new for throw expressions"
where there was a type name checked-in before being removed,
I've restored it (they were all `Exception`)
2024-09-10 05:42:11 +10:00
YoshiRulz
bf5deafdab
Upgrade `CS0809` to an error
...
"Obsolete member 'memberA' overrides non-obsolete member 'memberB'"
(that simply doesn't work)
2024-09-08 19:34:49 +10:00
YoshiRulz
945cf5d334
Replace Meziantou.Analyzers rule with first-party .NET rule
2024-09-07 08:02:01 +10:00
YoshiRulz
4fc3d9bd40
Update Meziantou.Analyzer and enable new rule MA0160
...
"Use ContainsKey instead of TryGetValue"
I checked the source and MA0159 "Use 'Order' instead of 'OrderBy'" looks
for the LINQ method in the BCL specifically, not by signature, so we
can't replace our bespoke `OrderBySelfAnalyzer` :(
2024-09-02 22:34:11 +10:00
YoshiRulz
c882fe4ea5
Add official `BannedApiAnalyzers` and ban some string parsing methods
2024-08-25 23:31:16 +10:00
YoshiRulz
5fd840e145
Add Analyzer (currently disabled) for target-typed `new` with `throw`
2024-07-09 00:12:46 +10:00
YoshiRulz
2a5d4b903c
Add Analyzer to disallow `^= true`
2024-07-08 10:39:06 +10:00
YoshiRulz
5e5f5772c6
Enable Analyzer rules re: blank doc comments and fix noncompliance
2024-07-08 01:37:22 +10:00
YoshiRulz
9a82dfd05f
Enable SA1517 and fix noncompliance (except in Cores)
...
"Code should not contain blank lines at start of file"
2024-07-08 01:17:05 +10:00
YoshiRulz
39b69641a6
Enable SA1506 and fix noncompliance
...
"Element documentation header should be preceded by blank line"
also fixes typo in rule config from c93a0f9d1
2024-07-08 01:13:06 +10:00
YoshiRulz
e61790d3dd
Actually commit the part where I disable the new Analyzer rule
...
fixes 2ffb897b1
-_-
2024-07-07 15:37:13 +10:00
YoshiRulz
2ffb897b11
Add analyzer (currently disabled) to enforce a newline policy for `=>`
2024-07-07 15:32:31 +10:00
YoshiRulz
479f151bbb
Fix code style warnings in satellite .NET projects
2024-07-07 12:54:11 +10:00
YoshiRulz
c93a0f9d1b
Enable SA1514 and fix noncompliance (except in Cores)
...
"Element documentation header should be preceded by blank line"
2024-07-07 12:12:08 +10:00
YoshiRulz
a8b4e76c63
Explicitly disable some diagnostics (just as a note for later really)
2024-07-04 07:37:43 +10:00
YoshiRulz
b523a8cb80
Enable MA0155, MA0156, and MA0157 re: `async`
2024-07-04 07:30:43 +10:00
YoshiRulz
da7331632d
Enable MA0136 (protects against accidental CRLFs)
2024-07-04 07:23:24 +10:00
YoshiRulz
1f7d75b7d2
Enable MA0044 and fix noncompliance
...
"Remove useless ToString call" (on a `string`)
2024-07-04 06:36:57 +10:00
YoshiRulz
b818f5325a
Enable MA0040 and silence remaining case
...
"Flow the cancellation token"
2024-07-04 05:48:35 +10:00
YoshiRulz
a7e1c8fd09
Enable MA0060 and fix noncompliance (except in Cores)
...
"The value returned by Stream.Read/Stream.ReadAsync is not used"
2024-07-04 05:12:58 +10:00
YoshiRulz
6bb60c1b76
Enable MA0078
...
"Use 'Cast' instead of 'Select' to cast"
2024-07-03 23:12:01 +10:00
YoshiRulz
a329d44e41
Enable MA0090 outside of Cores project
...
"Remove empty else/finally block"
2024-07-03 23:11:48 +10:00
YoshiRulz
c4498685c2
Enable MA0091 and fix noncompliance
...
"Sender should be 'this' for instance events"
2024-07-03 23:10:57 +10:00
YoshiRulz
67edf3f047
Enable MA0070 and fix noncompliance
...
"Obsolete attributes should include explanations"
2024-07-03 23:10:19 +10:00
YoshiRulz
152b3ad6f5
Enable MA0057 and fix noncompliance
...
"Class name should end with 'Attribute'" (when subclassing `Attribute`)
2024-07-03 23:08:23 +10:00
YoshiRulz
c0b676647b
Enable MA0104 and silence remaining cases
...
"Do not create a type with a name from the BCL"
2024-07-03 22:51:47 +10:00
YoshiRulz
db2782ca1b
Enable MA0140 and fix noncompliance (except in Cores)
...
"Both if and else branch have identical code"
see 618951403
2024-07-03 22:51:47 +10:00
YoshiRulz
c6101a190e
Update StyleCop and other Analyzers
2024-07-03 20:44:25 +10:00
YoshiRulz
38042293f6
Explicitly add new BHI1110 rule to config
...
fixes b5ff65f2c
2024-05-31 09:21:36 +10:00
James Groom
197b357419
Migrate code analysis ruleset to new format
...
fixes 362269c98
2023-11-22 05:13:48 +00:00
James Groom
09e3ed6f26
Rename .globalconfig
...
specific filename meant it was implicitly and automatically picked up, similar to Directory.Build.props; now it's explicit
2023-11-22 04:01:43 +00:00