OptimumCredo.Check.Readability.LlmScaffoldingComment (OptimumCredo v0.5.0)

View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

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

Explanation

Remove assistant chatter and scaffolding before review; comments should explain why.

Bad: # Here's the updated function with error handling Good: # Retries once because the upstream API drops idle connections

Check-Specific Parameters

Use the following parameters to configure this check:

:patterns

Case-insensitive regex sources matched against comment text.

This parameter defaults to ["^(here'?s|here is|here are) (the |an? |your )?(updated|revised|fixed|complete|final|new|modified|refactored|corrected|improved|implementation|code|solution|function)\\b", "^(certainly|sure|of course|absolutely)[!,.]", "\\bas an ai\\b", "^(i'?ve|i have) (added|updated|created|fixed|implemented|removed|refactored)\\b", "^let me\\b", "\\b(rest|remainder) of (the )?(code|file|function|module|implementation)\\b.*\\b(remains?|unchanged|same|here)\\b", "^\\.{3}\\s*(existing|rest of|previous|other)\\b", "\\b(generated|written|created|authored) (by|with) (claude|chatgpt|gpt|copilot|cursor|an? ai|ai)\\b", "\\b(implementation|code|logic) (goes|should go|belongs) here\\b", "\\byour (code|implementation|logic) here\\b"].

:extra_patterns

Additional regex sources, appended to patterns.

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.