Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gutjuri opened this issue Feb 5, 2024 · 0 comments
Labels

Comments

@gutjuri
Copy link
Member

gutjuri commented Feb 5, 2024

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)

@kbdharun kbdharun added the bug label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants