redline
LowAI tellsstep-comment

Numbered step comments

Numbered step comments. A numbered step comment (// Step 1:). The code already runs in order.

This is how the comment reads inline, under the flagged line.

Why it matters

// Step 1:, // Step 2: scaffolding is a tutorial habit. It goes stale when a step is added and hides the one comment that matters.

What to do

Delete the step labels. If the steps are real units, make them functions with names.

Examples

Flagged
// Step 1: load
const a = load();
// Step 2: save
save(a);
Better
save(load());

What it catches

It reads a pattern on each line, aware of strings and comments. Languages: Any file. Scope: All files. These cases are the rule's own tests: the first set must be flagged and the second must not.

Flagged

// Step 1: load the file
const a = 1;
# step 2) parse

Left alone

// Steps are retried by the queue.

Research

Comments and docstrings that repeat the next line, the function name or the structure ("Step 1", "This function handles"). The reader learns nothing, and the comment drifts out of date when the code changes.

Turn it off or change it

In a config file for the CLI, or in the API's rules field:

{
  "rules": {
    "disable": [
      "step-comment"
    ],
    "severity": {
      "step-comment": "medium"
    }
  }
}

Read the source or report a false positive.