Skip to content

Commit

Permalink
Clarify forbidden pattern explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Dec 28, 2023
1 parent 03caf77 commit 810b009
Showing 1 changed file with 42 additions and 41 deletions.
83 changes: 42 additions & 41 deletions .github/actions/spelling/line_forbidden.patterns
Expand Up @@ -3,14 +3,15 @@
# and [Qt](https://github.com/qtproject/qt-solutions/blame/fb7bc42bfcc578ff3fa3b9ca21a41e96eb37c1c7/qtscriptclassic/src/qscriptbuffer_p.h#L46)
#\bm_data\b

# Were you debugging using a framework with `fit()`?
# If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test,
# you might not want to check in code where you were debugging w/ `fit()`.
# you might not want to check in code where you skip all the other tests.
#\bfit\(

# s.b. anymore
# Should be `anymore`
\bany more[,.]

# s.b. `cannot` (or `can't`)
# Should be `cannot` (or `can't`)
# See https://www.grammarly.com/blog/cannot-or-can-not/
# > Don't use `can not` when you mean `cannot`. The only time you're likely to see `can not` written as separate words is when the word `can` happens to precede some other phrase that happens to start with `not`.
# > `Can't` is a contraction of `cannot`, and it's best suited for informal writing.
Expand All @@ -19,118 +20,118 @@
# - if you encounter such a case, add a pattern for that case to patterns.txt.
\b[Cc]an not\b

# s.b. GitHub
# Should be `GitHub`
(?<![&*.]|// |\btype )\bGithub\b(?![{)])

# s.b. GitLab
# Should be `GitLab`
(?<![&*.]|// |\btype )\bGitlab\b(?![{)])

# s.b. JavaScript
# Should be `JavaScript`
\bJavascript\b

# s.b. macOS or Mac OS X or ...
# Should be `macOS` or Mac OS X or ...
\bMacOS\b

# s.b. Microsoft
# Should be `Microsoft`
\bMicroSoft\b

# s.b. OAuth
# Should be `OAuth`
(?:^|[^-/*$])[ '"]oAuth(?: [a-z]|\d+ |[^ a-zA-Z0-9:;_.()])

# s.b. TypeScript
# Should be `TypeScript`
\bTypescript\b

# s.b. another
# Should be `another`
\ban[- ]other\b

# s.b. case-(in)sensitive
# Should be `case`-(in)sensitive
\bcase (?:in|)sensitive\b

# s.b. deprecation warning
# Should be `deprecation` warning
\b[Dd]epreciation [Ww]arnings?\b

# s.b. greater than
# Should be `greater` than
\bgreater then\b

# s.b. in front of
# Should be `in` front of
\bin from of\b

# s.b. into
# Should be `into`
# when not phrasal and when `in order to` would be wrong:
# https://thewritepractice.com/into-vs-in-to/
\sin to\s(?!if\b)

# s.b. is obsolete
# Should be `is` obsolete
\bis obsolescent\b

# s.b. it's or its
# Should be `it`'s or its
\bits['’]

# s.b. opt-in
# Should be `opt`-in
(?<!\sfor)\sopt in\s

# s.b. less than
# Should be `less` than
\bless then\b

# s.b. one of
# Should be `one` of
\bon of\b

# s.b. otherwise
# Should be `otherwise`
\bother[- ]wise\b

# s.b. or (more|less)
# Should be `or` (more|less)
\bore (?:more|less)\b

# s.b. rather than
# Should be `rather` than
\brather then\b

# s.b. `regardless, ...` or `regardless of (whether)`
# Should be `regardless, ...` or `regardless of (whether)`
\b[Rr]egardless if you\b

# s.b. nonexistent
# Should be `nonexistent`
\bnon existing\b

# s.b. nonexistent
# Should be `nonexistent`
\b[Nn]o[nt][- ]existent\b

# s.b. brief / details/ param / return / retval
# Should be `brief` / `details` / `param` / `return` / `retval`
(?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b

# s.b. preexisting
# Should be `preexisting`
[Pp]re[- ]existing

# s.b. preempt
# Should be `preempt`
[Pp]re[- ]empt\b

# s.b. preemptively
# Should be `preemptively`
[Pp]re[- ]emptively

# s.b. recently changed or recent changes
# Should be `recently changed` or `recent changes`
[Rr]ecent changed

# s.b. reentrancy
# Should be `reentrancy`
[Rr]e[- ]entrancy

# s.b. reentrant
# Should be `reentrant`
[Rr]e[- ]entrant

# s.b. understand
# Should be `understand`
\bunder stand\b

# s.b. workarounds
# Should be `workarounds`
\bwork[- ]arounds\b

# s.b. workaround
# Should be `workaround`
(?:(?:[Aa]|[Tt]he|ugly)\swork[- ]around\b|\swork[- ]around\s+for)

# s.b. (coarse|fine)-grained
# Should be `(`coarse|fine)-grained
\b(?:coarse|fine) grained\b

# s.b. neither/nor -- or reword
# Should be `neither/nor` -- or reword
\bnot\b[^.?!"/(]+\bnor\b

# probably a double negative
# s.b. neither/nor (plus rewording the beginning)
# Should be `neither/nor` (plus rewording the beginning)
# This is probably a double negative...
\bnot\b[^.?!"/]*\bneither\b[^.?!"/(]*\bnor\b

# In English, duplicated words are generally mistakes
Expand Down

0 comments on commit 810b009

Please sign in to comment.