PassiveVoiceRule.h header

#include <ew/app/PassiveVoiceRule.h>

Namespace ew::app

PassiveVoiceRule class

class ew::app::PassiveVoiceRule

Flags likely passive-voice constructions: a form of "to be" followed (optionally across "not" or an adverb) by a past participle. Participles are recognised from a curated irregular list or as a word ending in "ed" long enough to exclude short words like "red". This is a heuristic and errs toward flagging; the fix is a rewrite to active voice, so no replacement is offered.

Members

ew::app::PassiveVoiceRule::PassiveVoiceRule()

Constructs the rule and compiles its passive-voice pattern.

QString ew::app::PassiveVoiceRule::id() const override

A stable identifier for this rule (e.g. "repeated-word"), used to enable or disable it in a profile and to refer to it in tests.

StyleCategory ew::app::PassiveVoiceRule::category() const override

The category of issue this rule reports.

std::vector< StyleDiagnostic > ew::app::PassiveVoiceRule::analyze(QStringView text) const override

Returns every issue this rule finds in text, with offsets measured into text.