Skip to content

Commit

Permalink
Refine the spelling configurartion
Browse files Browse the repository at this point in the history
Split spelling check of json and markdown files.

For markdown add a context filter to ignore code blocks (inline and multiline).
Enable url and camel case modes.

Change the action to a different one, based on the same technology
(pyspelling + aspell) as the current one does not support the came case
mode.

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
  • Loading branch information
afrittoli committed Jan 12, 2024
1 parent dd30d34 commit 2ed9e29
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 146 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
name: Spellcheck (en_US)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: igsekor/pyspelling-any@v0.0.2
name: Spellcheck
- name: Checkout Code
uses: actions/checkout@v3
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@0.35.0
141 changes: 0 additions & 141 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
@@ -1,215 +1,82 @@
Auth
BD
CDEvent
CDEvents
CDF
CVE
CamelCase
CloudEvent
CloudEvents
Enum
FHbGphQ
FidWxhcnkgZGVmaW
Gerrit
Github
Gitlab
JSON
JXRmtaU
JoY
KH
KyjITcZXHotdMB
MEYCIQCBT
MergeRequest
MnY
MyPipeline
NGua
NIST
NZSh
Notational
PGRhdGE
PullRequest
QXFaWFpsYm
README
RIbHdaWE
RZ
RhdGE
SCM
SDKs
SIG
SKZ
SRE
Schemas
Tekton
TestOrg
TestRepo
TestSuite
URI
UUID
VGhlIHZvY
VZ
ViamVjdHMqCg
VkdobElIWnZZMkZpZFd
Whitepaper
WmlBcWMzVmlhbVZqZEhNcUNnPT
XiQlc
ZtYVc
aGNua
aGljaCBhcmUgbWFkZSBvZiAqc
aWhyZjVwb
aa
abc
abcde
aca
additionalProperties
aed
american
anUyNDRvazdkdWpfMjAyMjAyMjJUMTYwMDAwWiBhbmRyZWEuZnJpdHRvbGlAbQ
andrea
api
apis
artifactId
bGN
bd
bml
br
cSpell
cardpane
cb
cbdf
ccb
cd
cdeliveryfdn
cdevent
cdevents
cdfoundation
cdsystem
ce
charset
ci
cloudevents
clusterA
contentEncoding
contenttype
csrc
customData
customDataContentType
customDataEncoding
customdata
customdatacontenttype
daR
daemonset
datacontenttype
dataschema
datatracker
dbe
de
deterministically
dev
df
ece
emmitted
english
enum
eventdata
fas
fc
fd
featureBranch
frittoli
geo
github
githubusercontent
gmail
golang
href
html
http
https
iaas
ietf
img
interoperable
io
jenkins
json
jsonschemas
keptn
knative
lcyAqZXZlbnQgdHlwZXMqLCB
lifecycle
linkTitle
markdownlint
md
metricA
minLength
modelled
myApp
myChange
myPipeline
mySubject
myTask
myTestCaseRun
myTestSuiteRun
myapp
mycluster
mycr
mydata
mygit
myorg
myvalue
nWith
namespace
namespaceB
namespaces
nist
nnnn
notational
observability
oci
oneOf
outputType
param
pdf
pipelineName
pipelineRun
pipelinerun
png
pre
py
quicktime
repo
reportedBy
responseTime
rfc
rolledback
rst
runtime
schemas
scp
sdk
sha
sig
sigs
somewherelse
specversion
src
subjectid
svg
taskName
taskRun
taskrun
taskruns
teamX
tekton
testCase
testCaseRun
testCaseRuns
testEnv
testOutput
testSuite
testSuiteRun
testSuiteRuns
testSuiteXXX
testcase
testcaserun
testkube
Expand All @@ -218,21 +85,13 @@ testrunreport
testsuite
testsuiterun
ticketURI
tmeid
tmsrc
toc
typesystem
unitest
uri
url
userId
utf
viewUrl
whl
wikipedia
wpaper
www
xTENCM
xml
ypDXWCjlNKfzTV
yshmiPmp
Expand Down
30 changes: 28 additions & 2 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
matrix:
- name: all
- name: json
aspell:
lang: en
d: en_US
camel-case: true
mode: url
sources:
- "**/*.md"
- "**/*.json|!.github"
dictionary:
wordlists:
- .spellcheck-en-custom.txt
- name: markdown
aspell:
lang: en
d: en_US
camel-case: true
mode: url
sources:
- "**/*.md"
dictionary:
wordlists:
- .spellcheck-en-custom.txt
pipeline:
- pyspelling.filters.context:
context_visible_first: true
escapes: '\\[\\`~]'
delimiters:
# Ignore multiline content between fences (fences can have 3 or more back ticks)
# ```
# content
# ```
- open: '(?s)^(?P<open> *`{3,})$'
close: '^(?P=open)$'
# Ignore text between inline back ticks
- open: '(?P<open>`+)'
close: '(?P=open)'

0 comments on commit 2ed9e29

Please sign in to comment.