Skip to content

Commit

Permalink
Add check-spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Oct 16, 2024
1 parent 9f820af commit 9d1ac5a
Showing 1 changed file with 169 additions and 0 deletions.
169 changes: 169 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: Check Spelling

# Comment management is handled through a secondary job, for details see:
# https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
#
# `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
# (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)
# it needs `contents: write` in order to add a comment.
#
# `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
# or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
# it needs `pull-requests: write` in order to manipulate those comments.

# Updating pull request branches is managed via comment handling.
# For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
#
# These elements work together to make it happen:
#
# `on.issue_comment`
# This event listens to comments by users asking to update the metadata.
#
# `jobs.update`
# This job runs in response to an issue_comment and will push a new commit
# to update the spelling metadata.
#
# `with.experimental_apply_changes_via_bot`
# Tells the action to support and generate messages that enable it
# to make a commit to update the spelling metadata.
#
# `with.ssh_key`
# In order to trigger workflows when the commit is made, you can provide a
# secret (typically, a write-enabled github deploy key).
#
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key

# SARIF reporting
#
# Access to SARIF reports is generally restricted (by GitHub) to members of the repository.
#
# Requires enabling `security-events: write`
# and configuring the action with `use_sarif: 1`
#
# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-SARIF-output

# Minimal workflow structure:
#
# on:
# push:
# ...
# pull_request_target:
# ...
# jobs:
# # you only want the spelling job, all others should be omitted
# spelling:
# # remove `security-events: write` and `use_sarif: 1`
# # remove `experimental_apply_changes_via_bot: 1`
# ... otherwise adjust the `with:` as you wish

on:
push:
branches:
- "**"
tags-ignore:
- "**"
pull_request_target:
branches:
- "**"
types:
- "opened"
- "reopened"
- "synchronize"
issue_comment:
types:
- "created"

jobs:
spelling:
name: Check Spelling
permissions:
contents: read
pull-requests: read
actions: read
security-events: write
outputs:
followup: ${{ steps.spelling.outputs.followup }}
runs-on: ubuntu-latest
if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }}
concurrency:
group: spelling-${{ github.event.pull_request.number || github.ref }}
# note: If you use only_check_changed_files, you do not want cancel-in-progress
cancel-in-progress: true
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@prerelease
with:
suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
checkout: true
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@prerelease
post_comment: 0
use_magic_file: 1
report-timing: 1
warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end
experimental_apply_changes_via_bot: 1
use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }}
extra_dictionary_limit: 20
extra_dictionaries: |
cspell:software-terms/dict/softwareTerms.txt
comment-push:
name: Report (Push)
# If your workflow isn't running on push, you can remove this job
runs-on: ubuntu-latest
needs: spelling
permissions:
actions: read
contents: write
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@prerelease
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}

comment-pr:
name: Report (PR)
# If you workflow isn't running on pull_request*, you can remove this job
runs-on: ubuntu-latest
needs: spelling
permissions:
actions: read
contents: read
pull-requests: write
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request')
steps:
- name: comment
uses: check-spelling/check-spelling@prerelease
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
task: ${{ needs.spelling.outputs.followup }}
experimental_apply_changes_via_bot: 1

update:
name: Update PR
permissions:
contents: write
pull-requests: write
actions: read
runs-on: ubuntu-latest
if: ${{
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '@check-spelling-bot apply') &&
contains(github.event.comment.body, 'https://')
}}
concurrency:
group: spelling-update-${{ github.event.issue.number }}
cancel-in-progress: false
steps:
- name: apply spelling updates
uses: check-spelling/check-spelling@prerelease
with:
experimental_apply_changes_via_bot: 1
checkout: true
ssh_key: "${{ secrets.CHECK_SPELLING }}"

1 comment on commit 9d1ac5a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (1128)
aafc
aarch
Aarea
abcd
abcdefghijkl
abspath
Acxk
addc
addding
addrs
admins
aebde
aed
Afll
agcfeedback
aggregatorclientsetscheme
ahmetb
Aissue
ajl
akwz
alex
allowedroutes
alphanum
alpn
amd
anagement
anns
anotherwildcard
antipatterns
Antonboom
Aopen
AOQE
apierrors
apiext
apiextensions
apiextensionsv
apimachinery
apiserver
apisix
apisv
APIV
apk
appengine
appgwcontainers
applyconfig
applyconfiguration
appns
appropach
apps
appsv
argoproj
argparse
Arko
arkodg
ateway
Atoi
Attacthed
atttached
Autoscaler
autoscaling
avi
aws
aya
Azjk
backendlbpolicy
backendlbpolicyspec
backendobjectreference
backendref
backendtlspolicy
backendtlspolicyspec
backendtlspolicyvalidation
backreference
baefe
bafa
bak
bax
baz
bba
bce
bda
bdg
bea
beb
becuase
bfeaeaf
Bfuf
Bhatia
bindata
binfmt
blbpolicy
blixt
BLWBY
Boby
bowei
bpf
BPMOLZ
BPUBLIC
breadcrumb
brg
brianehlert
briantkennedy
bsd
btlspolicy
buf
bufsize
buildid
buildvcs
buildx
Bwith
bzl
caa
caboteria
CACERTS
cadec
callouts
canarying
candita
carlisia
CAs
cbonte
cca
ccf
CDCA
cdn
cdu
cea
ceb
cel
certficate
certgen
Certicate
Certifcate
certs
cespare
cfb
CFeature
cfg
cflags
cfxzle
CGO
Chaning
cheatsheet
Chfmjo
chihiro
ciarams
cidr
circuitbreaker
CLA
cleartext
clientcmd
clientset
clientsetscheme
CLIs
CLodt
cloudbuild
clusterset
cmds
Cmo
cmp
cncf
Cnt
codegen
codeowner
colocation
commonroutespec
compat
concat
confdir
configitem
configuation
conformanceconfig
conformancereport
confv
consts
containerregistry
controlplane
cookieconfig
coolmesh
copyloopvar
copytree
coredns
Corefile
corev
CORS
CPrior
craigbox
crd
crdgen
creds
cri
criterias
crt
CServer
ctx
customizability
customresourcedefinitions
cxclq
cxhiano
cxuq
CYqgy
czeslavo
danehans
danwinship
dataplane
datatracker
datetime
dbdd
DBwe
Dcase
dconv
Dcs
ddd
deab
Ded
deepcopy
deprecatedversion
deszhou
deterministicly
Devaansh
devguide
dfa
dfcc
Dhis
difflib
discoverabiity
discoverabilty
discoveryv
discussioncomment
distroless
diz
DLsfin
dministration
dms
dns
donath
doocs
doublechecks
downsides
dprotaso
drns
dsc
DTLS
dupl
durationpy
DXIWv
dzyoba
eac
easegress
eastwest
ebpf
eca
ecd
ECe
echoserver
eda
edaa
EDCHE
ede
edf
eeb
eee
eef
efd
efe
egressmtls
ehj
eks
Elems
elif
emoji
enapsulated
endpointslices
endraw
envoyproxy
epicdocs
epick
epicsource
Eqe
EQUPWe
errchan
errcheck
errexit
errgroup
Errorf
errorlint
esac
esh
evd
expprob
extendee
externalname
externalversions
ezhl
fabe
fakediscovery
fakegatewayv
faria
fastcgi
Fatalf
Fature
fbdc
fbed
Fconformance
fded
FDTZ
ffdefed
Ffeature
fff
Fgateway
fgw
filesysem
fillna
finalizer
firstword
FKsx
fkz
flomesh
fnmatch
Followups
fontawesome
foodprep
foramat
formatf
Fprint
Fprintf
Fprintln
frakbu
frankbu
frf
Frjd
frontends
frontendtlsvalidation
fsm
ftp
Fuk
fullstorydev
funcs
fypt
Gatewa
gatewayaddress
gatewayapi
gatewayapiapisv
gatewaybackendtls
gatewayclass
gatewayclasses
gatewayclassspec
gatewayclassstatus
gatewaycontroller
gatewayinfrastructure
gatewayspec
gatewaystatus
gatewaystatusaddress
gatewaytlsconfig
gatewayv
gauravkghildiyal
GBk
gcloud
gcr
gcrane
gcs
genclient
gendoc
generatebzl
generatego
genproto
gentype
gep
gepdetail
getambassador
Getenv
getopts
gettingstarted
ghp
Ghs
ginayeh
githubuser
gke
glog
gloo
gloogateway
Glv
gmail
GNLP
gnossen
GOBIN
gocritic
gocyclo
godoc
GOFLAGS
gofmt
gofumpt
goimports
golangci
golint
gomod
GOMODCACHE
gomodguard
google
googleapis
gopath
goreleaser
goroutines
gosec
gotime
govet
GPRC
GQK
grandfathered
Graphviz
groupkind
groupversion
grpcbackendref
grpcecho
grpcechoserver
grpcheadermatch
grpcmethodmatch
GRPCP
grpcroute
grpcroutefilter
grpcroutematch
grpcrouterule
grpcroutespec
grpcroutestatus
grpcurl
gtw
guicassolato
gvr
gwaddrs
gwapi
gwc
gwctl
gwspec
GXGQHo
gxlb
gyohuangxin
haproxytech
hashicorp
hashpolicy
hbagdi
HDB
headerlink
healthcheckpolicies
helloworld
HEYCg
Hgb
HKw
HOFl
hostnames
hostport
howardjohn
hpa
hroute
htd
HTPPS
HTT
httpbackendref
httpbin
httpheader
httpheaderfilter
httpheadermatch
httponly
httppathmatch
httppathmodifier
httpproxy
httpqueryparammatch
HTTPR
httpreqredirect
httprequestmirrorfilter
httprequestredirectfilter
httproute
httproutefilter
httproutematch
httprouteretry
httprouterule
httproutespec
httproutestatus
httproutetimeouts
httptest
HTTPURL
httpurlrewritefilter
httputil
httredirect
HUXV
hyperlinks
Iaa
ian
iana
icholy
IDLs
idx
ietf
iframe
IGjwj
Iie
iloc
Ilvfgcp
img
implmenetation
improvments
infrastrucutre
ingressmtls
inituitive
inlinehilite
inplace
integ
integrators
internalinterfaces
interoperate
ints
ioutil
IPAM
ipv
isabs
isovalent
issuecomment
issuepr
istio
isvalid
itertuples
IVzqxe
Ixb
jackstine
jakebennert
javaee
javascript
javax
jcpunk
jgao
Jlfukc
jongwooo
Jouin
jpeach
jsessionid
JTGt
JTpo
JWT
kccnceu
kccncna
kclientset
keepalive
KEIB
keithmattix
kevinpollet
keypair
kflynn
KGA
kgo
Kia
kic
Kjr
klabels
klient
KMCs
KMp
knative
KOk
konghq
krew
krouma
kuadrant
kube
kubebuilder
kubecon
kubeconfig
kubeproxy
kubernetes
kubernetesservicespec
kukreja
kuma
kumahq
kustomization
kustomize
KVs
kwargs
KWG
LAdjusted
Lavacca
lbls
lbp
LCaparelli
ldflags
len
Lenf
levikobi
lifecycle
lineterm
linkerd
linkned
linting
linux
Lior
liorlieberman
listenerstatus
litespeed
litespeedtech
Lkpp
LLbe
loadbalancer
localobjectreference
localparametersreference
localpolicytargetreference
localpolicytargetreferencewithsectionname
logf
Lrujcezr
Lsh
luciano
MADRCU
mainatainers
maintence
maleck
managedfields
markmc
materialx
matteoolivi
Mattia
mave
maxidle
maxlife
maxmimum
MCbobs
mcs
megaease
mentoring
metacpan
metaobject
metaresource
metav
meyskens
mfs
MGKk
michaelbeaumont
Miciah
microsoft
middlewares
miekg
mikemorris
mixe
mixedcase
MJt
mkdocs
MKkk
mkosieradzki
mktemp
mlavacca
mmamczur
MMmmpp
modelschema
mozilla
MQoq
Mrh
Msest
mtls
multiarch
multicluster
MULTILINE
Mwn
myapp
mycluster
mycompany
myns
mypath
myroutefilter
naction
namespacing
nargs
nathancoleman
negotatiated
netip
netlify
netpol
networkhermit
networkking
nevaluate
newfiles
NGF
nginx
nginxcommunity
nginxinc
ngot
ngrok
ngrokcommunity
ngx
NJQi
nmatch
Nner
NNs
NNxxwy
nocache
noctx
nodeport
nojekyll
nolint
nonmatchingwildcard
nonrepeating
nonroot
northsouth
nosec
nosniff
NOTREAL
nounset
NQv
nsn
nstarts
NSX
nuno
NWAA
oauth
objectreference
oci
octicons
Oew
Oeyz
OHa
ohjm
ojsonpath
okc
okv
OMb
omitempty
openapi
openshift
openvex
OPTARG
Oshp
osx
otherparam
OUTDIR
Oute
outfile
overridable
overriden
OXij
Paa
panslava
parametersreference
parentref
parentreference
parseable
passcode
passthrough
pathq
PCRE
pcxm
pdf
pem
PGZUFp
pipefail
PKCS
pkix
placeholders
planetscale
pleshakov
pmalek
podman
policyancestorstatus
policycrd
policystatus
popd
posisble
postonly
Prebuilt
prepopulate
prepopulated
preprovisioning
printcolumn
Println
PRIVKEY
proactively
profilereport
projectcontour
prominience
protobuf
protoc
protocolbuffers
protoimpl
Protoocol
protoreflect
protos
prototext
proxyless
pseudoheader
ptr
pushd
PXy
pymdownx
QCCFLJM
QCs
QFBw
qfn
qmn
qpi
QPS
quer
QUIC
quickstart
rainest
ramkumar
randmonkey
ratelimited
rcfg
readlink
recomend
redownload
reencrypt
reencryption
refactors
referencegrant
referencegrantfrom
referencegrantspec
referencegrantto
referrent
refgrant
regexs
relase
remotecommand
requestmirrorpolicy
resourcekey
resync
retriable
retryable
retrybudget
retryon
retryonpolicies
retrypolicy
rfc
RHQ
rilb
RLock
roadmap
robscott
rohit
rootdir
roundtrip
roundtripper
routability
routable
routeaction
routegroupkind
routenamespaces
routeparentstatus
routestatus
rowspan
rpc
RRAY
rsa
rtt
RTYh
RUnlock
rxlb
RYk
saml
sanjaypujare
sanposhiho
sayboras
Scdd
scgi
sched
SContext
sctu
secretobjectreference
serverfault
servicebinding
servicemeshinterface
servicev
servlet
sessionpersistence
sgw
shaneutt
shutil
sidecarless
SIGINT
signetg
SIGTERM
Sioo
sitemap
sjberman
Skipf
skipversion
skriss
smashingmagazine
smi
snehachhabria
sni
snorwin
sobqsca
spacewander
SPDY
speakerdeck
specialchars
spencerhance
spiffe
splitext
splitlines
spoa
SPOP
Sprintf
squidfunk
SRodi
srv
Sskv
ssl
stablizing
stackoverflow
stakeholders
standalone
Stermtypes
storageversion
strconv
stretchr
strfmt
structs
STU
subdomain
subjectaltname
Submatch
subn
subobjects
subresource
Subsetf
subshells
substitued
sunjay
sunjaybhatia
superfences
supportedfeature
svcd
svcs
svg
SWI
sys
syscall
SZj
tablesort
targetgrouppolicies
targetting
tbody
tcc
TContext
tcort
tcp
tcpr
tcproute
tcprouterule
tcproutespec
tcproutestatus
Tcr
teehee
templated
testcase
testifylint
TFrom
thead
theaders
thetimezoneconverter
thisyear
thockin
tiebreaking
timeframe
timeoutpolicies
timespan
timezone
timflannagan
tldr
tlog
tls
tlsconfig
tlsminimumversionpolicies
tlsr
tlsroute
tlsrouterule
tlsroutespec
tlsroutestatus
TLSv
Tma
tmp
tmqb
toc
TODOs
tombstoning
toml
Tosm
tpath
tpl
traefik
traefiklabs
trafficrouter
transitioning
triaging
trialing
trimpath
ttl
TTUY
TTz
turbocharged
twemoji
tyag
tyk
typstatus
udp
udpr
udproute
udprouterule
udproutespec
udproutestatus
uid
uint
UJL
Ulh
uml
Unfollow
unimplementable
unknownkind
UNm
Unmarshal
unmarshalling
unparam
unpkg
unprioritized
unversioned
UPa
updation
upgradeable
upstreamed
upstreams
upstreamtls
Urhtj
useragent
userguide
usernames
userspace
usp
usr
utf
utilruntime
UUJ
uwsgi
UYz
validationtutils
validationutilv
vcf
vendored
venv
versioned
versioning
vexctl
virtualenv
virtualhost
virtualserver
virtualserverroute
Vjj
vlis
vmajor
vmnqo
VMs
vmware
vpc
VPLMBZ
Vsb
vtprotobuf
walkfiles
webhooks
webserver
website
websockets
wehwll
whaledolphin
whitneygriffith
whos
Whzpbc
wikipedia
wilsonwu
windsurfing
WKw
workaround
WORKDIR
workflows
workstream
Wrn
wso
wss
wstcliyu
Wxt
wym
WZGSWx
xbb
xcb
XContent
xds
XFCL
xhtml
xhtmly
XKy
xlb
xmulligan
XRH
xtineskim
xunzhuo
xvalidation
xxhash
YAMLOr
yamls
yashvardhan
Ydf
yeedove
ygnas
Yjr
ykw
yml
youngnick
youtube
YSi
YVy
YVYK
yylt
YYRZS
Yzo
ZAgko
zaunist
Zcbr
Zka
Zkl
Zlo
ZLt
ZNi
Zpqcj
ZSsf
ZTV
zufeboz
Some files were automatically ignored 🙈

These sample patterns would exclude them:

^\Qconfig/crd/experimental/kustomization.yaml\E$
^\Qconformance/echo-basic/.go.sum\E$

You should consider adding them to:

.github/actions/spelling/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To use the spell-check-this repository, accept these unrecognized words as correct, and update file exclusions, you could run the following commands

... in a clone of the git@github.com:check-spelling-sandbox/gateway-api.git repository
on the spell-check-with-spelling branch (ℹ️ how do I use this?):

curl -s -S -L 'https://github.com/raw/check-spelling/check-spelling/prerelease/apply.pl' |
perl - 'https://github.com/check-spelling-sandbox/gateway-api/actions/runs/11371193671/attempts/1'
Available 📚 dictionaries could cover words not in the 📘 dictionary
Dictionary Entries Covers Uniquely
cspell:golang/dict/go.txt 2099 38 15
cspell:k8s/dict/k8s.txt 153 31 12
cspell:aws/aws.txt 218 21 8
cspell:python/src/python/python-lib.txt 2417 46 7
cspell:django/dict/django.txt 393 17 6

Consider adding them (in .github/workflows/spelling.yml) in jobs:/spelling: for uses: check-spelling/check-spelling@prerelease in its with:

      with:
        extra_dictionaries: |
          cspell:golang/dict/go.txt
          cspell:k8s/dict/k8s.txt
          cspell:aws/aws.txt
          cspell:python/src/python/python-lib.txt
          cspell:django/dict/django.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling.yml) for uses: check-spelling/check-spelling@prerelease in its with:

check_extra_dictionaries: ''
Forbidden patterns 🙅 (13)

In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves.

These forbidden patterns matched content:

Should be case-(in)sensitive

\bcase (?:in|)sensitive\b

Should be cannot (or can't)

See https://www.grammarly.com/blog/cannot-or-can-not/

Don't use can not when you mean cannot. The only time you're likely to see can not written as separate words is when the word can happens to precede some other phrase that happens to start with not.
Can't is a contraction of cannot, and it's best suited for informal writing.
In formal writing and where contractions are frowned upon, use cannot.
It is possible to write can not, but you generally find it only as part of some other construction, such as not only . . . but also.

  • if you encounter such a case, add a pattern for that case to patterns.txt.
\b[Cc]an not\b

Should be nonexistent

\b[Nn]o[nt][- ]existent\b

Should be GitHub

(?<![&*.]|// |\b(?:from|import|type) )\bGithub\b(?![{()])

Should be preexisting

[Pp]re[- ]existing

In English, duplicated words are generally mistakes

There are a few exceptions (e.g. "that that").
If the highlighted doubled word pair is in:

  • code, write a pattern to mask it.
  • prose, have someone read the English before you dismiss this error.
\s([A-Z]{3,}|[A-Z][a-z]{2,}|[a-z]{3,})\s\g{-1}\s

Should be into

when not phrasal and when in order to would be wrong:
https://thewritepractice.com/into-vs-in-to/

\sin to\s(?!if\b)

Should be neither/nor -- or reword

(?!<do )\bnot\b([^.?!"/(](?!neither|,.*?,))+\bnor\b

Should be its

\bit's(?= own\b)

Should be anymore

\bany more[,.]

Should be ID

\bId\b

Should be opt-in

(?<!\scan|for)(?<!\sif)\sopt in\s

Should be or (more|less)

\bore (?:more|less)\b
Pattern suggestions ✂️ (40)

You could add these patterns to .github/actions/spelling/patterns.txt:

# Automatically suggested patterns

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

# hit-count: 1651 file-count: 214
# https/http/file urls
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|]

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

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

# hit-count: 44 file-count: 8
# machine learning (?)
\b(?i)ml(?=[a-z]{2,})

# hit-count: 34 file-count: 17
# The leading `/` here is as opposed to the `\b` above
# ... a short way to match `https://` or `http://` since most urls have one of those prefixes
# Google Docs
/docs\.google\.com/[a-z]+/(?:ccc\?key=\w+|(?:u/\d+|d/(?:e/|)[0-9a-zA-Z_-]+/)?(?:edit\?[-\w=#.]*|/\?[\w=&]*|))

# hit-count: 26 file-count: 3
# in check-spelling@v0.0.22+, printf markers aren't automatically consumed
# printf markers
(?<!\\)\\[nrt](?=[a-z]{2,})

# hit-count: 24 file-count: 24
# node packages
(["'])@[^/'" ]+/[^/'" ]+\g{-1}

# hit-count: 23 file-count: 10
# base64 encoded content, possibly wrapped in mime
(?:^|[\s=;:?])[-a-zA-Z=;:/0-9+]{50,}(?:[\s=;:?]|$)

# hit-count: 21 file-count: 1
# go.sum
\bh1:\S+

# hit-count: 15 file-count: 2
# container images
image: [-\w./:@]+

# hit-count: 11 file-count: 4
# 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: 11 file-count: 1
# shields.io
\bshields\.io/[-\w/%?=&.:+;,]*

# hit-count: 10 file-count: 6
# Slack
\bslack\.com/[-0-9a-zA-Z/_~?&=.]*

# hit-count: 9 file-count: 3
# uuid:
\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b

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

# hit-count: 7 file-count: 4
# scala imports
^import (?:[\w.]|\{\w*?(?:,\s*(?:\w*|\*))+\})+

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

# hit-count: 6 file-count: 3
# alternate printf markers if you run into latex and friends
(?<!\\)\\[nrt](?=[a-z]{2,})(?=.*['"`])

# hit-count: 5 file-count: 2
# sched
\b[a-z0-9]+\.sched\.com\b

# hit-count: 5 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: 4 file-count: 3
# go install
go install(?:\s+[a-z]+\.[-@\w/.]+)+

# hit-count: 3 file-count: 2
# IPv6
\b(?:[0-9a-fA-F]{0,4}:){3,7}[0-9a-fA-F]{0,4}\b

# hit-count: 3 file-count: 2
# C network byte conversions
(?:\d|\bh)to(?!ken)(?=[a-z])|to(?=[adhiklpun]\()

# hit-count: 2 file-count: 2
# Google Groups
\bgroups\.google\.com(?:/[a-z]+/(?:#!|)[^/\s"]+)*

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

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

# hit-count: 2 file-count: 2
# Docker images
^\s*FROM\s+\S+:\S+(?:\s+AS\s+\S+|)

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

# hit-count: 2 file-count: 1
# AWS VPC
vpc-\w+

# hit-count: 2 file-count: 1
# sha-... -- uses a fancy capture
(\\?['"]|&quot;)[0-9a-f]{40,}\g{-1}

# hit-count: 1 file-count: 1
# Google Calendar
\bcalendar\.google\.com/calendar(?:/u/\d+|)/embed\?src=[@./?=\w&%]+

# hit-count: 1 file-count: 1
\w+\@group\.calendar\.google\.com\b

# hit-count: 1 file-count: 1
# GitHub SHA refs
\[([0-9a-f]+)\]\(https://(?:www\.|)github.com/[-\w]+/[-\w]+/commit/\g{-1}[0-9a-f]*

# hit-count: 1 file-count: 1
# oracle
\bdocs\.oracle\.com/[-0-9a-zA-Z./_?#&=]*

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

# hit-count: 1 file-count: 1
# getopts
\bgetopts\s+(?:"[^"]+"|'[^']+')

# hit-count: 1 file-count: 1
# This does not cover multiline strings, if your repository has them,
# 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])(?=[a-zA-Z]{2,}))(?!%)(?=[_a-zA-Z]+(?!%)\b)(?=.*?['"])

# hit-count: 1 file-count: 1
# Compiler flags (Unix, Java/Scala)
# Use if you have things like `-Pdocker` and want to treat them as `docker`
(?:^|[\t ,>"'`=(])-(?:(?:J-|)[DPWXY]|[Llf])(?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})

# hit-count: 1 file-count: 1
# Compiler flags (Windows / PowerShell)
# This is a subset of the more general compiler flags pattern.
# It avoids matching `-Path` to prevent it from being treated as `ath`
(?:^|[\t ,"'`=(])-(?:[DPL](?=[A-Z]{2,})|[WXYlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,}))

Errors (4)

See the 📜action log or 📝 job summary for details.

❌ Errors Count
ℹ️ candidate-pattern 80
❌ check-file-path 960
❌ forbidden-pattern 148
⚠️ noisy-file 2

See ❌ Event descriptions for more information.

Please sign in to comment.