# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns

# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$
# marker for ignoring a comment to the end of the line
// #no-spell-check.*$

# Gaelic
Gàidhlig

Ov_erwrite

# languageHashTable
"\w+(?:-\w+|)"\s+=\s+@\(".*"\)

# Regular expression with `\b`
\\b(?=[a-z]\S*\{)

# long lorem
L"Lorem.*"

# tabs in c#
\$"\\t

# Hexadecimal character pattern in code
\\x[0-9a-fA-F]{4}

fontFamily": ".*"

D[23]D(?=[A-Z][a-z])
(?<=[a-z])3D(?=[A-Z])

\.monitorId = \{ .*\}

json::value\(L"\S+"

# windows line breaks in strings
\\r\\n(?=[A-Za-z])

# power shell gallery website
\bpowershellgallery.com/[-_a-zA-Z0-9()=./%]*

# uuid: (or CompGUIDPrefix)
L?(["']|[-<({>]|\b)[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{10,12}(?:\g{-1}|[<})>])

(?:L"[abAB]+", ){3}L"[abAB]+"

\. (?: @[-A-Za-z\d]+\b(?!\.[A-Z]),?)+

auto deviceId = L".*"
deviceId(?:\.id|) = L".*"

StringComparer.OrdinalIgnoreCase\) \{.*\}

# namespaces
\b[a-z]+::

"Author": ".+"

(?:Include|Link)=".*?"

# You could ignore `xmlns`, but it's probably better to enforce rules about them...
#\s(?:xmlns:[a-z]+(?:[A-Z][a-z]+|)=|[a-z]+(?:[A-Z][a-z]+):(?=[a-z]+=))

# UnitTests
\[DataRow\(.*\)\]

# AdditionalDependencies
<AdditionalDependencies>.*<

# the last line of mimetype="application/x-microsoft.net.object.bytearray.base64" things in .resx files
^\s*[-a-zA-Z=;:/0-9+]*[-a-zA-Z;:/0-9+][-a-zA-Z=;:/0-9+]*=$

# Automatically suggested patterns

# hit-count: 5402 file-count: 1339
# IServiceProvider / isAThing
(?:(?:\b|_|(?<=[a-z]))[IT]|(?:\b|_)(?:nsI|isA))(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))

# hit-count: 2073 file-count: 842
# #includes
^\s*#include\s*(?:<.*?>|".*?")

# hit-count: 1639 file-count: 855
# C# includes
^\s*using [^;]+;

# hit-count: 1491 file-count: 693
# microsoft
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*

# hit-count: 398 file-count: 133
# hex digits including css/html color classes:
(?:[\\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

# hit-count: 339 file-count: 146
# hex runs
\b[0-9a-fA-F]{16,}\b

# hit-count: 253 file-count: 100
# GitHub SHAs (markdown)
(?:\[`?[0-9a-f]+`?\]\(https:/|)/(?:www\.|)github\.com(?:/[^/\s"]+){2,}(?:/[^/\s")]+)(?:[0-9a-f]+(?:[-0-9a-zA-Z/#.]*|)\b|)

# hit-count: 241 file-count: 37
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))

# hit-count: 141 file-count: 6
# Contributor / Project
\[[^\]\s]+\]\(https://github\.com/[^)]+\)(?: -(?: [A-Z]\S+)+|)|\[[^\]]+\]\(https://github\.com/(?:[^/\s"]+/?){1,2}\)

https://github.com/(?:[-\w]+/?){1,2}

# hit-count: 131 file-count: 125
# Repeated letters
\b([a-z])\g{-1}{2,}\b

# hit-count: 99 file-count: 97
# w3
\bw3\.org/[-0-9a-zA-Z/#.]+

# hit-count: 59 file-count: 11
# Markdown anchor links
\(#\S*?[a-zA-Z]\S*?\)

# hit-count: 29 file-count: 23
# stackexchange -- https://stackexchange.com/feeds/sites
\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/(?:questions/\w+/[-\w]+|a/)

# hit-count: 24 file-count: 11
# Library prefix
# e.g., `lib`+`archive`, `lib`+`raw`, `lib`+`unwind`
# (ignores some words that happen to start with `lib`)
(?:\b|_)[Ll]ib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])

# hit-count: 20 file-count: 2
# Intel intrinsics
_mm\d*_(?!dd)\w+

# hit-count: 15 file-count: 8
# Wikipedia
\ben\.wikipedia\.org/wiki/[-\w%.#]+

# hit-count: 14 file-count: 10
# vs devops
\bvisualstudio.com(?::443|)/[-\w/?=%&.]*

# hit-count: 8 file-count: 2
# copyright
Copyright (?:\([Cc]\)|)(?:[-\d, ]|and)+(?: [A-Z][a-z]+ [A-Z][a-z]+,?)+

# hit-count: 8 file-count: 1
# css fonts
\bfont(?:-family|):[^;}]+

aka\.ms/[a-zA-Z0-9]+

# hit-count: 8 file-count: 1
# kubernetes crd patterns
^\s*pattern: .*$

# hit-count: 5 file-count: 3
# URL escaped characters
%[0-9A-F][A-F](?=[A-Za-z])

# hit-count: 3 file-count: 3
# githubusercontent
/[-a-z0-9]+\.githubusercontent\.com/[-a-zA-Z0-9?&=_\/.]*

# hit-count: 2 file-count: 2
# medium
\bmedium\.com/@?[^/\s"]+/[-\w:/*.]+

# 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?&=_%]*

# hit-count: 2 file-count: 1
# GitHub actions
\buses:\s+[-\w.]+/[-\w./]+@[-\w.]+

# hit-count: 1 file-count: 1
# curl arguments
\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*

# hit-count: 1 file-count: 1
# tar arguments
\b(?:\\n|)g?tar(?:\.exe|)(?:(?:\s+--[-a-zA-Z]+|\s+-[a-zA-Z]+|\s[ABGJMOPRSUWZacdfh-pr-xz]+\b)(?:=[^ ]*|))+

# #pragma lib
^\s*#pragma comment\(lib, ".*?"\)

RegExp\(@?([`'"]).*?\g{-1}\)|(?:escapes|regEx):\s*(?:/.*/|([`'"]).*?\g{-1})|return/.*?/

# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
# https://www.tprteaching.com/log-into-log-in-to-login/
\b(?:(?:[Ll]og(?:g(?=[a-z])|)|[Ss]ign)(?:ed|ing)?) in to\b

# to opt in
\bto opt in\b

# pass(ed|ing) in
\bpass(?:ed|ing) in\b

# acceptable duplicates
# ls directory listings
[-bcdlpsw](?:[-r][-w][-SsTtx]){3}[\.+*]?\s+\d+\s+\S+\s+\S+\s+[.\d]+(?:[KMGT]|)\s+
# mount
\bmount\s+-t\s+(\w+)\s+\g{-1}\b
# C types and repeated CSS values
\s(auto|buffalo|center|div|inherit|long|LONG|none|normal|solid|thin|transparent|very)(?:\s\g{-1})+\s
# C enum and struct
\b(?:enum|struct)\s+(\w+)\s+\g{-1}\b
# go templates
\s(\w+)\s+\g{-1}\s+\`(?:graphql|inject|json|yaml):
# doxygen / javadoc / .net
(?:[\\@](?:brief|defgroup|groupname|link|t?param|return|retval)|(?:public|private|\[Parameter(?:\(.+\)|)\])(?:\s+(?:static|override|readonly|required|virtual))*)(?:\s+\{\w+\}|)\s+(\w+)\s+\g{-1}\s

# macOS file path
(?:Contents\W+|(?!iOS)/)MacOS\b

# Python package registry has incorrect spelling for macOS / Mac OS X
"Operating System :: MacOS :: MacOS X"

# "company" in Germany
\bGmbH\b

# IntelliJ
\bIntelliJ\b

# 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}\.$

# Compile flag added to Cpp.Build.props
_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING

# ignore long runs of a single character:
\b([A-Za-z])\g{-1}{3,}\b

# hit-count: 1 file-count: 1
# Amazon
\bamazon\.com/[-\w]+/(?:dp/[0-9A-Z]+|)

# hit-count: 3 file-count: 3
# imgur
\bimgur\.com/[^.]+

# Process Process (typename varname)
Process Process

# ZoomIt menu items with accelerator keys
E&xit
St&yle

# This matches a relative clause where the relative pronoun "that" is omitted.
# Example: "Gets or sets the window the TitleBar should configure."
\bthe\s+\w+\s+the\b

# Usernames with numbers
# 0x6f677548 is user name but user folder causes a flag
\bx6f677548\b

# Windows API constants and hardware interface terms
\bCOINIT[_A-Z]*\b
\bEOAC[_A-Z]*\b
\b(?:RPC_C_AUTHN_)?WINNT\b
\bUPDATEREGISTRY\b
\b(?:CDS_)?UPDATEREGISTRY\b

# Display interface terms (HDMI, DVI, DisplayPort)
\b(?:HDMI|DVI|DisplayPort)(?:-\d+)?\b

# 2D Region struct names
\bDisplayConfig2?D?Region\b

# Microsoft Store URLs and product IDs
ms-windows-store://\S+

# ANSI color codes
(?:\\(?:u00|x)1[Bb]|\\03[1-7]|\x1b|\\u\{1[Bb]\})\[\d+(?:;\d+)*m
