Lint Catalog
Accepted
Accepted for V1 cross-domain lint identities and advisory suggested policy. Lint engine configuration, suppression, autofixes, and project integration are deferred to CEP-0044: First-Class Lint Engine.
This catalog owns lint identity for the design wiki. Topic pages may say a pattern is lintable and link here, but they should not make lint policy part of source validity.
Lints are optional tooling findings. They are not hard compiler errors, do not define whether a Catalyst program is semantically valid, and may be disabled, elevated, or ignored by a project or toolchain. A suggested severity of error means a future linter profile may fail the build when the lint is enabled; it does not mean the core compiler rejects the program.
Suggested severities:
| Severity |
Meaning |
off |
Known lint candidate, not recommended in the default profile. |
info |
Low-risk readability or documentation hint. |
warn |
Suspicious or unstable API shape; recommended default warning. |
error |
Very likely bug; recommended default build-failing lint when linting is enabled. |
Autofix values:
| Value |
Meaning |
yes |
A mechanical fix should usually be possible. |
maybe |
A fix may be possible with enough semantic context or user choice. |
no |
The finding needs design or code changes. |
Ownership
| ID |
Suggested |
Autofix |
Description |
Source |
ownership/missing-cleanup |
warn |
maybe |
A resource-like value may leave its local lifetime without explicit cleanup or ownership transfer. |
resources |
ownership/live-overwrite |
warn |
maybe |
Assignment overwrites a resource-like value that appears still live. |
resources |
ownership/use-after-cleanup |
error |
no |
A resource-like binding is used after an observed cleanup call. |
resources |
ownership/double-cleanup |
error |
no |
A resource-like binding appears to be cleaned more than once. |
resources |
ownership/move-with-active-defer |
error |
maybe |
A binding is moved while a deferred cleanup expression still targets that place. |
resources |
ownership/const-resource-binding |
warn |
maybe |
A const resource-like binding cannot normally call Disposable.dispose(self: *Self). |
resources |
ownership/resource-loop-item-exit |
warn |
maybe |
A value-yielding loop item that appears resource-like exits through continue, break, return, or error propagation while still live. |
resources |
ownership/aggregate-resource-without-disposable |
warn |
maybe |
A public or long-lived aggregate contains resource-like fields but does not provide Disposable. |
resources |
ownership/copyable-disposable |
warn |
no |
A public copyable type implements Disposable without clearly documenting independent cleanup per copy. |
resources |
ownership/dispose-borrowed-box-payload |
error |
no |
Code calls Disposable.dispose through a borrowed dynamic pointer to a payload still owned by a Box. |
box |
ownership/allocator-authority-escape |
warn |
no |
An owning value may outlive borrowed allocator authority it needs for cleanup. |
box |
ownership/discarded-resource |
warn |
maybe |
A resource-like value is ignored with _ or discarded without explicit cleanup or transfer. |
destructuring |
ownership/unclear-ownership-api |
info |
no |
A public API has unclear ownership vocabulary or convention. |
references |
API Surface
| ID |
Suggested |
Autofix |
Description |
Source |
api/public-inferred-signature |
warn |
maybe |
A public API relies on inferred success or error types. |
error returns |
api/public-inferred-error-set |
warn |
maybe |
A public API uses inferred error-set syntax, making the public contract drift with implementation. |
error returns |
api/public-top-error-inference |
warn |
maybe |
Public inference resolves to top Error without spelling T!Error explicitly. |
error returns |
api/implicit-comptime-only-function |
warn |
maybe |
An ordinary fn infers a comptime-only success type; spell comptime fn or an explicit runtime return type. |
error returns |
api/inferred-c-abi-surface |
warn |
maybe |
An exported C ABI declaration relies on inferred source signature details. |
error returns |
api/missing-public-docs |
warn |
no |
A public documentable item lacks docs. |
comments |
api/public-contract-missing-laws |
warn |
no |
A public semantic contract omits law documentation. |
contracts |
Errors
| ID |
Suggested |
Autofix |
Description |
Source |
errors/unnecessary-fallible-empty-error |
warn |
maybe |
A fallible T!(error {}) or inferred empty error set is equivalent to no possible errors but keeps fallible shape. |
error types |
errors/public-anonymous-error-set |
warn |
maybe |
Public API exposes anonymous error sets or anonymous error-set operands. |
error types |
errors/unaddressable-duplicate-anonymous-cases |
error |
maybe |
A union of anonymous error sets has same-text cases that callers cannot qualify. |
error types |
errors/confusing-case-name |
warn |
maybe |
An error case matches its owner or an imported type-like name such as Error. |
error types |
errors/broad-error-collapse |
info |
no |
Error handling collapses specific failures into a broad Error shape in a strict profile. |
handling |
Modules and Imports
| ID |
Suggested |
Autofix |
Description |
Source |
modules/import-order |
info |
yes |
Imports or namespace wiring appear after ordinary declarations instead of the file top. |
imports |
modules/dependency-alias-mismatch |
info |
no |
A manifest dependency alias and package name mismatch without clear disambiguation. |
module roots |
modules/unused-dependency |
info |
maybe |
A manifest dependency is resolved but never used by source. |
module roots |
References and Slices
| ID |
Suggested |
Autofix |
Description |
Source |
references/suspicious-slice-descriptor |
warn |
no |
Manual slice pointer/length construction or mutation appears likely invalid. |
arrays and slices |
references/borrowed-pointer-escape |
warn |
no |
A borrowed pointer appears stored beyond a likely lifetime boundary. |
references |
Loops and Iteration
| ID |
Suggested |
Autofix |
Description |
Source |
loops/mutated-temporary-source |
warn |
no |
A loop mutates a temporary receiver whose mutation is discarded at loop exit. |
iterator loop sources |
loops/iterable-and-iterator |
warn |
no |
A concrete type implements both Iterable(Item) and Iterator(Item) without documenting why it is both source and iterator state. |
iterator loop sources |
Ranges
| ID |
Suggested |
Autofix |
Description |
Source |
ranges/inferred-narrow-endpoints |
warn |
maybe |
A range relies on fallback endpoint inference to choose a narrow primitive integer type; spell the range or loop item type explicitly when a wider endpoint type is intended. |
arrays and slices |
Optionals
| ID |
Suggested |
Autofix |
Description |
Source |
optional/bool-presence-test |
warn |
maybe |
?bool is tested for presence where readers may expect payload truth. |
optional |
optional/void-binding |
info |
maybe |
Optional binding introduces a useless void payload binding. |
first-class linting |
optional/field-presence-confusion |
warn |
no |
Field optional presence checks appear to use the field as if it were narrowed. |
first-class linting |
Style and Naming
| ID |
Suggested |
Autofix |
Description |
Source |
style/naming-convention |
info |
maybe |
Identifier, file, directory, module, enum case, or acronym spelling does not follow the naming guide. |
naming |
style/capability-parameter-order |
info |
maybe |
Capability-like parameters are ordered in a surprising way for local convention. |
functions |
style/unused-binding |
info |
maybe |
A normal binding, including _name, appears intentionally unused but is not the ignore pattern _. |
destructuring |
style/discarded-meaningful-value |
warn |
maybe |
A non-void value is discarded without assigning it to _. |
blocks |
style/redundant-arrow-block |
info |
yes |
An expression-bodied function uses => with a block expression where a direct block body would be clearer. |
functions |
style/redundant-arrow-return |
info |
yes |
An expression-bodied function uses => return expr where => expr would be clearer. |
functions |
style/doc-markup |
info |
no |
Documentation markup has syntax or rendering issues. |
comments |
Contracts and Dispatch
| ID |
Suggested |
Autofix |
Description |
Source |
contracts/static-dyn-surface-split |
warn |
no |
A public contract repeatedly guards static-only vs dynamic-only surfaces and may be two interfaces. |
contracts |
contracts/redundant-component |
info |
yes |
A contract intersection redundantly spells duplicate or implied components. |
composition |
contracts/implicit-default-method-shadow |
info |
maybe |
An inherent member matches a default contract method name/signature but does not explicitly override it. |
implementations |
contracts/empty-operation-body |
warn |
maybe |
A contract operation has an empty {} body; if a required operation was intended, remove the braces. |
contracts |
Interop, Attributes, and Realtime
| ID |
Suggested |
Autofix |
Description |
Source |
interop/redundant-export-callconv |
info |
yes |
@export(.c) is paired with an explicit matching @callconv(.c). |
prelude attributes |
interop/duplicate-import |
info |
maybe |
Duplicate visible C imports have the same link name and same type. |
C ABI interop |
attributes/order-dependence |
info |
no |
Stacked attributes depend on source order in a way that may surprise readers. |
attributes |
realtime/hidden-operational-dependency |
warn |
no |
A function intended for realtime or restricted execution uses allocation, blocking IO, hidden dispatch, or other operational capabilities unexpectedly. |
realtime |
Deferred Engine Behavior
The full lint engine is deferred. CEP-0044 owns:
- configuration format and profile selection
- source-level suppression
- generated-code behavior
- autofix representation
- LSP/editor reporting
- whether suggested severities become defaults in a reference profile