Commit Graph

18 Commits

Author SHA1 Message Date
YoshiRulz e89ba513c0
Add Analyzer to suggest `span.IsEmpty` over `span.Length is 0` 2025-08-08 13:57:50 +10:00
YoshiRulz d9a42ff3db
Add Analyzer to ban `override bool Equals(object?)` on `ref struct`s
It's pointless to call this method, and when you omit it the compiler
tries to emit a call to the base method which is a simple build error.
Also ban overriding `GetHashCode`, because I don't think that's useful
outside of hash tables (which you obvously can't use ref structs in),
and implementing one without the other is a bad practice anyway and will
be picked up by another Analyzer.
2025-08-08 13:57:43 +10:00
YoshiRulz 0743a1f8ea
Add Analyzer for banning `init;` props
turns out you can write to `readonly` fields from these, which is a
convention I'm not willing to break
2025-07-30 03:35:45 +10:00
YoshiRulz ca0ddeffef
Improve highlight locations of some BizHawk.Analyzer diagnostics 2025-03-20 07:35:47 +10:00
YoshiRulz 8d71c8a505
Add Analyzer for suggesting adding `checked` operators 2025-02-22 17:07:35 +10:00
YoshiRulz 6eef3668a7
Unify `BizHawk.Analyzer` failures into a dedicated diagnostic rule
will rebuild in later commit
2025-02-22 16:22:03 +10:00
YoshiRulz 507b30a1dc
Use global imports in Analyzer projects 2025-02-22 11:15:18 +10:00
YoshiRulz af32948756
Add Analyzer to warn about LINQ calls on string receivers 2025-01-31 14:49:40 +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 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 3a3f567dad
Fix copy-pasted method name 2024-09-14 02:44:08 +10:00
YoshiRulz c09f195148
Fix bug in `HawkSourceAnalyzer` 2024-07-12 23:27:29 +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 2ffb897b11
Add analyzer (currently disabled) to enforce a newline policy for `=>` 2024-07-07 15:32:31 +10:00
YoshiRulz da7331632d
Enable MA0136 (protects against accidental CRLFs) 2024-07-04 07:23:24 +10:00
YoshiRulz 57b5e77712
Add unit tests for first-party Analyzers 2024-07-02 05:59:31 +10:00