Skip to content

Coding Standards

Coding standards define the engineering rules your code must follow and why. Linked validators check those rules against the codebase and report violations.

A standard brings the rule, its reasoning and supporting examples together.

PartWhat it defines
Code and titleThe standard’s identity.
RuleThe required engineering practice or constraint.
ReasoningWhy the rule exists, with optional context and consequences.
ExamplesCorrect and incorrect code, with explanations.
Related standardsLinks to related rules and the standard this one supersedes.
StateMeaning
DraftAvailable for authoring; not enforced.
ActivePublished and available for enforcement through its enabled validators.
DeprecatedRetained for reference; no longer binding.

Edits preserve earlier versions. Standards and validators have separate version histories, so a rule’s explanation and its checks can evolve independently. Owners and administrators can edit, publish and deprecate standards; members can read them.

Each validator performs one check. A standard can have several validators, each with its own scope and configuration.

SettingWhat it controls
CheckThe condition the code must satisfy.
File scopeWhich file paths to include or exclude.
SeverityWhether a violation is an error, warning or informational result.
MessageThe explanation reported when the check fails.
Fix guidanceInstructions and examples for correcting a violation.
EnabledWhether the validator participates in validation.
AreaChecks
Files and structureRequired or prohibited files, directory layout and naming conventions.
Code contentRequired or prohibited patterns and file length limits.
DependenciesImport restrictions, module boundaries and circular dependencies.
ContractsSchema fields, indexes, function return types and exports.
TestsTest placement and assertion patterns.

Validation reports identify the violated rule, severity and affected code, with locations where available. The checks configured for a workflow determine how those results affect progression.

Repository-authored rules include proof cases that demonstrate both a violation and compliant code. This establishes that a check can detect the problem it describes.