candidate.patterns 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. # Repeated letters
  2. #\b([a-z])\g{-1}{2,}\b
  3. # marker to ignore all code on line
  4. ^.*/\* #no-spell-check-line \*/.*$
  5. # marker to ignore all code on line
  6. ^.*\bno-spell-check(?:-line|)(?:\s.*|)$
  7. # https://cspell.org/configuration/document-settings/
  8. # cspell inline
  9. ^.*\b[Cc][Ss][Pp][Ee][Ll]{2}:\s*[Dd][Ii][Ss][Aa][Bb][Ll][Ee]-[Ll][Ii][Nn][Ee]\b
  10. # copyright
  11. Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+
  12. # patch hunk comments
  13. ^@@ -\d+(?:,\d+|) \+\d+(?:,\d+|) @@ .*
  14. # git index header
  15. index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40}
  16. # file permissions
  17. ['"`\s][-bcdLlpsw](?:[-r][-w][-Ssx]){2}[-r][-w][-SsTtx]\+?['"`\s]
  18. # css fonts
  19. \bfont(?:-family|):[^;}]+
  20. # css url wrappings
  21. \burl\([^)]+\)
  22. # cid urls
  23. (['"])cid:.*?\g{-1}
  24. # data url in parens
  25. \(data:(?:[^) ][^)]*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})[^)]*\)
  26. # data url in quotes
  27. ([`'"])data:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
  28. # data url
  29. \bdata:[-a-zA-Z=;:/0-9+]*,\S*
  30. # https/http/file urls
  31. (?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]
  32. # mailto urls
  33. mailto:[-a-zA-Z=;:/?%&0-9+@._]{3,}
  34. # magnet urls
  35. magnet:[?=:\w]+
  36. # magnet urls
  37. "magnet:[^"]+"
  38. # obs:
  39. "obs:[^"]*"
  40. # The `\b` here means a break, it's the fancy way to handle urls, but it makes things harder to read
  41. # In this examples content, I'm using a number of different ways to match things to show various approaches
  42. # asciinema
  43. \basciinema\.org/a/[0-9a-zA-Z]+
  44. # asciinema v2
  45. ^\[\d+\.\d+, "[io]", ".*"\]$
  46. # apple
  47. \bdeveloper\.apple\.com/[-\w?=/]+
  48. # Apple music
  49. \bembed\.music\.apple\.com/fr/playlist/usr-share/[-\w.]+
  50. # appveyor api
  51. \bci\.appveyor\.com/api/projects/status/[0-9a-z]+
  52. # appveyor project
  53. \bci\.appveyor\.com/project/(?:[^/\s"]*/){2}builds?/\d+/job/[0-9a-z]+
  54. # Amazon
  55. # Amazon
  56. \bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)
  57. # AWS ARN
  58. arn:aws:[-/:\w]+
  59. # AWS S3
  60. \b\w*\.s3[^.]*\.amazonaws\.com/[-\w/&#%_?:=]*
  61. # AWS execute-api
  62. \b[0-9a-z]{10}\.execute-api\.[-0-9a-z]+\.amazonaws\.com\b
  63. # AWS ELB
  64. \b\w+\.[-0-9a-z]+\.elb\.amazonaws\.com\b
  65. # AWS SNS
  66. \bsns\.[-0-9a-z]+.amazonaws\.com/[-\w/&#%_?:=]*
  67. # AWS VPC
  68. vpc-\w+
  69. # While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
  70. # YouTube url
  71. \b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
  72. # YouTube music
  73. \bmusic\.youtube\.com/youtubei/v1/browse(?:[?&]\w+=[-a-zA-Z0-9?&=_]*)
  74. # YouTube tag
  75. <\s*youtube\s+id=['"][-a-zA-Z0-9?_]*['"]
  76. # YouTube image
  77. \bimg\.youtube\.com/vi/[-a-zA-Z0-9?&=_]*
  78. # Google Accounts
  79. \baccounts.google.com/[-_/?=.:;+%&0-9a-zA-Z]*
  80. # Google Analytics
  81. \bgoogle-analytics\.com/collect.[-0-9a-zA-Z?%=&_.~]*
  82. # Google APIs
  83. \bgoogleapis\.(?:com|dev)/[a-z]+/(?:v\d+/|)[a-z]+/[-@:./?=\w+|&]+
  84. # Google Artifact Registry
  85. \.pkg\.dev(?:/[-\w]+)+(?::[-\w]+|)
  86. # Google Storage
  87. \b[-a-zA-Z0-9.]*\bstorage\d*\.googleapis\.com(?:/\S*|)
  88. # Google Calendar
  89. \bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+
  90. \w+\@group\.calendar\.google\.com\b
  91. # Google DataStudio
  92. \bdatastudio\.google\.com/(?:(?:c/|)u/\d+/|)(?:embed/|)(?:open|reporting|datasources|s)/[-0-9a-zA-Z]+(?:/page/[-0-9a-zA-Z]+|)
  93. # The leading `/` here is as opposed to the `\b` above
  94. # ... a short way to match `https://` or `http://` since most urls have one of those prefixes
  95. # Google Docs
  96. /docs\.google\.com/[a-z]+/(?:ccc\?key=\w+|(?:u/\d+|d/(?:e/|)[0-9a-zA-Z_-]+/)?(?:edit\?[-\w=#.]*|/\?[\w=&]*|))
  97. # Google Drive
  98. \bdrive\.google\.com/(?:file/d/|open)[-0-9a-zA-Z_?=]*
  99. # Google Groups
  100. \bgroups\.google\.com(?:/[a-z]+/(?:#!|)[^/\s"]+)*
  101. # Google Maps
  102. \bmaps\.google\.com/maps\?[\w&;=]*
  103. # Google themes
  104. themes\.googleusercontent\.com/static/fonts/[^/\s"]+/v\d+/[^.]+.
  105. # Google CDN
  106. \bclients2\.google(?:usercontent|)\.com[-0-9a-zA-Z/.]*
  107. # Goo.gl
  108. /goo\.gl/[a-zA-Z0-9]+
  109. # Google Chrome Store
  110. \bchrome\.google\.com/webstore/detail/[-\w]*(?:/\w*|)
  111. # Google Books
  112. \bgoogle\.(?:\w{2,4})/books(?:/\w+)*\?[-\w\d=&#.]*
  113. # Google Fonts
  114. \bfonts\.(?:googleapis|gstatic)\.com/[-/?=:;+&0-9a-zA-Z]*
  115. # Google Forms
  116. \bforms\.gle/\w+
  117. # Google Scholar
  118. \bscholar\.google\.com/citations\?user=[A-Za-z0-9_]+
  119. # Google Colab Research Drive
  120. \bcolab\.research\.google\.com/drive/[-0-9a-zA-Z_?=]*
  121. # Google Cloud regions
  122. (?:us|(?:north|south)america|europe|asia|australia|me|africa)-(?:north|south|east|west|central){1,2}\d+
  123. # GitHub SHAs (api)
  124. \bapi.github\.com/repos(?:/[^/\s"]+){3}/[0-9a-f]+\b
  125. # GitHub SHAs (markdown)
  126. (?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
  127. # GitHub SHAs
  128. \bgithub\.com(?:/[^/\s"]+){2}[@#][0-9a-f]+\b
  129. # GitHub SHA refs
  130. \[([0-9a-f]+)\]\(https://(?:www\.|)github.com/[-\w]+/[-\w]+/commit/\g{-1}[0-9a-f]*
  131. # GitHub wiki
  132. \bgithub\.com/(?:[^/]+/){2}wiki/(?:(?:[^/]+/|)_history|[^/]+(?:/_compare|)/[0-9a-f.]{40,})\b
  133. # githubusercontent
  134. /[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
  135. # githubassets
  136. \bgithubassets.com/[0-9a-f]+(?:[-/\w.]+)
  137. # gist github
  138. \bgist\.github\.com/[^/\s"]+/[0-9a-f]+
  139. # git.io
  140. \bgit\.io/[0-9a-zA-Z]+
  141. # GitHub JSON
  142. "node_id": "[-a-zA-Z=;:/0-9+_]*"
  143. # Contributor
  144. \[[^\]]+\]\(https://github\.com/[^/\s"]+/?\)
  145. # GHSA
  146. GHSA(?:-[0-9a-z]{4}){3}
  147. # GitHub actions
  148. \buses:\s+[-\w.]+/[-\w./]+@[-\w.]+
  149. # GitLab commit
  150. \bgitlab\.[^/\s"]*/\S+/\S+/commit/[0-9a-f]{7,16}#[0-9a-f]{40}\b
  151. # GitLab merge requests
  152. \bgitlab\.[^/\s"]*/\S+/\S+/-/merge_requests/\d+/diffs#[0-9a-f]{40}\b
  153. # GitLab uploads
  154. \bgitlab\.[^/\s"]*/uploads/[-a-zA-Z=;:/0-9+]*
  155. # GitLab commits
  156. \bgitlab\.[^/\s"]*/(?:[^/\s"]+/){2}commits?/[0-9a-f]+\b
  157. # #includes
  158. ^\s*#include\s*(?:<.*?>|".*?")
  159. # #pragma lib
  160. ^\s*#pragma comment\(lib, ".*?"\)
  161. # binance
  162. accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
  163. # bitbucket diff
  164. \bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}diff(?:stat|)(?:/[^/\s"]+){2}:[0-9a-f]+
  165. # bitbucket repositories commits
  166. \bapi\.bitbucket\.org/\d+\.\d+/repositories/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
  167. # bitbucket commits
  168. \bbitbucket\.org/(?:[^/\s"]+/){2}commits?/[0-9a-f]+
  169. # bit.ly
  170. \bbit\.ly/\w+
  171. # bitrise
  172. \bapp\.bitrise\.io/app/[0-9a-f]*/[\w.?=&]*
  173. # bootstrapcdn.com
  174. \bbootstrapcdn\.com/[-./\w]+
  175. # cdn.cloudflare.com
  176. \bcdnjs\.cloudflare\.com/[./\w]+
  177. # circleci
  178. \bcircleci\.com/gh(?:/[^/\s"]+){1,5}.[a-z]+\?[-0-9a-zA-Z=&]+
  179. # gitter
  180. \bgitter\.im(?:/[^/\s"]+){2}\?at=[0-9a-f]+
  181. # gravatar
  182. \bgravatar\.com/avatar/[0-9a-f]+
  183. # ibm
  184. [a-z.]*ibm\.com/[-_#=:%!?~.\\/\d\w]*
  185. # imgur
  186. \bimgur\.com/[^.]+
  187. # Internet Archive
  188. \barchive\.org/web/\d+/(?:[-\w.?,'/\\+&%$#_:]*)
  189. # discord
  190. /discord(?:app\.com|\.gg)/(?:invite/)?[a-zA-Z0-9]{7,}
  191. # Disqus
  192. \bdisqus\.com/[-\w/%.()!?&=_]*
  193. # medium link
  194. \blink\.medium\.com/[a-zA-Z0-9]+
  195. # medium
  196. \bmedium\.com/@?[^/\s"]+/[-\w]+
  197. # microsoft
  198. \b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
  199. # powerbi
  200. \bapp\.powerbi\.com/reportEmbed/[^"' ]*
  201. # vs devops
  202. \bvisualstudio.com(?::443|)/[-\w/?=%&.]*
  203. # microsoft store
  204. \bmicrosoft\.com/store/apps/\w+
  205. # mvnrepository.com
  206. \bmvnrepository\.com/[-0-9a-z./]+
  207. # now.sh
  208. /[0-9a-z-.]+\.now\.sh\b
  209. # oracle
  210. \bdocs\.oracle\.com/[-0-9a-zA-Z./_?#&=]*
  211. # chromatic.com
  212. /\S+.chromatic.com\S*[")]
  213. # codacy
  214. \bapi\.codacy\.com/project/badge/Grade/[0-9a-f]+
  215. # compai
  216. \bcompai\.pub/v1/png/[0-9a-f]+
  217. # mailgun api
  218. \.api\.mailgun\.net/v3/domains/[0-9a-z]+\.mailgun.org/messages/[0-9a-zA-Z=@]*
  219. # mailgun
  220. \b[0-9a-z]+.mailgun.org
  221. # /message-id/
  222. /message-id/[-\w@./%]+
  223. # Reddit
  224. \breddit\.com/r/[/\w_]*
  225. # requestb.in
  226. \brequestb\.in/[0-9a-z]+
  227. # sched
  228. \b[a-z0-9]+\.sched\.com\b
  229. # Slack url
  230. slack://[a-zA-Z0-9?&=]+
  231. # Slack
  232. \bslack\.com/[-0-9a-zA-Z/_~?&=.]*
  233. # Slack edge
  234. \bslack-edge\.com/[-a-zA-Z0-9?&=%./]+
  235. # Slack images
  236. \bslack-imgs\.com/[-a-zA-Z0-9?&=%.]+
  237. # shields.io
  238. \bshields\.io/[-\w/%?=&.:+;,]*
  239. # stackexchange -- https://stackexchange.com/feeds/sites
  240. \b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
  241. # Sentry
  242. [0-9a-f]{32}\@o\d+\.ingest\.sentry\.io\b
  243. # Twitter markdown
  244. \[@[^[/\]:]*?\]\(https://twitter.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)\)
  245. # Twitter hashtag
  246. \btwitter\.com/hashtag/[\w?_=&]*
  247. # Twitter status
  248. \btwitter\.com/[^/\s"')]*(?:/status/\d+(?:\?[-_0-9a-zA-Z&=]*|)|)
  249. # Twitter profile images
  250. \btwimg\.com/profile_images/[_\w./]*
  251. # Twitter media
  252. \btwimg\.com/media/[-_\w./?=]*
  253. # Twitter link shortened
  254. \bt\.co/\w+
  255. # facebook
  256. \bfburl\.com/[0-9a-z_]+
  257. # facebook CDN
  258. \bfbcdn\.net/[\w/.,]*
  259. # facebook watch
  260. \bfb\.watch/[0-9A-Za-z]+
  261. # dropbox
  262. \bdropbox\.com/sh?/[^/\s"]+/[-0-9A-Za-z_.%?=&;]+
  263. # ipfs protocol
  264. ipfs://[0-9a-zA-Z]{3,}
  265. # ipfs url
  266. /ipfs/[0-9a-zA-Z]{3,}
  267. # w3
  268. \bw3\.org/[-0-9a-zA-Z/#.]+
  269. # loom
  270. \bloom\.com/embed/[0-9a-f]+
  271. # regex101
  272. \bregex101\.com/r/[^/\s"]+/\d+
  273. # figma
  274. \bfigma\.com/file(?:/[0-9a-zA-Z]+/)+
  275. # freecodecamp.org
  276. \bfreecodecamp\.org/[-\w/.]+
  277. # image.tmdb.org
  278. \bimage\.tmdb\.org/[/\w.]+
  279. # mermaid
  280. \bmermaid\.ink/img/[-\w]+|\bmermaid-js\.github\.io/mermaid-live-editor/#/edit/[-\w]+
  281. # Wikipedia
  282. \ben\.wikipedia\.org/wiki/[-\w%.#]+
  283. # gitweb
  284. [^"\s]+/gitweb/\S+;h=[0-9a-f]+
  285. # HyperKitty lists
  286. /archives/list/[^@/]+@[^/\s"]*/message/[^/\s"]*/
  287. # lists
  288. /thread\.html/[^"\s]+
  289. # list-management
  290. \blist-manage\.com/subscribe(?:[?&](?:u|id)=[0-9a-f]+)+
  291. # kubectl.kubernetes.io/last-applied-configuration
  292. "kubectl.kubernetes.io/last-applied-configuration": ".*"
  293. # pgp
  294. \bgnupg\.net/pks/lookup[?&=0-9a-zA-Z]*
  295. # Spotify
  296. \bopen\.spotify\.com/embed/playlist/\w+
  297. # Mastodon
  298. \bmastodon\.[-a-z.]*/(?:media/|@)[?&=0-9a-zA-Z_]*
  299. # scastie
  300. \bscastie\.scala-lang\.org/[^/]+/\w+
  301. # images.unsplash.com
  302. \bimages\.unsplash\.com/(?:(?:flagged|reserve)/|)[-\w./%?=%&.;]+
  303. # pastebin
  304. \bpastebin\.com/[\w/]+
  305. # heroku
  306. \b\w+\.heroku\.com/source/archive/\w+
  307. # quip
  308. \b\w+\.quip\.com/\w+(?:(?:#|/issues/)\w+)?
  309. # badgen.net
  310. \bbadgen\.net/badge/[^")\]'\s]+
  311. # statuspage.io
  312. \w+\.statuspage\.io\b
  313. # media.giphy.com
  314. \bmedia\.giphy\.com/media/[^/]+/[\w.?&=]+
  315. # tinyurl
  316. \btinyurl\.com/\w+
  317. # codepen
  318. \bcodepen\.io/[\w/]+
  319. # registry.npmjs.org
  320. \bregistry\.npmjs\.org/(?:@[^/"']+/|)[^/"']+/-/[-\w@.]+
  321. # getopts
  322. \bgetopts\s+(?:"[^"]+"|'[^']+')
  323. # ANSI color codes
  324. (?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+)*m
  325. # URL escaped characters
  326. %[0-9A-F][A-F](?=[A-Za-z])
  327. # lower URL escaped characters
  328. %[0-9a-f][a-f](?=[a-z]{2,})
  329. # IPv6
  330. \b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b
  331. # c99 hex digits (not the full format, just one I've seen)
  332. 0x[0-9a-fA-F](?:\.[0-9a-fA-F]*|)[pP]
  333. # Punycode
  334. \bxn--[-0-9a-z]+
  335. # sha
  336. sha\d+:[0-9a-f]*?[a-f]{3,}[0-9a-f]*
  337. # sha-... -- uses a fancy capture
  338. (\\?['"]|&quot;)[0-9a-f]{40,}\g{-1}
  339. # hex runs
  340. \b[0-9a-fA-F]{16,}\b
  341. # hex in url queries
  342. =[0-9a-fA-F]*?(?:[A-F]{3,}|[a-f]{3,})[0-9a-fA-F]*?&
  343. # ssh
  344. (?:ssh-\S+|-nistp256) [-a-zA-Z=;:/0-9+]{12,}
  345. # PGP
  346. \b(?:[0-9A-F]{4} ){9}[0-9A-F]{4}\b
  347. # GPG keys
  348. \b(?:[0-9A-F]{4} ){5}(?: [0-9A-F]{4}){5}\b
  349. # Well known gpg keys
  350. .well-known/openpgpkey/[\w./]+
  351. # pki
  352. -----BEGIN.*-----END
  353. # pki (base64)
  354. LS0tLS1CRUdJT.*
  355. # C# includes
  356. ^\s*using [^;]+;
  357. # uuid:
  358. \b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
  359. # hex digits including css/html color classes:
  360. (?:[\\0][xX]|\\u|[uU]\+|#x?|%23|&H)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
  361. # integrity
  362. integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
  363. # https://www.gnu.org/software/groff/manual/groff.html
  364. # man troff content
  365. \\f[BCIPR]
  366. # '/"
  367. \\\([ad]q
  368. # .desktop mime types
  369. ^MimeTypes?=.*$
  370. # .desktop localized entries
  371. ^[A-Z][a-z]+\[[a-z]+\]=.*$
  372. # Localized .desktop content
  373. Name\[[^\]]+\]=.*
  374. # IServiceProvider / isAThing
  375. (?:(?:\b|_|(?<=[a-z]))I|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))
  376. # crypt
  377. (['"])\$2[ayb]\$.{56}\g{-1}
  378. # apache/old crypt
  379. (['"]|)\$+(?:apr|)1\$+.{8}\$+.{22}\g{-1}
  380. # sha1 hash
  381. \{SHA\}[-a-zA-Z=;:/0-9+]{3,}
  382. # machine learning (?)
  383. \b(?i)ml(?=[a-z]{2,})
  384. # python
  385. #\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})
  386. # scrypt / argon
  387. \$(?:scrypt|argon\d+[di]*)\$\S+
  388. # go.sum
  389. \bh1:\S+
  390. # imports
  391. ^import\s+(?:(?:static|type)\s+|)(?:[\w.]|\{\s*\w*?(?:,\s*(?:\w*|\*))+\s*\})+
  392. # scala modules
  393. ("[^"]+"\s*%%?\s*){2,3}"[^"]+"
  394. # container images
  395. image: [-\w./:@]+
  396. # Docker images
  397. ^\s*(?i)FROM\s+\S+:\S+(?:\s+AS\s+\S+|)
  398. # `docker images` REPOSITORY TAG IMAGE ID CREATED SIZE
  399. \s*\S+/\S+\s+\S+\s+[0-9a-f]{8,}\s+\d+\s+(?:hour|day|week)s ago\s+[\d.]+[KMGT]B
  400. # Intel intrinsics
  401. _mm_(?!dd)\w+
  402. # Input to GitHub JSON
  403. content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
  404. # This does not cover multiline strings, if your repository has them,
  405. # you'll want to remove the `(?=.*?")` suffix.
  406. # The `(?=.*?")` suffix should limit the false positives rate
  407. # printf
  408. %(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA])(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"])
  409. # Alternative printf
  410. # %s
  411. %(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%[^s])\b)(?=.*?['"])
  412. # Python string prefix / binary prefix
  413. # Note that there's a high false positive rate, remove the `?=` and search for the regex to see if the matches seem like reasonable strings
  414. (?<!['"])\b(?:B|BR|Br|F|FR|Fr|R|RB|RF|Rb|Rf|U|UR|Ur|b|bR|br|f|fR|fr|r|rB|rF|rb|rf|u|uR|ur)['"](?=[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})
  415. # Regular expressions for (P|p)assword
  416. \([A-Z]\|[a-z]\)[a-z]+
  417. # JavaScript regular expressions
  418. # javascript test regex
  419. /.{3,}/[gim]*\.test\(
  420. # javascript match regex
  421. \.match\(/[^/\s"]{3,}/[gim]*\s*
  422. # javascript match regex
  423. \.match\(/\\[b].{3,}?/[gim]*\s*\)(?:;|$)
  424. # javascript regex
  425. ^\s*/\\[b].{3,}?/[gim]*\s*(?:\)(?:;|$)|,$)
  426. # javascript replace regex
  427. \.replace\(/[^/\s"]{3,}/[gim]*\s*,
  428. # assign regex
  429. = /[^*].*?(?:[a-z]{3,}|[A-Z]{3,}|[A-Z][a-z]{2,}).*/[gim]*(?=\W|$)
  430. # perl regex test
  431. [!=]~ (?:/.*/|m\{.*?\}|m<.*?>|m([|!/@#,;']).*?\g{-1})
  432. # perl qr regex
  433. (?<!\$)\bqr(?:\{.*?\}|<.*?>|\(.*?\)|([|!/@#,;']).*?\g{-1})
  434. # perl run
  435. perl(?:\s+-[a-zA-Z]\w*)+
  436. # C network byte conversions
  437. (?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()
  438. # Go regular expressions
  439. regexp?\.MustCompile\((?:`[^`]*`|".*"|'.*')\)
  440. # regex choice
  441. \(\?:[^)]+\|[^)]+\)
  442. # proto
  443. ^\s*(\w+)\s\g{-1} =
  444. # sed regular expressions
  445. sed 's/(?:[^/]*?[a-zA-Z]{3,}[^/]*?/){2}
  446. # node packages
  447. (["'])@[^/'" ]+/[^/'" ]+\g{-1}
  448. # go install
  449. go install(?:\s+[a-z]+\.[-@\w/.]+)+
  450. # pom.xml
  451. <(?:group|artifact)Id>.*?<
  452. # jetbrains schema https://youtrack.jetbrains.com/issue/RSRP-489571
  453. urn:shemas-jetbrains-com
  454. # Debian changelog severity
  455. [-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b
  456. # kubernetes pod status lists
  457. # https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
  458. \w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+
  459. # kubectl - pods in CrashLoopBackOff
  460. \w+-[0-9a-f]+-\w+\s+\d+/\d+\s+CrashLoopBackOff\s+
  461. # kubernetes applications
  462. \.apps/[-\w]+
  463. # kubernetes object suffix
  464. -[0-9a-f]{10}-\w{5}\s
  465. # kubernetes crd patterns
  466. ^\s*pattern: .*$
  467. # posthog secrets
  468. ([`'"])phc_[^"',]+\g{-1}
  469. # xcode
  470. # xcodeproject scenes
  471. (?:Controller|destination|(?:first|second)Item|ID|id)="\w{3}-\w{2}-\w{3}"
  472. # xcode api botches
  473. customObjectInstantitationMethod
  474. # msvc api botches
  475. PrependWithABINamepsace
  476. # configure flags
  477. .* \| --\w{2,}.*?(?=\w+\s\w+)
  478. # font awesome classes
  479. \.fa-[-a-z0-9]+
  480. # bearer auth
  481. (['"])[Bb]ear[e][r] .{3,}?\g{-1}
  482. # bearer auth
  483. \b[Bb]ear[e][r]:? [-a-zA-Z=;:/0-9+.]{3,}
  484. # basic auth
  485. (['"])[Bb]asic [-a-zA-Z=;:/0-9+]{3,}\g{-1}
  486. # basic auth
  487. : [Bb]asic [-a-zA-Z=;:/0-9+.]{3,}
  488. # base64 encoded content
  489. ([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1}
  490. # base64 encoded content in xml/sgml
  491. >[-a-zA-Z=;:/0-9+]{3,}=</
  492. # base64 encoded content, possibly wrapped in mime
  493. #(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$)
  494. # base64 encoded json
  495. \beyJ[-a-zA-Z=;:/0-9+]+
  496. # base64 encoded pkcs
  497. \bMII[-a-zA-Z=;:/0-9+]+
  498. # uuencoded
  499. #[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_]{40,}
  500. # DNS rr data
  501. (?:\d+\s+){3}(?:[-+/=.\w]{2,}\s*){1,2}
  502. # encoded-word
  503. =\?[-a-zA-Z0-9"*%]+\?[BQ]\?[^?]{0,75}\?=
  504. # numerator
  505. \bnumer\b(?=.*denom)
  506. # Time Zones
  507. \b(?:Africa|Atlantic|America|Antarctica|Arctic|Asia|Australia|Europe|Indian|Pacific)(?:/[-\w]+)+
  508. # linux kernel info
  509. ^(?:bugs|flags|Features)\s+:.*
  510. # systemd mode
  511. systemd.*?running in system mode \([-+].*\)$
  512. # Lorem
  513. # Update Lorem based on your content (requires `ge` and `w` from https://github.com/jsoref/spelling; and `review` from https://github.com/check-spelling/check-spelling/wiki/Looking-for-items-locally )
  514. # grep '^[^#].*lorem' .github/actions/spelling/patterns.txt|perl -pne 's/.*i..\?://;s/\).*//' |tr '|' "\n"|sort -f |xargs -n1 ge|perl -pne 's/^[^:]*://'|sort -u|w|sed -e 's/ .*//'|w|review -
  515. # Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
  516. # ... Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
  517. # ... You could manually change `(?i)X...` to use `[Xx]...`
  518. # ... or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
  519. (?:(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*)
  520. # Non-English
  521. # Even repositories expecting pure English content can unintentionally have Non-English content... People will occasionally mistakenly enter [homoglyphs](https://en.wikipedia.org/wiki/Homoglyph) which are essentially typos, and using this pattern will mean check-spelling will not complain about them.
  522. #
  523. # If the content to be checked should be written in English and the only Non-English items will be people's names, then you can consider adding this.
  524. #
  525. # Alternatively, if you're using check-spelling v0.0.25+, and you would like to _check_ the Non-English content for spelling errors, you can. For information on how to do so, see:
  526. # https://docs.check-spelling.dev/Feature:-Configurable-word-characters.html#unicode
  527. [a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
  528. # highlighted letters
  529. \[[A-Z]\][a-z]+
  530. # French
  531. # This corpus only had capital letters, but you probably want lowercase ones as well.
  532. \b[LN]'+[a-z]{2,}\b
  533. # latex (check-spelling >= 0.0.22)
  534. \\\w{2,}\{
  535. # American Mathematical Society (AMS) / Doxygen
  536. TeX/AMS
  537. # File extensions
  538. \*\.[+\w]+,
  539. # eslint
  540. "varsIgnorePattern": ".+"
  541. # nolint
  542. nolint:\s*[\w,]+
  543. # Windows short paths
  544. [/\\][^/\\]{5,6}~\d{1,2}(?=[/\\])
  545. # Windows Resources with accelerators
  546. \b[A-Z]&[a-z]+\b(?!;)
  547. # signed off by
  548. (?i)Signed-off-by: .*
  549. # cygwin paths
  550. /cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+
  551. # in check-spelling@v0.0.22+, printf markers aren't automatically consumed
  552. # printf markers
  553. (?<!\\)\\[nrt](?=[a-z]{2,})
  554. # alternate printf markers if you run into latex and friends
  555. (?<!\\)\\[nrt](?=[a-z]{2,})(?=.*['"`])
  556. # Markdown anchor links
  557. \(#\S*?[a-zA-Z]\S*?\)
  558. # apache
  559. a2(?:en|dis)
  560. # weak e-tag
  561. W/"[^"]+"
  562. # authors/credits
  563. ^\*(?: [A-Z](?:\w+|\.)){2,} (?=\[|$)
  564. # the negative lookahead here is to allow catching 'templatesz' as a misspelling
  565. # but to otherwise recognize a Windows path with \templates\foo.template or similar:
  566. \\(?:necessary|r(?:elease|eport|esolve[dr]?|esult)|t(?:arget|emplates?))(?![a-z])
  567. # ignore long runs of a single character:
  568. \b([A-Za-z])\g{-1}{3,}\b
  569. # version suffix <word>v#
  570. (?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
  571. # Compiler flags (Unix, Java/Scala)
  572. # Use if you have things like `-Pdocker` and want to treat them as `docker`
  573. #(?:^|[\t ,>"'`=(#])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})
  574. # Compiler flags (Windows / PowerShell)
  575. # This is a subset of the more general compiler flags pattern.
  576. # It avoids matching `-Path` to prevent it from being treated as `ath`
  577. #(?:^|[\t ,"'`=(#])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))
  578. # Compiler flags (linker)
  579. ,-B
  580. # libraries
  581. (?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])
  582. # WWNN/WWPN (NAA identifiers)
  583. \b(?:0x)?10[0-9a-f]{14}\b|\b(?:0x|3)?[25][0-9a-f]{15}\b|\b(?:0x|3)?6[0-9a-f]{31}\b
  584. # iSCSI iqn (approximate regex)
  585. \biqn\.[0-9]{4}-[0-9]{2}(?:[\.-][a-z][a-z0-9]*)*\b
  586. # curl arguments
  587. \b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*
  588. # set arguments
  589. \b(?:bash|sh|set)(?:\s+[-+][abefimouxE]{1,2})*\s+[-+][abefimouxE]{3,}(?:\s+[-+][abefimouxE]+)*
  590. # tar arguments
  591. \b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
  592. # tput arguments -- https://man7.org/linux/man-pages/man5/terminfo.5.html -- technically they can be more than 5 chars long...
  593. \btput\s+(?:(?:-[SV]|-T\s*\w+)\s+)*\w{3,5}\b
  594. # macOS temp folders
  595. /var/folders/\w\w/[+\w]+/(?:T|-Caches-)/
  596. # github runner temp folders
  597. /home/runner/work/_temp/[-_/a-z0-9]+