More rules - add good descriptive texts for humans and LLMs to know how to fix things when an error / warnings occurs.
CRARCH0027: ConceptAs must have a static readonly NotSet sentinel
Warn when a record inheriting ConceptAs lacks a static readonly field named "NotSet" or "Empty" or similar. Backed by a value, typically zero: Guid.Empty, string.Empty, or 0.
CRARCH0028: Guid-backed identity concept must have a static New() factory
Warn when a record inheriting ConceptAs lacks a static method named New() returning the concept type.
CRARCH0029: Avoid using primitive types - wrap in ConceptAs<>
Avoid using primitive types such as int, Guid, string - wrap them using ConceptAs<>
More rules - add good descriptive texts for humans and LLMs to know how to fix things when an error / warnings occurs.
CRARCH0027: ConceptAs must have a static readonly NotSet sentinel
Warn when a record inheriting ConceptAs lacks a static readonly field named "NotSet" or "Empty" or similar. Backed by a value, typically zero: Guid.Empty, string.Empty, or 0.
CRARCH0028: Guid-backed identity concept must have a static New() factory
Warn when a record inheriting ConceptAs lacks a static method named New() returning the concept type.
CRARCH0029: Avoid using primitive types - wrap in ConceptAs<>
Avoid using primitive types such as int, Guid, string - wrap them using ConceptAs<>