Skip to content

Static code analysis rules #5

Description

@einari

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<>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions