class

Flaw::ExplanatoryComment

Inherits Flaw::Rule < Reference < Object

FLAW100 — AI-slop tell: narration-style comments explaining obvious code. Typical of pasted LLM output: "This function does X", "Here we loop", "Now we check if Y". Real engineers rarely write these; well-named identifiers already carry the intent.

Constants

LEADERS = [/^\s*#\s*(This (function|method|class|module|code|block|loop|line|variable|test))\b/i, /^\s*#\s*(Here we|Here's|Now we|First,? we|Next,? we|Then we|Finally,? we|We will|We'll)\b/i, /^\s*#\s*(The purpose of (this|the)|The following|Note that|Please note|Keep in mind)\b/i, /^\s*#\s*(Initialize the|Create (a|the) new|Set (a|the|up) |Loop through|Iterate over|Check if)\b/i]

Instance methods

check(source : String, path : String) : Array(Finding)
Source
default_severity
Source
description
Source
tag

Category for grouping in flaw rules output and the README catalog. Override in rule subclasses. Default: "security".

Source
title
Source