Skip to content

Example descriptions are incorrectly linted as being in non-infinitive form #299

@gutjuri

Description

@gutjuri

tldr-lint rejects all example descriptions that start with a verb ending in e.g. as:

tldr-lint/tldr.l

Lines 155 to 160 in b5c5a7f

// Try to ensure that verbs at the beginning of the description are in the infinitive tense
// 1. Any word at the start of a sentence that ends with "ing" and is 6 or more characters long (e.g. executing, writing) is likely a verb in the gerund
// 2. Any word at the start of a sentence that doesn't end with "us", "ss", or "ys" (e.g. superfluous, success, always) is likely a verb in the present tense
if (yytext.match(/(^[A-Za-z]{3,}ing )|(^[A-Za-z]+[^usy]s )/)) {
yy.error(yylloc, 'TLDR104');
}

This causes the (infinitive) example description Antialias an image...: to be incorrectly rejected.

See tldr-pages/tldr#12198 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions