Skip to content

Commit

Permalink
Use check-spelling/check-spelling@v0.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Aug 22, 2022
1 parent 72f4a8c commit 686177e
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 69 deletions.
16 changes: 16 additions & 0 deletions .github/actions/spelling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# check-spelling/check-spelling configuration

File | Purpose | Format | Info
-|-|-|-
[dictionary.txt](dictionary.txt) | Replacement dictionary (creating this file will override the default dictionary) | one word per line | [dictionary](https://github.com/check-spelling/check-spelling/wiki/Configuration#dictionary)
[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[expect.txt](expect.txt) | Expected words that aren't in the dictionary | one word per line (sorted, alphabetically) | [expect](https://github.com/check-spelling/check-spelling/wiki/Configuration#expect)
[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 together.
25 changes: 25 additions & 0 deletions .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-advice --> <!-- markdownlint-disable MD033 MD041 -->
<details><summary>If the flagged items are false positives</summary>

If items relate to a ...
* binary file (or some other file you wouldn't want to check at all).

Please add a file path to the `excludes.txt` file matching the containing file.

File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).

* well-formed pattern.

If you can write a [pattern](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns) that would match it,
try adding it to the `patterns.txt` file.

Patterns are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your lines.

Note that patterns can't match multiline strings.

</details>
22 changes: 0 additions & 22 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,33 +216,19 @@ http
https
HWND
Hyperlink
IActivation
IApplication
IAppx
IAsync
IBuffer
icu
IDeserializer
IDisposable
IDX
IEnumerable
IEquatable
IEquitable
IFACEMETHOD
ifdef
ifndef
ifstream
IInput
IInspectable
IIS
ILogger
IManifest
impl
inapplicabilities
Inet
inheritdoc
inno
INotify
INPROC
Inq
installertype
Expand All @@ -254,21 +240,13 @@ INSTALLPATH
INSTALLUILEVEL
interop
INVALIDARG
IObservable
iomanip
iostream
IOutput
IProgress
IRandom
IRest
ISAPPROVEDFOROUTPUT
ISet
ISource
isspace
istream
istringstream
isxdigit
ITest
IUnknown
json
junit
Expand Down
36 changes: 34 additions & 2 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,71 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)go\.sum$
(?:^|/)package(?:-lock|)\.json$
(?:^|/)vendor/
/shared\.manifest$
ignore$
\.a$
\.ai$
\.avi$
\.bmp$
\.bz2$
\.cer$
\.crt$
\.dll$
\.DS_Store$
\.eot$
\.exe$
\.gif$
\.gitattributes$
\.graffle$
\.gz$
\.icns$
\.ico$
\.jar$
\.jpe?g$
\.key$
\.lib$
\.lock$
\.map$
\.min\.
\.mod$
\.mp[34]$
\.msix$
\.msixbundle$
\.o$
\.ocf$
\.otf$
\.pdf$
\.pem$
\.png$
\.psd$
\.s$
\.sln$
\.svg$
\.tiff?$
\.ttf$
\.vcxitems$
\.vcxproj$
\.vcxproj\.filters$
\.vdproj$
\.wapproj$
\.wav$
\.webm$
\.webp$
\.winmd$
\.woff2?$
\.zip$
^cgmanifest\.json$
^Localization/
^NOTICE$
^src/AppInstallerCLICore/Commands/ExperimentalCommand\.cpp$
^src/AppInstallerCLIE2ETests/TestData/AppInstallerTestMsiInstaller.msi$
^src/AppInstallerCLITests/TestData/InputARPData.txt$
^src/AppInstallerCLITests/TestData/InputNames.txt$
^src/AppInstallerCLITests/TestData/InputPublishers.txt$
^src/AppInstallerCLITests/TestData/NormalizationInitialIds.txt$
^src/AppInstallerCLIE2ETests/TestData/AppInstallerTestMsiInstaller.msi$
^src/AppInstallerCommonCore/external/do.h$
^src/catch2/
^src/cpprestsdk/
Expand All @@ -44,4 +75,5 @@ ignore$
^src/YamlCppLib/
# Because it doesn't handle argument -Words well
^tools/CorrelationTestbed/.*\.ps1$
^\.github/
^\.github/actions/spelling/
^\Q.github/workflows/spelling.yml\E$
36 changes: 7 additions & 29 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ badbit
Baz
bcp
BEFACEF
BEFACEFE
Beigi
bfd
BFirst
bght
Expand All @@ -57,6 +55,7 @@ BOMs
boundparms
brk
Browsable
BSODs
Buf
buildtransitive
BUILTINS
Expand Down Expand Up @@ -105,6 +104,7 @@ desktopappinstaller
dirs
diskfull
dllimport
DMPAs
dnld
Dobbeleer
Dsc
Expand All @@ -125,10 +125,9 @@ etest
execustom
EXEHASH
experimentalfeatures
fcb
FECAFEB
fd
fdw
FECAFEB
fedorapeople
fileinuse
Filtercriteria
Expand Down Expand Up @@ -170,44 +169,23 @@ hresults
htm
IARP
IAttachment
IConfiguration
ICreate
idx
IEnum
IFACEMETHODIMP
IFile
IFind
IGlobal
IHelp
IHost
iid
IInstall
IInstance
IISOn
img
IMutable
IName
inet
inor
installinprogress
installshield
insufficientmemory
Intelli
IPackage
IPersist
IRead
IService
ISettings
IShell
ishelp
ISQ
issuecomment
ISVs
itr
IUninstall
IVector
IWeb
IZone
jdk
jfearn
JObject
Expand All @@ -216,8 +194,6 @@ jpalardy
JREs
jrsoftware
jsoncpp
kayone
Keivan
KF
KNOWNFOLDERID
Kp
Expand All @@ -239,7 +215,6 @@ localizationpriority
LPBYTE
LPDWORD
lpitemidlist
LPITEMIDLIST
LPWCH
LPWSTR
LSTATUS
Expand Down Expand Up @@ -289,7 +264,6 @@ normer
NOSEPARATOR
NOTAPROPERTY
notmatch
npp
nsis
nuffing
nullopt
Expand Down Expand Up @@ -403,14 +377,17 @@ SUSE
swervy
SYD
SYG
Syncy
sysrefcomp
Tagit
TCpp
Templating
temppath
testexampleinstaller
textarea
thiscouldbeapc
threehundred
timezone
Tlg
tombstoned
TOptions
Expand All @@ -423,6 +400,7 @@ TState
TStatus
typeof
typeparam
ubuntu
UCase
ucasemap
UChars
Expand Down
48 changes: 48 additions & 0 deletions .github/actions/spelling/line_forbidden.patterns
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# reject `m_data` as there's a certain OS which has evil defines that break things if it's used elsewhere
# \bm_data\b

# s.b. GitHub
\bGithub\b

# s.b. GitLab
\bGitlab\b

# s.b. JavaScript
\bJavascript\b

# s.b. Microsoft
\bMicroSoft\b

# s.b. another
\ban[- ]other\b

# s.b. greater than
\bgreater then\b

# s.b. less than
\bless then\b

# s.b. otherwise
\bother[- ]wise\b

# s.b. nonexistent
\bnon existing\b
\b[Nn]o[nt][- ]existent\b

# s.b. preexisting
[Pp]re-existing

# s.b. preempt
[Pp]re-empt\b

# s.b. preemptively
[Pp]re-emptively

# s.b. reentrancy
[Rr]e-entrancy

# s.b. reentrant
[Rr]e-entrant

# Reject duplicate words
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s
Loading

0 comments on commit 686177e

Please sign in to comment.