Commit Graph

62 Commits

Author SHA1 Message Date
YoshiRulz b1ad34839a
Enable MA0029 and fix noncompliance
"Combine LINQ methods"
2022-07-22 03:51:47 +10:00
YoshiRulz 26b6a1c4a9
Enable MA0020 and fix noncompliance
"Use direct methods instead of LINQ methods"
2022-07-22 03:51:47 +10:00
YoshiRulz 697c10e3e6
Enable MA0015 and fix noncompliance
"Specify the parameter name in ArgumentException"
needed to update package because this rule was broken until now
2022-07-22 03:51:46 +10:00
YoshiRulz 92c4714be1
Enable CA2208 and MA0043 and fix noncompliance
"Instantiate argument exceptions correctly" and
"Use nameof operator in ArgumentException"
2022-07-22 03:51:45 +10:00
YoshiRulz 5a8a24e936
Enable MA0054 and fix noncompliance
"Embed the caught exception as innerException"
2022-07-22 03:51:43 +10:00
YoshiRulz 8ac4dabaf7
Enable MA0012 and MA0014 and fix noncompliance
"Do not raise reserved exception type" and
"Do not raise System.ApplicationException type"
now mostly compliant with
https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/using-standard-exception-types
2022-07-22 03:51:43 +10:00
YoshiRulz a2fef59fe1
Add Analyzer rule to prohibit `typeof(T).ToString()` 2022-07-22 03:51:43 +10:00
YoshiRulz f3f90a4cd5
Add Analyzer rules to prohibit `this.GetType()`
seriously Meziantou is a godsend
2022-07-22 03:51:42 +10:00
YoshiRulz 3fddcdb2c5
Add Analyzer rule to enforce throwing in `[FeatureNotImplemented]` 2022-07-15 22:22:28 +10:00
YoshiRulz 6b4e526a44
Actually run all the Analyzers for ext. tools, update Analyzers
fixes 6f372820a
2022-07-15 22:22:19 +10:00
YoshiRulz 5379de9a6e
Enable MA0019 and fix noncompliance
"Use EventArgs.Empty" (instead of ctor)
2022-07-15 09:34:52 +10:00
YoshiRulz 4f98733c29
Add Analyzer to enforce exception type for default switch branches 2022-07-14 23:46:34 +10:00
YoshiRulz a7db24490c
Enable BHI1002 and fix noncompliance
"Do not use anonymous types (classes)"
2022-07-14 04:26:28 +10:00
YoshiRulz 056db314d4
Enable BHI1001 and fix noncompliance
"Do not use anonymous delegates"
2022-07-14 04:26:27 +10:00
YoshiRulz 395aa0755b
Add `BizHawk.Analyzer` project 2022-07-14 04:26:27 +10:00
YoshiRulz 0405e6399d
Add `Meziantou.Analyzers` NuGet package 2022-07-14 04:26:27 +10:00
YoshiRulz 7bd74f1004
Enable SA1133 and fix noncompliance
multiple attributes applied in one expression
2022-03-08 15:52:40 +10:00
YoshiRulz c1a7556d7f
Enable SA1129 and fix noncompliance (except in Cores)
calling implicit default struct ctor
2022-03-08 15:52:40 +10:00
YoshiRulz 8c4ceccab9
Enable CA1825 and fix noncompliance (except in Cores)
`new int[0]` and similar
2022-03-08 15:52:40 +10:00
YoshiRulz 33a487452d
Enable CA1806 and fix noncompliance (except in Cores)
return value implicitly discarded
2022-03-08 15:52:38 +10:00
YoshiRulz d8ce0e6177
Enable CA1064 and fix noncompliance
Exception classes should be public
2022-03-08 15:52:38 +10:00
YoshiRulz 191f1f3020
Enable CA1044 and fix noncompliance
getters with lower visibility than setters, or set-only props
2022-03-08 15:52:37 +10:00
YoshiRulz dd455580d6
Enable some more Analyzer rules 2022-03-08 15:52:29 +10:00
YoshiRulz 04bf9d0ec2
Fix code style and increase SA1121 level to error 2021-08-02 19:17:31 +10:00
YoshiRulz 99260d2746
Add DocumentationAnalyzers from NuGet and fix syntax in docs 2021-07-27 14:53:04 +10:00
YoshiRulz 928ea057d8
Enable SA1137 and fix noncompliance (except in Cores)
"Elements should have the same indentation"
2020-11-30 21:36:48 +10:00
YoshiRulz 44fb9fa368
Enable SA1211
"Using alias directives should be ordered alphabetically by alias name"
2020-11-30 21:27:52 +10:00
YoshiRulz be36c60e9e
Enable SA1208 and fix noncompliance (except in Cores)
"System using directives should be placed before other using directives"
2020-11-30 21:26:36 +10:00
YoshiRulz 251d3f91df
Make omitting access modifiers (SA1400) an error 2020-10-01 22:41:35 +10:00
YoshiRulz bf3f037bd7
Enable SA1212 and fix non-compliance
"Property accessors should follow order" (setter should not come before getter)
2020-09-08 22:23:10 +10:00
YoshiRulz 0dd89de0d8
Enable SA1205 and fix non-compliance (except in Cores)
"Partial elements should declare access" (type decl. modifier not copied across
all parts)
2020-09-08 22:14:47 +10:00
YoshiRulz 5488c80f4d
Enable SA1400 and fix noncompliance (except in Cores)
"Access modifier should be declared"
2020-09-08 21:57:14 +10:00
YoshiRulz 17ff66c61b
Opt-in to .NET 5 SDK's extra static analysis, update Analyzer packages
the extra CSxxxx rules should be available for Framework too if using the new
SDK, I haven't tried
2020-08-29 00:51:34 +10:00
YoshiRulz ca646f87cf
Fix style problems, mainly docs 2020-07-08 02:17:31 +10:00
YoshiRulz c5f10187fc
Mute CA1030, CA1056, and CA2234
"Use events where appropriate" and some string->Uri nags
2020-06-30 14:37:40 +10:00
YoshiRulz f76f301f8d Enable SA1015 and fix noncompliance
"Closing generic brackets should be spaced correctly"
2020-06-20 21:31:16 -04:00
YoshiRulz 3c02545066 Enable SA1026 and fix noncompliance
"Code should not contain space after new or stackalloc keyword in implicitly
typed array allocation"
2020-06-20 21:31:16 -04:00
YoshiRulz 14e0c96fd8 Enable SA1121 and fix noncompliance
"Use built-in type alias"
2020-06-20 21:31:16 -04:00
YoshiRulz 0021cfee70 Enable SA1130 and fix noncompliance
"Use lambda syntax"
2020-06-20 21:31:16 -04:00
YoshiRulz 0a3cb5f23f Enable SA1410 and fix noncompliance
"Remove delegate parenthesis when possible"
2020-06-20 21:31:16 -04:00
YoshiRulz dcae34ce47 Enable SA1314 and fix noncompliance
"Type parameter names should begin with T"
2020-06-20 21:31:16 -04:00
YoshiRulz a8bd9733f4 Enable SA1626 and fix noncompliance
"Single-line comments should not use documentation style slashes"
2020-06-20 21:31:16 -04:00
YoshiRulz a1aca37476 Enable SA1617 and fix noncompliance
"Void return value should not be documented"
2020-06-20 21:31:15 -04:00
YoshiRulz 43cc80f6a3 Mess w/ doc comment warnings 2020-06-20 21:31:15 -04:00
YoshiRulz 8e414aea29
Enable CA1829 and fix noncompliance
"Use Length/Count property instead of Count() when available"
2020-06-18 09:44:01 +10:00
YoshiRulz 620e54580d
Enable CA1052 and fix noncompliance
"Static holder types should be Static or NotInheritable" (classes with only
static members should be static classes)
2020-06-18 09:43:57 +10:00
YoshiRulz 16d1782c9e
Enable CA1018 and fix noncompliance
"Mark attributes with AttributeUsageAttribute"
2020-06-18 09:43:53 +10:00
YoshiRulz 7f99dd95d6
Enable CA1010 and fix noncompliance
"Collections should implement generic interface"
2020-06-18 09:43:50 +10:00
YoshiRulz 8ca791852a
Enable MEN011 and fix noncompliance
"Align using directives"; this file had 2 BOM chars for some reason
2020-06-18 09:43:47 +10:00
YoshiRulz 3e5aa1a65f
Add Menees.Analyzers and update FxCop 2020-05-26 17:22:20 +10:00