Skip to content

VBC-042: too-many-comments

warning

Category: clean-code
Analysis: Regex (whole file)
File types: .js, .ts, .tsx, .py, .astro
Scope: the whole file, with no scope filtering
Tags: clean-code

What it reports

Too many consecutive comment lines at line {line}. Code should be self-documenting.

Flagged

js
const answer = 42;
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line
// filler comment line

Not flagged

js
// one explanatory comment
const answer = 42;
js
// ─────────────────────────────
// Wasm Core Bridge
//
// Lazy-loads the Rust module.
// All functions go through this singleton.
//
// Usage:
//   import { core } from './bridge';
//   const c = await core();
//
// ─────────────────────────────
import { core } from './bridge';

Pattern

regex
(?:^[ \t]*//.*\n){10,}

Released under the MIT License.