Skip to content

Commit

Permalink
Upgrade to check-spelling v0.0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Dec 10, 2024
1 parent e0ba9aa commit 82b8383
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 216 deletions.
2 changes: 1 addition & 1 deletion .github/actions/spelling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ File | Purpose | Format | Info
[advice.md](advice.md) | Supplement for GitHub comment when unrecognized words are found | GitHub Markdown | [advice](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice)

Note: you can replace any of these files with a directory by the same name (minus the suffix)
and then include multiple files inside that directory (with that suffix) to merge multiple files.
and then include multiple files inside that directory (with that suffix) to merge multiple files together.
5 changes: 4 additions & 1 deletion .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ipmo
IPortable
ISAPPROVEDFOROUTPUT
IUnknown
JDKs
langutil
lastwritetime
LCIDTo
Expand Down Expand Up @@ -276,6 +277,7 @@ rethrowing
roadmap
robuffer
rowcount
rowids
rubengustorage
ruleset
runas
Expand Down Expand Up @@ -392,10 +394,11 @@ vso
wapproj
wcsicmp
webpage
websites
WHOLECHAIN
wil
windbg
wincrypt
windbg
WINEVENT
winget
winhttp
Expand Down
82 changes: 69 additions & 13 deletions .github/actions/spelling/candidate.patterns
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ accounts\.binance\.com/[a-z/]*oauth/authorize\?[-0-9a-zA-Z&%]*
\bmedium\.com/@?[^/\s"]+/[-\w]+

# microsoft
\b(?:https?://|)(?:(?:download\.visualstudio|docs|msdn2?|research)\.microsoft|blogs\.msdn)\.com/[-_a-zA-Z0-9()=./%]*
\b(?:https?://|)(?:(?:(?:blogs|download\.visualstudio|docs|msdn2?|research)\.|)microsoft|blogs\.msdn)\.co(?:m|\.\w\w)/[-_a-zA-Z0-9()=./%]*
# powerbi
\bapp\.powerbi\.com/reportEmbed/[^"' ]*
# vs devops
Expand Down Expand Up @@ -405,7 +405,7 @@ ipfs://[0-9a-zA-Z]{3,}
# Punycode
\bxn--[-0-9a-z]+
# sha
sha\d+:[0-9]*[a-f]{3,}[0-9a-f]*
sha\d+:[0-9a-f]*?[a-f]{3,}[0-9a-f]*
# sha-... -- uses a fancy capture
(\\?['"]|")[0-9a-f]{40,}\g{-1}
# hex runs
Expand All @@ -425,6 +425,9 @@ sha\d+:[0-9]*[a-f]{3,}[0-9a-f]*
# pki
-----BEGIN.*-----END

# pki (base64)
LS0tLS1CRUdJT.*

# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
# hex digits including css/html color classes:
Expand All @@ -446,11 +449,23 @@ integrity=(['"])(?:\s*sha\d+-[-a-zA-Z=;:/0-9+]{40,})+\g{-1}
Name\[[^\]]+\]=.*

# IServiceProvider / isAThing
(?:\b|_)(?:I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z]|\b))
(?:\b|_)(?:(?:ns|)I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z\d]|\b))

# crypt
(['"])\$2[ayb]\$.{56}\g{-1}

# apache/old crypt
(['"]|)\$+(?:apr|)1\$+.{8}\$+.{22}\g{-1}

# sha1 hash
\{SHA\}[-a-zA-Z=;:/0-9+]{3,}

# machine learning (?)
#\b(?i)ml(?=[a-z]{2,})

# python
\b(?i)py(?!gments|gmy|lon|ramid|ro|th)(?=[a-z]{2,})

# scrypt / argon
\$(?:scrypt|argon\d+[di]*)\$\S+

Expand All @@ -463,8 +478,17 @@ Name\[[^\]]+\]=.*
# scala modules
("[^"]+"\s*%%?\s*){2,3}"[^"]+"

# container images
image: [-\w./:@]+

# Docker images
^\s*FROM\s+\S+:\S+(?:\s+AS\s+\S+|)

# `docker images` REPOSITORY TAG IMAGE ID CREATED SIZE
\s*\S+/\S+\s+\S+\s+[0-9a-f]{8,}\s+\d+\s+(?:hour|day|week)s ago\s+[\d.]+[KMGT]B

# Intel intrinsics
_mm_\w+
_mm_(?!dd)\w+

# Input to GitHub JSON
content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
Expand All @@ -473,15 +497,15 @@ content: (['"])[-a-zA-Z=;:/0-9+]*=\g{-1}
# you'll want to remove the `(?=.*?")` suffix.
# The `(?=.*?")` suffix should limit the false positives rate
# printf
#%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA]|p)(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"])
%(?:(?:(?:hh?|ll?|[jzt])?[diuoxn]|l?[cs]|L?[fega]|p)(?=[a-z]{2,})|(?:X|L?[FEGA])(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"])

# Alternative printf
# %s
%(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"])
%(?:s(?=[a-z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%[^s])\b)(?=.*?['"])

# Python string prefix / binary prefix
# 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
(?<!['"])\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,})
#(?<!['"])\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,})

# Regular expressions for (P|p)assword
\([A-Z]\|[a-z]\)[a-z]+
Expand Down Expand Up @@ -535,16 +559,25 @@ go install(?:\s+[a-z]+\.[-@\w/.]+)+
# jetbrains schema https://youtrack.jetbrains.com/issue/RSRP-489571
urn:shemas-jetbrains-com

# Debian changelog severity
[-\w]+ \(.*\) (?:\w+|baseline|unstable|experimental); urgency=(?:low|medium|high|emergency|critical)\b

# kubernetes pod status lists
# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
\w+(?:-\w+)+\s+\d+/\d+\s+(?:Running|Pending|Succeeded|Failed|Unknown)\s+

# kubectl - pods in CrashLoopBackOff
\w+-[0-9a-f]+-\w+\s+\d+/\d+\s+CrashLoopBackOff\s+

# kubernetes applications
\.apps/[-\w]+

# kubernetes object suffix
-[0-9a-f]{10}-\w{5}\s

# kubernetes crd patterns
^\s*pattern: .*$

# posthog secrets
([`'"])phc_[^"',]+\g{-1}

Expand Down Expand Up @@ -575,17 +608,25 @@ PrependWithABINamepsace
(['"])[Bb]asic [-a-zA-Z=;:/0-9+]{3,}\g{-1}

# base64 encoded content
([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1}
#([`'"])[-a-zA-Z=;:/0-9+]{3,}=\g{-1}
# base64 encoded content in xml/sgml
>[-a-zA-Z=;:/0-9+]{3,}=</
# base64 encoded content, possibly wrapped in mime
#(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$)
# base64 encoded json
\beyJ[-a-zA-Z=;:/0-9+]+
# base64 encoded pkcs
\bMII[-a-zA-Z=;:/0-9+]+

# DNS rr data
(?:\d+\s+){3}(?:[-+/=.\w]{2,}\s*){1,2}

# encoded-word
=\?[-a-zA-Z0-9"*%]+\?[BQ]\?[^?]{0,75}\?=

# numerator
\bnumer\b(?=.*denom)

# Time Zones
\b(?:Africa|Atlantic|America|Antarctica|Asia|Australia|Europe|Indian|Pacific)(?:/\w+)+

Expand All @@ -605,6 +646,12 @@ systemd.*?running in system mode \([-+].*\)$
(?:(?:\w|\s|[,.])*\b(?i)(?:amet|consectetur|cursus|dolor|eros|ipsum|lacus|libero|ligula|lorem|magna|neque|nulla|suscipit|tempus)\b(?:\w|\s|[,.])*)

# Non-English
# 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.
#
# 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.
#
# 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:
# https://docs.check-spelling.dev/Feature:-Configurable-word-characters.html#unicode
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,}

# highlighted letters
Expand All @@ -614,9 +661,6 @@ systemd.*?running in system mode \([-+].*\)$
# This corpus only had capital letters, but you probably want lowercase ones as well.
\b[LN]'+[a-z]{2,}\b

# latex (check-spelling <= 0.0.21)
\\(?:n(?:ew|ormal|osub)|r(?:enew)|t(?:able(?:of|)|he|itle))(?=[a-z]+)

# latex (check-spelling >= 0.0.22)
\\\w{2,}\{

Expand All @@ -629,8 +673,14 @@ TeX/AMS
# eslint
"varsIgnorePattern": ".+"

# nolint
nolint:\w+

# Windows short paths
[/\\][^/\\]{5,6}~\d{1,2}[/\\]
[/\\][^/\\]{5,6}~\d{1,2}(?=[/\\])

# Windows Resources with accelerators
\b[A-Z]&[a-z]+\b(?!;)

# cygwin paths
/cygdrive/[a-zA-Z]/(?:Program Files(?: \(.*?\)| ?)(?:/[-+.~\\/()\w ]+)*|[-+.~\\/()\w])+
Expand All @@ -641,12 +691,18 @@ TeX/AMS
# alternate printf markers if you run into latex and friends
#(?<!\\)\\[nrt](?=[a-z]{2,})(?=.*['"`])

# Markdown anchor links
\(#\S*?[a-zA-Z]\S*?\)

# apache
a2(?:en|dis)

# weak e-tag
W/"[^"]+"

# authors/credits
^\*(?: [A-Z](?:\w+|\.)){2,} (?=\[|$)

# the negative lookahead here is to allow catching 'templatesz' as a misspelling
# but to otherwise recognize a Windows path with \templates\foo.template or similar:
\\(?:necessary|r(?:elease|eport|esolve[dr]?|esult)|t(?:arget|emplates?))(?![a-z])
Expand All @@ -669,7 +725,7 @@ W/"[^"]+"
,-B

# libraries
\blib(?!erty|rar(?:i(?:an|es)|y))(?=[a-z])
(?:\b|_)lib(?:re(?=office)|)(?!era[lt]|ero|erty|rar(?:i(?:an|es)|y))(?=[a-z])

# WWNN/WWPN (NAA identifiers)
\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
Expand Down
26 changes: 7 additions & 19 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
(?:^|/)(?i)LICEN[CS]E
(?:^|/)(?i)third[-_]?party/
(?:^|/)3rdparty/
(?:^|/)AUTHORS$
(?:^|/)generated/
(?:^|/)go\.sum$
(?:^|/)Microsoft\.Management\.Deployment\.winmd$
(?:^|/)package(?:-lock|)\.json$
(?:^|/)Pipfile$
(?:^|/)PSGet\.Resource\.psd1$
(?:^|/)pyproject.toml
(?:^|/)requirements(?:-dev|-doc|-test|)\.txt$
(?:^|/)vendor/
(?:^|/|\b)requirements(?:-dev|-doc|-test|)\.txt$
/ExternalModules/
/shared\.manifest$
/thirdparty/
/TestData/
[^/]\.msi$
\.a$
\.ai$
\.all-contributorsrc$
\.avi$
\.bmp$
\.bz2$
\.cer$
\.cert?$|\.crt$
\.class$
\.coveragerc$
\.crl$
\.crt$
\.csr$
\.dll$
\.docx?$
Expand Down Expand Up @@ -54,9 +53,6 @@
\.mo$
\.mod$
\.mp[34]$
\.msix$
\.msi$
\.msixbundle$
\.o$
\.ocf$
\.otf$
Expand All @@ -65,7 +61,7 @@
\.pdf$
\.pem$
\.pfx$
(?i)\.png$
\.png$
\.psd$
\.pyc$
\.pylintrc$
Expand All @@ -88,7 +84,6 @@
\.wav$
\.webm$
\.webp$
\.winmd$
\.woff2?$
\.xcf$
\.xlsx?$
Expand All @@ -102,17 +97,10 @@
^Localization/
^NOTICE
^src/AppInstallerCLICore/Commands/ExperimentalCommand\.cpp$
^src/AppInstallerCLIE2ETests/TestData/Configuration/Empty.yml$
^src/AppInstallerCLITests/TestData/InputARPData.txt$
^src/AppInstallerCLITests/TestData/InputNames.txt$
^src/AppInstallerCLITests/TestData/InputPublishers.txt$
^src/AppInstallerCLITests/TestData/NormalizationInitialIds.txt$
^src/AppInstallerCommonCore/external/do.h$
^src/catch2/
^src/cpprestsdk/
^src/JsonCppLib/
^src/PowerShell/ExternalModules/PowerShellGet/2\.2\.5/Modules/
^src/PowerShell/Help/markdownlint.yaml$
^src/PowerShell/Help/markdownlint\.yaml$
^src/PureLib/
^src/SfsClient/
^src/UndockedRegFreeWinRT/
Expand Down
Loading

0 comments on commit 82b8383

Please sign in to comment.