2021-03-18 02:27:30 +08:00
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
2022-07-27 18:39:46 +08:00
2022-11-30 03:41:22 +08:00
# Automatically suggested patterns
2023-11-03 01:16:29 +08:00
# hit-count: 3011 file-count: 842
# IServiceProvider / isAThing
\b(?:I|isA)(?=(?:[A-Z][a-z]{2,})+\b)
2022-11-30 03:41:22 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 2239 file-count: 134
2022-11-30 03:41:22 +08:00
# hex runs
\b[0-9a-fA-F]{16,}\b
2023-11-03 01:16:29 +08:00
# hit-count: 1868 file-count: 1
# sha-... -- uses a fancy capture
(\\?['"]|")[0-9a-f]{40,}\g{-1}
# hit-count: 1100 file-count: 97
# base64 encoded content, possibly wrapped in mime
(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$)
# hit-count: 426 file-count: 165
2022-11-30 03:41:22 +08:00
# GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)
2023-11-03 01:16:29 +08:00
# hit-count: 331 file-count: 117
# hex digits including css/html color classes:
(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
# hit-count: 275 file-count: 45
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# hit-count: 209 file-count: 97
2022-11-30 03:41:22 +08:00
# w3
\bw3\.org/[-0-9a-zA-Z/#.]+
2023-11-03 01:16:29 +08:00
# hit-count: 137 file-count: 38
# alternate markers if you run into latex and friends
(?<!\\)\\[nrt](?=[a-z]{2,})(?=.*['"`](?:, "[^{]|\]))
2022-11-30 03:41:22 +08:00
2023-11-03 01:16:29 +08:00
# tabs in c#
\$"\\t
2024-05-31 16:47:31 +08:00
# Hexadecimal character pattern in code
\\x[0-9a-fA-F][0-9a-fA-F]
2023-11-03 01:16:29 +08:00
# windows line breaks in strings
\\r\\n
# hit-count: 104 file-count: 43
# regex choice
\(\?:[^)]+\|[^)]+\)
# hit-count: 76 file-count: 28
# base64 encoded content
([`'"])[-a-zA-Z=;:/0-9+]+=\g{-1}
# hit-count: 70 file-count: 5
# Contributor
\[[^\]]+\]\(https://github\.com/[^/\s"]+/?\)
2022-11-30 03:41:22 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 28 file-count: 22
2022-11-30 03:41:22 +08:00
# stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)
2023-11-03 01:16:29 +08:00
# hit-count: 21 file-count: 2
# 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 )
# 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 -
# Warning, while `(?i)` is very neat and fancy, if you have some binary files that aren't proper unicode, you might run into:
## Operation "substitution (s///)" returns its argument for non-Unicode code point 0x1C19AE (the code point will vary).
## You could manually change `(?i)X...` to use `[Xx]...`
## or you could add the files to your `excludes` file (a version after 0.0.19 should identify the file path)
# Lorem
(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*
# hit-count: 18 file-count: 15
# microsoft
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
# hit-count: 14 file-count: 5
# githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*
# hit-count: 14 file-count: 3
# node packages
(["'])\@[^/'" ]+/[^/'" ]+\g{-1}
# hit-count: 10 file-count: 4
# URL escaped characters
\%[0-9A-F][A-F]
# hit-count: 9 file-count: 5
2022-11-30 03:41:22 +08:00
# Wikipedia
\ben\.wikipedia\.org/wiki/[-\w%.#]+
2023-11-03 01:16:29 +08:00
# hit-count: 6 file-count: 3
# css url wrappings
\burl\([^)]+\)
2022-11-30 03:41:22 +08:00
# hit-count: 5 file-count: 3
# vs devops
\bvisualstudio.com(?::443|)/[-\w/?=%&.]*
2023-11-03 01:16:29 +08:00
# hit-count: 4 file-count: 3
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}
# hit-count: 4 file-count: 2
# data url in quotes
([`'"])data:(?:[^ `'"].*?|)(?:[A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,}).*\g{-1}
2022-11-30 03:41:22 +08:00
# hit-count: 2 file-count: 2
# mailto urls
mailto:[-a-zA-Z=;:/?%&0-9+@.]{3,}
2021-03-18 02:27:30 +08:00
# msdn
2023-02-23 22:59:49 +08:00
\b(?:download\.visualstudio|docs|msdn|learn)\.microsoft\.com/[-_a-zA-Z0-9()=./]*
2023-05-16 06:32:26 +08:00
aka\.ms/[a-zA-Z0-9]+
2021-03-18 02:27:30 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 2 file-count: 1
# While you could try to match `http://` and `https://` by using `s?` in `https?://`, sometimes there
# YouTube url
\b(?:(?:www\.|)youtube\.com|youtu.be)/(?:channel/|embed/|user/|playlist\?list=|watch\?v=|v/|)[-a-zA-Z0-9?&=_%]*
2021-12-13 03:42:04 +08:00
2024-01-03 23:43:42 +08:00
# power shell gallery website
\bpowershellgallery.com/[-_a-zA-Z0-9()=./%]*
2022-03-18 01:19:16 +08:00
# uuid: (or CompGUIDPrefix)
L?(["']|[-<({>]|\b)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{10,12}(?:\g{-1}|[<})>])
2021-12-13 03:42:04 +08:00
2020-05-21 11:19:08 +08:00
(?:L"[abAB]+", ){3}L"[abAB]+"
2020-11-09 13:30:36 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
2021-01-21 02:15:45 +08:00
# UnitTests
\[DataRow\(.*\)\]
2022-03-18 01:19:16 +08:00
# D2D
2022-11-30 03:41:22 +08:00
D?2D
2022-03-18 01:19:16 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 1 file-count: 1
# GHSA
GHSA(?:-[0-9a-z]{4}){3}
# hit-count: 1 file-count: 1
# medium
\bmedium\.com/\@?[^/\s"]+/[-\w]+
2021-03-18 02:27:30 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 1 file-count: 1
# kubectl.kubernetes.io/last-applied-configuration
"kubectl.kubernetes.io/last-applied-configuration": ".*"
2022-03-18 01:19:16 +08:00
2023-11-03 01:16:29 +08:00
# hit-count: 1 file-count: 1
2022-03-18 01:19:16 +08:00
# tar arguments
2023-11-03 01:16:29 +08:00
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+
\bSecur32
2022-07-01 22:09:41 +08:00
2022-11-30 03:41:22 +08:00
# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
# https://www.tprteaching.com/log-into-log-in-to-login/
2023-11-03 01:16:29 +08:00
\b(?:[Ll]og|[Ss]ign) in to\b
# to opt in
\bto opt in\b
2022-07-27 18:39:46 +08:00
2022-07-01 22:09:41 +08:00
# acceptable duplicates
2022-07-27 18:39:46 +08:00
# ls directory listings
2023-11-03 01:16:29 +08:00
[-bcdlpsw](?:[-r][-w][-Ssx]){3}\s+\d+\s+\S+\s+\S+\s+\d+\s+
# mount
\bmount\s+-t\s+(\w+)\s+\g{-1}\b
2022-11-30 03:41:22 +08:00
# C types and repeated CSS values
2023-11-03 01:16:29 +08:00
\s(auto|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?: \g{-1})+\s
# C struct
\bstruct\s+(\w+)\s+\g{-1}\b
2022-11-30 03:41:22 +08:00
# go templates
2023-11-03 01:16:29 +08:00
\s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml):
# doxygen / javadoc / .net
(?:[\\@](?:brief|groupname|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+static|\s+override|\s+readonly)*)(?:\s+\{\w+\}|)\s+(\w+)\s+\g{-1}\s
2022-11-30 03:41:22 +08:00
# Commit message -- Signed-off-by and friends
^\s*(?:(?:Based-on-patch|Co-authored|Helped|Mentored|Reported|Reviewed|Signed-off)-by|Thanks-to): (?:[^<]*<[^>]*>|[^<]*)\s*$
# Autogenerated revert commit message
^This reverts commit [0-9a-f]{40}\.$
2022-07-01 22:09:41 +08:00
2023-10-19 22:04:09 +08:00
# Compile flag added to Cpp.Build.props
_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING
2022-07-01 22:09:41 +08:00
# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b