Mailglass.Credo.NoPlanningArtifactComments (Mailglass v1.9.0)

Copy Markdown View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

This check has a base priority of high and works with any version of Elixir.

Explanation

Planning-artifact tokens are not allowed in source comments/docstrings. Use behavior-focused rationale instead of workflow/provenance markers.

Check-Specific Parameters

Use the following parameters to configure this check:

:banned_patterns

Regex list of disallowed planning-artifact tokens.

This parameter defaults to [~r/\bD-\d{1,3}\b/, ~r/\bPhase\s+\d+(?:\.\d+)?\b/, ~r/\bPlan\s+\d+(?:\.\d+)?\b/, ~r/\[ASSUMED[^\]]*\]/, ~r/\bREQ-[A-Z0-9-]+\b/, ~r/\bGSD\b/].

:docstring_banned_patterns

Extra patterns enforced in docstrings only (not comments) — bare CATEGORY-NN REQ-IDs.

This parameter defaults to [~r/\b(?:T-)?(?:STATE-LD|AUTHOR|CORE|CR|DATA|DELIV|DOCS|HI|HOOK|IADM|IDEMP|IN|IOPS|ITEST|LD|LIB|LINT|MAIL|ME|MIME|PII|PREV|RATE|REL|RELH|SESI|SUPP|TELE|TENANT|TEST|TOKEN|TRACK|TRANS|UNSUB|WR|PERSIST)-\d{1,3}\b/].

:included_path_prefixes

Only files in these path prefixes are linted.

This parameter defaults to ["lib/mailglass/", "mailglass_admin/lib/", "mailglass_inbound/lib/"].

:allowed_literals

Exact literal matches that are intentionally allowed.

This parameter defaults to [].

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.