Skip to content

ALL-STRI0002 · decorative_repeated_separator_count

Find fixed repeated-string expressions used as decorative separators.

This is a deterministic rule for all languages. Read its implementation.

Report multiplication of a nonempty punctuation-only string literal by a fixed integer at or above minimum_repetitions. Recognize either operand order and a conservative set of common separator characters. Prefer a semantic heading, structured logger field, or natural spacing instead of manufacturing a visual rule whose width carries no program meaning.

Each finding records the expression range, separator literal, and fixed repetition count. The value is the number of decorative separator expressions.

Alphanumeric strings, whitespace, control bytes, variable counts, and repetitions below the threshold are excluded because they may encode data, padding, or a protocol requirement.

logger.info("-" * 30)
banner = 12 * "="
logger.info("Dependency checks")
padding = "0" * width
  • Cites “The Python Language Reference”, binary arithmetic operations and sequence repetition. Open reference
  • Cites “Python HOWTOs”, structured contextual logging. Open reference