Linting & Style Enforcement
Linting Coverage
Summary
Every language with suitable maintained tooling is checked by a documented and discoverable linter, with generated code excluded by default.
Standards
std-code-linting-coverage-01Each language in use within a codebase, including one used to define infrastructure or a pipeline, MUST be checked by an appropriate automated linter where a maintained one is available.std-code-linting-coverage-02Generated code SHOULD be excluded from linting scope.std-code-linting-coverage-03An established, actively maintained linter SHOULD be preferred over a custom-built or unmaintained one for a language it already covers.std-code-linting-coverage-04The linters in use for a codebase MUST be documented and discoverable, such as through a repository'sREADMEor a location linked from it.
Related Standards
Implements These Principles
Linter Configuration
Summary
A linter's ruleset is version-controlled configuration, applied identically wherever linting runs.
Standards
std-code-linter-configuration-01A linter's ruleset MUST be defined as version-controlled configuration, whether declared directly within the codebase it governs or extended from a version-controlled shared baseline.std-code-linter-configuration-02The same effective ruleset MUST be applied wherever linting runs, whether locally, at pre-commit, or in the delivery pipeline.std-code-linter-configuration-03A linter's default ruleset SHOULD be adopted wherever it meets a codebase's needs; a customisation SHOULD be added only where an actual need justifies it.
Implements These Principles
Local Lint Detection
Summary
A lint violation is available locally through an IDE or pre-commit hook before a change is submitted for review.
Standards
std-code-local-lint-detection-01Linting SHOULD be available to run locally, through IDE integration, or as a pre-commit hook, so a violation is visible before a change is submitted for review.std-code-local-lint-detection-02A local lint run SHOULD check only the files affected by a change where practical to keep local feedback fast.
Implements These Principles
Existing Violation Baseline
Summary
A pre-existing violation may be baselined when a linter is adopted and remains tracked for remediation as technical debt.
Standards
std-code-existing-violation-baseline-01Adopting a linter or a new rule on an existing codebase MAY treat its existing violations as a baseline, recorded either as an explicit exception list or as a fixed point in the codebase's history.std-code-existing-violation-baseline-02A violation introduced after a baseline is established, whether as an exception list or a fixed point in the codebase's history, MUST NOT be treated as baselined.std-code-existing-violation-baseline-03A baselined violation SHOULD be tracked and remediated as technical debt.
Implements These Principles
Linting Pipeline Gate
Summary
A lint check runs in the delivery pipeline, where classified severity determines whether a violation advises or blocks progression and an unclassified rule remains advisory.
Standards
std-code-linting-pipeline-gate-01A lint check MUST run as part of the delivery pipeline.std-code-linting-pipeline-gate-02Each lint rule MUST be classified by severity, where supported by the linter, distinguishing a violation that must block progression from one that is advisory only.std-code-linting-pipeline-gate-03A lint rule not classified by severity MUST be treated as advisory only.std-code-linting-pipeline-gate-04A change MUST NOT merge or deploy while a non-baselined violation at blocking severity remains outstanding.
Implements These Principles
Lint Suppressions & Exceptions
Summary
A lint suppression is scoped to one line and rule, documents its reason, receives normal review scrutiny, and is version-controlled where maintained in a list.
Standards
std-code-lint-suppressions-exceptions-01A lint violation MUST NOT be suppressed by disabling a rule broadly, such as file-wide or project-wide, to silence a single occurrence.std-code-lint-suppressions-exceptions-02A suppression MUST be scoped to the narrowest location and rule supported by the linter.std-code-lint-suppressions-exceptions-03A suppression MUST include a documented reason.std-code-lint-suppressions-exceptions-04A suppression MUST receive the same review scrutiny as the change it appears in.std-code-lint-suppressions-exceptions-05A suppression or exception list held in a dedicated file MUST be version-controlled within the codebase it applies to.
Related Standards
Implements These Principles
Lint Ruleset Governance
Summary
A linting ruleset change receives the same review as a code change, and the ruleset is periodically reviewed and cannot be weakened unilaterally for a specific failure.
Standards
std-code-lint-ruleset-governance-01A change to the adopted ruleset, including adding, removing, or weakening a rule, MUST go through the same review process required for a code change.std-code-lint-ruleset-governance-02A ruleset MUST NOT be weakened unilaterally to let a specific failing change pass.std-code-lint-ruleset-governance-03The ruleset SHOULD be reviewed periodically, so it stays current with the codebase's adopted conventions and evolving engineering practice.