| version | downloads | package |
|---|---|---|
| Qowaiv.Analyzers.CSharp |
Contains Roslyn (static code) diagnostic analyzers.
- QW0001 - Use a testable Time Provider
- QW0003 - Decorate pure functions
- QW0004 - Characters with Trojan Horse potential are not allowed
- QW0005 - Seal concrete classes unless designed for inheritance
- QW0006 - Only unsealed concrete classes should be decorated as inheritable
- QW0007 - Use file-scoped namespace declarations
- QW0008 - Define properties as not-nullable for types with a defined empty state
- QW0009 - Define properties as not-nullable for enums with a defined none/empty value
- QW0010 - Use System.DateOnly instead of Qowaiv.Date
- QW0011 - Define properties as immutables
- QW0012 - Use immutable types for properties
- QW0013 - Use Qowaiv decimal rounding
- QW0014 - Define global using statements separately
- QW0015 - Define global using statements in single file
- QW0016 - Prefer regular over positional properties
- QW0017 - Apply arithmetic operations on non-nullables only
- QW0018 - Use Qowaiv.Clock.TimeProvider
- QW0019 - Prefer XML to LINQ over DOM
- QW0020 - Prefer System.Text.Json over Newtonsoft.Json
- QW0021 - Use leading zeros to define date constants
- QW0022 - Use compliant GUID literals
- QW0023 - Provide GUID values
- QW0024 - Create GUID's using Guid.Parse or Guid.Empty
- QW0025 - Use compliant UUID literals
- QW0026 - Provide UUID values
- QW0027 - Create UUID's using Uuid.Parse or Uuid.Empty
- QW0028 - Prefer strongly typed identifiers over GUIDs
- QW0029 - Prefer strongly typed identifiers over primitives
- QW0100 - Define only one Required attribute
- QW0101 - Required attribute cannot invalidate value types
- QW0102 - Use compliant validation attributes
- QW0103 - Decorate validation attributes
- QW0104 - Use validates attribute on validation attributes only
- Use Qowaiv.Clock (QW0001, S6354)
- Seal class (QW0005)
- Change property type to not-nullable (QW0008, QW0009)
- Change type System.DateOnly (QW0010)
- Apply suggestions of obsolete code attribute CS0618, CS0619)
- Use Qowaiv round extensions (QW0013)
- Convert positional properties (QW0016)
- Use Qowaiv.Clock.TimeProvider (QW0018)
- Add leading zero(s) (QW0021)
- Generate GUIDs (QW0022, QW0023, QW0024)
- Generate UUIDs (QW0025, QW0026, QW0027)
Some of the rules are not intended for (unit) test code. Unit tests that set
IsTestProject to true are excluded. When setting IsTestProject is undesirable,
a project can set IsTestCode to true instead. It is worth to
mention that only a subset of the rules is considered irrelevant for test code,
the rest is always executed.
