line_forbidden.patterns 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. # reject `m_data` as VxWorks defined it and that breaks things if it's used elsewhere
  2. # see [fprime](https://github.com/nasa/fprime/commit/d589f0a25c59ea9a800d851ea84c2f5df02fb529)
  3. # and [Qt](https://github.com/qtproject/qt-solutions/blame/fb7bc42bfcc578ff3fa3b9ca21a41e96eb37c1c7/qtscriptclassic/src/qscriptbuffer_p.h#L46)
  4. #\bm_data\b
  5. # Were you debugging using a framework with `fit()`?
  6. # If you have a framework that uses `it()` for testing and `fit()` for debugging a specific test,
  7. # you might not want to check in code where you skip all the other tests.
  8. #\bfit\(
  9. # English does not use a hyphen between adverbs and nouns
  10. # https://twitter.com/nyttypos/status/1894815686192685239
  11. (?:^|\s)[A-Z]?[a-z]+ly-(?=[a-z]{3,})(?:[.,?!]?\s|$)
  12. # Don't use `requires that` + `to be`
  13. # https://twitter.com/nyttypos/status/1894816551435641027
  14. \brequires that \w+\b[^.]+to be\b
  15. # A fully parenthetical sentence’s period goes inside the parentheses, not outside.
  16. # https://twitter.com/nyttypos/status/1898844061873639490
  17. #\([A-Z][a-z]{2,}(?: [a-z]+){3,}\)\.\s
  18. # Complete sentences in parentheticals should not have a space before the period.
  19. \s\.\)(?!.*\}\})
  20. # Should be `HH:MM:SS`
  21. \bHH:SS:MM\b
  22. # Should be `86400` (seconds in a standard day)
  23. \b84600\b(?:.*\bday\b)
  24. # Should probably be `2006-01-02` (yyyy-mm-dd)
  25. # Assuming that the time is being passed to https://go.dev/src/time/format.go
  26. \b2006-02-01\b
  27. # Should probably be `YYYYMMDD`
  28. \b[Yy]{4}[Dd]{2}[Mm]{2}(?!.*[Yy]{4}[Dd]{2}[Mm]{2}).*$
  29. # Should be `a priori` or `and prior`
  30. (?i)(?<!posteriori)\sand priori\s
  31. # Should be `a`
  32. \san (?=(?:[b-df-gj-np-rtv-xz]|h(?!our|tml|ttp)|s(?!sh|vg))[a-z])
  33. # Should only be one of `a`, `an`, or `the`
  34. \b(?:(?:an?|the)\s+){2,}\b
  35. # Should only be `are` or `can`, not both
  36. \b(?:(?:are|can)\s+){2,}\b
  37. # Should probably be `ABCDEFGHIJKLMNOPQRSTUVWXYZ`
  38. (?i)(?!ABCDEFGHIJKLMNOPQRSTUVWXYZ)ABC[A-Z]{21}YZ
  39. # Should be `anymore`
  40. \bany more[,.]
  41. # Should be `Ask`
  42. (?:^|[.?]\s+)As\s+[A-Z][a-z]{2,}\s[^.?]*?(?:how|if|wh\w+)\b
  43. # Should be `at one fell swoop`
  44. # and only when talking about killing, not some other completion
  45. # Act 4 Scene 3, Macbeth
  46. # https://www.opensourceshakespeare.org/views/plays/play_view.php?WorkID=macbeth&Act=4&Scene=3&Scope=scene
  47. \bin one fell s[lw]?oop\b
  48. # Should be `'`
  49. (?i)\b(?:(?:i|s?he|they|what|who|you)[`"]ll|(?:are|ca|did|do|does|ha[ds]|have|is|should|were|wo|would)n[`"]t|(?:s?he|let|that|there|what|where|who)[`"]s|(?:i|they|we|what|who|you)[`"]ve)\b
  50. # Should be `background` / `intro text` / `introduction` / `prologue` unless it's a brand or relates to _subterfuge_
  51. (?i)\bpretext\b
  52. # Should be `branches`
  53. # ... unless it's really about the meal that replaces breakfast and lunch.
  54. \b[Bb]runches\b
  55. # Should be `briefcase`
  56. \bbrief-case\b
  57. # Should be `by far` or `far and away`
  58. \bby far and away\b
  59. # Should be `can, not only ..., ... also...`
  60. \bcan not only.*can also\b
  61. # Should be `cannot` (or `can't`)
  62. # See https://www.grammarly.com/blog/cannot-or-can-not/
  63. # > 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`.
  64. # > `Can't` is a contraction of `cannot`, and it's best suited for informal writing.
  65. # > In formal writing and where contractions are frowned upon, use `cannot`.
  66. # > It is possible to write `can not`, but you generally find it only as part of some other construction, such as `not only . . . but also.`
  67. # - if you encounter such a case, add a pattern for that case to patterns.txt.
  68. \b[Cc]an not\b(?! only\b)
  69. # Should be `chart`
  70. (?i)\bhelm\b.*\bchard\b
  71. # Do not use `(click) here` links
  72. # For more information, see:
  73. # * https://www.w3.org/QA/Tips/noClickHere
  74. # * https://webaim.org/techniques/hypertext/link_text
  75. # * https://granicus.com/blog/why-click-here-links-are-bad/
  76. # * https://heyoka.medium.com/dont-use-click-here-f32f445d1021
  77. (?i)(?:>|\[)(?:(?:click |)here|link|(?:read |)more)(?:</|\]\()
  78. # Including "image of" or "picture of" in alt text is unnecessary.
  79. \balt=['"](?:an? |)(?:image|picture) of
  80. # Alt text should be short
  81. \balt=(?:'[^']{126,}'|"[^"]{126,}")
  82. # Should be `equals` to `is equal to`
  83. \bequals to\b
  84. # Should be `ECMA` 262 (JavaScript)
  85. (?i)\bTS\/EMCA\b|\bEMCA(?: \d|\s*Script)|\bEMCA\b(?=.*\bTS\b)
  86. # Should be `ECMA` 340 (Near Field Communications)
  87. (?i)EMCA[- ]340
  88. # Should be `fall back`
  89. \bfallback(?= to)\b
  90. # Should be `GitHub`
  91. (?<![&*.]|// |\b(?:from|import|type) )\bGithub\b(?![{()])
  92. # Should be `GitLab`
  93. (?<![&*.]|// |\b(?:from|import|type) )\bGitlab\b(?![{()])
  94. # Should probably be `https://`...
  95. # Markdown generally doesn't assume that links are to urls
  96. \]\(www\.\w
  97. # Should be `JavaScript`
  98. \bJavascript\b
  99. # Should be `macOS` or `Mac OS X` or ...
  100. \bMacOS\b
  101. # Should be `Microsoft`
  102. \bMicroSoft\b
  103. # Should be `OAuth`
  104. (?:^|[^-/*$])[ '"]oAuth(?: [a-z]|\d+ |[^ a-zA-Z0-9:;_.()])
  105. # Should be `RabbitMQ`
  106. \bRabbitmq\b
  107. # Should be `TensorFlow`
  108. \bTensorflow\b
  109. # Should be `TypeScript`
  110. \bTypescript\b
  111. # Should be `another`
  112. \ban[- ]other(?!-)\b
  113. # Should be `case-(in)sensitive`
  114. \bcase (?:in|)sensitive\b
  115. # Should be `coinciding`
  116. \bco-inciding\b
  117. # Should be `deprecation warning(s)`
  118. \b[Dd]epreciation [Ww]arnings?\b
  119. # Should be `greater than`
  120. \bgreater then\b
  121. # Should be `has`
  122. \b[Ii]t only have\b
  123. # Should be `here-in`, `the`, `them`, `this`, `these` or reworded in some other way
  124. \bthe here(?:\.|,| (?!and|defined))
  125. # Should be `greater than`
  126. \bhigher than\b
  127. # Should be `ID` (unless it's a flag/property)
  128. (?<![-\.])\bId\b(?![(])
  129. # Should be `in front of`
  130. \bin from of\b
  131. # Should be `into`
  132. # when not phrasal and when `in order to` would be wrong:
  133. # https://thewritepractice.com/into-vs-in-to/
  134. \sin to\s(?!if\b)
  135. # Should be `use`
  136. \sin used by\b
  137. # Should be `in-depth` if used as an adjective (but `in depth` when used as an adverb)
  138. \bin depth\s(?!rather\b)\w{6,}
  139. # Should be `in-flight` or `on the fly` (unless actually talking about airline flights)
  140. \bon[- ]flight\b(?!=\s+(?:(?:\w{2}|)\d+|availability|booking|computer|data|delay|departure|management|performance|radar|reservation|scheduling|software|status|ticket|time|type|.*(?:hotel|taxi)))
  141. # Should be `is obsolete`
  142. \bis obsolescent\b
  143. # Should be `it's` or `its`
  144. \bits['’]
  145. # Should be `its`
  146. \bit's(?= own\b)
  147. # Should be `its`
  148. \bit's(?= only purpose\b)
  149. # Should be `for its` (possessive) or `because it is`
  150. \bfor it(?:'s| is)\b
  151. # Should be `log in`
  152. \blogin to the
  153. # Should be `long-standing`
  154. \blong standing\b
  155. # `apt-key` is deprecated
  156. # ... instead you should be writing a pair of files:
  157. # ... * the gpg key added to a distinct key ring file based on your project/distro/key...
  158. # ... * the sources.list in a district file -- not simply appended to `/etc/apt/sources.list` -- (there is a newer format [DEB822](https://manpages.debian.org/bookworm/dpkg-dev/deb822.5.en.html)) that references the gpg key.
  159. # Consider:
  160. # ````sh
  161. # curl http://download.something.example.com/$DISTRO/Release.key | \
  162. # gpg --dearmor --yes --output /usr/share/keyrings/something-distro.gpg
  163. # echo "deb [signed-by=/usr/share/keyrings/something-distro.gpg] http://download.something.example.com/repositories/home:/$DISTRO ./" \
  164. # >> /etc/apt/sources.list.d/something-distro.list
  165. # ````
  166. \bapt-key add\b
  167. # Should be `nearby`
  168. \bnear by\b
  169. # Should probably be a person named `Nick` or the abbreviation `NIC`
  170. \bNic\b
  171. # Should be `not supposed`
  172. \bsupposed not\b
  173. # Should probably be `much more`
  174. \bmore much\b
  175. # Should be `perform its`
  176. \bperform it's\b
  177. # Should be `opt-in`
  178. (?<!\scan|for)(?<!\smust)(?<!\sif)\sopt in\s
  179. # Should be `less than`
  180. \bless then\b
  181. # Should be `load balancer`
  182. \b[Ll]oud balancer
  183. # Should be `moot`
  184. \bmute point\b
  185. # Should be `one of`
  186. (?<!-)\bon of\b
  187. # Should be `on the other hand`
  188. \b(?i)on another hand\b
  189. # Reword to `on at runtime` or `enabled at launch`
  190. # The former if you mean it can be changed dynamically.
  191. # The latter if you mean that it can be changed without recompiling but not after the program starts.
  192. \bswitched on runtime\b
  193. # Should be `Of course,`
  194. [?.!]\s+Of course\s(?=[-\w\s]+[.?;!,])
  195. # Most people only have two hands. Reword.
  196. \b(?i)on the third hand\b
  197. # Should be `OpenShift`
  198. \bOpenshift\b
  199. # Should be `otherwise`
  200. \bother[- ]wise\b
  201. # Should be `; otherwise` or `. Otherwise`
  202. # https://study.com/learn/lesson/otherwise-in-a-sentence.html
  203. , [Oo]therwise\b
  204. # Should probably be `Otherwise,`
  205. (?<=\. )Otherwise\s
  206. # Should be `or (more|less)`
  207. \bore (?:more|less)\b
  208. # Should be `rather than`
  209. \brather then\b
  210. # Should be `Red Hat`
  211. \bRed[Hh]at\b
  212. # Should be `regardless, ...` or `regardless of (whether)`
  213. \b[Rr]egardless if you\b
  214. # Should be `self-signed`
  215. \bself signed\b
  216. # Should be `SendGrid`
  217. \bSendgrid\b
  218. # Should be `set up` (`setup` is a noun / `set up` is a verb)
  219. \b[Ss]etup(?= (?:an?|the)\b)
  220. # Should be `state`
  221. \bsate(?=\b|[A-Z])|(?<=[a-z])Sate(?=\b|[A-Z])|(?<=[A-Z]{2})Sate(?=\b|[A-Z])
  222. # Should be `no longer needed`
  223. \bno more needed\b(?! than\b)
  224. # Should be `<see|look> below for the`
  225. (?i)\bfind below the\b
  226. # Should be `then any` unless there's a comparison before the `,`
  227. , than any\b
  228. # Should be `did not exist`
  229. \bwere not existent\b
  230. # Should be `nonexistent`
  231. \bnon existing\b
  232. # Should be `nonexistent`
  233. \b[Nn]o[nt][- ]existent\b
  234. # Should be `our`
  235. \bspending out time\b
  236. # Should be `@brief` / `@details` / `@param` / `@return` / `@retval`
  237. (?:^\s*|(?:\*|//|/*)\s+`)[\\@](?:breif|(?:detail|detials)|(?:params(?!\.)|prama?)|ret(?:uns?)|retvl)\b
  238. # Should be `more than` or `more, then`
  239. \bmore then\b
  240. # Should be `Pipeline`/`pipeline`
  241. (?:(?<=\b|[A-Z])p|P)ipeLine(?:\b|(?=[A-Z]))
  242. # Should be `preexisting`
  243. [Pp]re[- ]existing
  244. # Should be `preempt`
  245. [Pp]re[- ]empt\b
  246. # Should be `preemptively`
  247. [Pp]re[- ]emptively
  248. # Should be `prepopulate`
  249. [Pp]re[- ]populate
  250. # Should be `prerequisite`
  251. [Pp]re[- ]requisite
  252. # Should be `recently changed` or `recent changes`
  253. [Rr]ecent changed
  254. # Should be `reentrancy`
  255. [Rr]e[- ]entrancy
  256. # Should be `reentrant`
  257. [Rr]e[- ]entrant
  258. # Should be `room for`
  259. \brooms for (?!lease|rent|sale)
  260. # Should be `socioeconomic`
  261. # https://dictionary.cambridge.org/us/dictionary/english/socioeconomic
  262. socio-economic
  263. # Should be `strong suit`
  264. \b(?:my|his|her|their) strong suite\b
  265. # Should probably be `temperatures` unless actually talking about thermal drafts (things birds may fly on)
  266. \bthermals\b
  267. # Should be `there are` or `they are` (or `they're`)
  268. (?i)\btheir are\b
  269. # Should be `understand`
  270. \bunder stand\b
  271. # Should be `URI` or `uri` unless it refers to a person named `Uri` (or a flag)
  272. (?<![-\.])\bUri\b(?![(])
  273. # Should be `it uses is`
  274. /\bis uses is\b/
  275. # Should be `uses it as`
  276. (?:^|\. |and )uses is as (?!an?\b|follows|livestock|[^.]+\s+as\b)
  277. # Should be `was`
  278. \bhas been(?= removed in v?\d)
  279. # Should be `where`
  280. \bwere they are\b
  281. # Should be `why`
  282. , way(?= is [^.]*\?)
  283. # should be `vCenter`
  284. \bV[Cc]enter\b
  285. # Should be `VM`
  286. \bVm\b
  287. # Should be `walkthrough(s)`
  288. \bwalk-throughs?\b
  289. # Should be `we'll`
  290. \bwe 'll\b
  291. # Should be `whereas`
  292. \bwhere as\b
  293. # Should be `WinGet`
  294. \bWinget\b
  295. # Should be `without` (unless `out` is a modifier of the next word)
  296. \bwith out\b(?!-)
  297. # Should be `work around`
  298. \b[Ww]orkaround(?= an?\b)
  299. # Should be `workarounds`
  300. \bwork[- ]arounds\b
  301. # Should be `workaround`
  302. (?:(?:[Aa]|[Tt]he|ugly)\swork[- ]around\b|\swork[- ]around\s+for)
  303. # Should be `worst`
  304. (?i)worse-case
  305. # Should be `you are not` or reworded
  306. \byour not\b
  307. # Should be `(coarse|fine)-grained`
  308. \b(?:coarse|fine) grained\b
  309. # Homoglyph (Cyrillic) should be `A`/`B`/`C`/`E`/`H`/`I`/`I`/`J`/`K`/`M`/`O`/`P`/`S`/`T`/`Y`
  310. # It's possible that your content is intentionally mixing Cyrillic and Latin scripts, but if it isn't, you definitely want to correct this.
  311. (?<=[A-Z]{2})[АВСЕНІӀЈКМОРЅТУ]|[АВСЕНІӀЈКМОРЅТУ](?=[A-Z]+(?:\b|[a-z]+)|[a-z]+(?:[^a-z]|$))
  312. # Homoglyph (Cyrillic) should be `a`/`b`/`c`/`e`/`o`/`p`/`x`/`y`
  313. # It's possible that your content is intentionally mixing Cyrillic and Latin scripts, but if it isn't, you definitely want to correct this.
  314. [авсеорху](?=[A-Za-z]{2,})|(?<=[A-Za-z]{2})[авсеорху]|(?<=[A-Za-z])[авсеорху](?=[A-Za-z])
  315. # Should be `neither/nor` -- or reword
  316. (?!<do )\bnot\b([^.?!"/(](?!neither|,.*?,))+\bnor\b
  317. # Should be `neither/nor` (plus rewording the beginning)
  318. # This is probably a double negative...
  319. \bnot\b[^.?!"/(]*\bneither\b[^.?!"/(]*\bnor\b
  320. # In English, duplicated words are generally mistakes
  321. # There are a few exceptions (e.g. "that that").
  322. # If the highlighted doubled word pair is in:
  323. # * code, write a pattern to mask it.
  324. # * prose, have someone read the English before you dismiss this error.
  325. \s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s