Skip to content

Text · maintainability

config-comment-wall

text:config-comment-wall

four-entry config narration wall with 75% weak restatements

Code
SARJ300
Default
error
Fix
none
Languages
config

Why

Repeated comments that merely narrate adjacent configuration hide constraints and make the file harder to scan.

Fix

Name configuration entries clearly and keep comments only for constraints or rationale.

Before / after

Executed by this rule’s unit tests.

Before

Repeated comments restate adjacent entries

workflow.yml · focus
# Set build name
name: build
# Run build command
run: make build
# Set deploy image
image: app
# Run deploy command
command: deploy

After

Clear entries need no narration

workflow.yml · focus
name: build
run: make build
image: app
command: deploy

Limits

  • Only groups of attached standalone comments at the same indentation level are compared.

Files

**/*.{yaml,yml,toml,jsonc,ini,cfg,conf,properties,sh,zsh,bash}