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. No fix is offered: recasting a passive clause needs its agent, which is often absent, so the correction belongs to the writer or the assistant.

Members

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

Constructs the rule and compiles its passive-voice pattern.

QString ew::app::style::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::style::PassiveVoiceRule::category() const override

The category of issue this rule reports.

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

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