Skip to content

Commit

Permalink
.pre-commit-config.yaml: Add the CSpell spell checker
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl committed Nov 16, 2024
1 parent 32078a8 commit e5288a1
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ __pycache__/
# private vscode workspace settings:
.vscode/settings.json

# Virtualenv
.venv/

# temporary file from tests/test_cpio.py (to be fixed later)
/data
# Output from mypy --txt-report
/index.txt

htmlcov/

# Pip editable install directory
python_libs.egg-info/

Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,10 @@ repos:
- id: mixed-line-ending
args: ['--fix=lf']
description: Replace line endings with LF


# Run the CSpell command line spell checker
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.16.0
hooks:
- id: cspell
194 changes: 193 additions & 1 deletion .vscode/ltex.dictionary.en-US.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,217 @@
codecov
abstractmethod
accessorclass
actrc
addopts
answerfile
authhandler
autolinks
autouse
binstr
biosdevname
booleaness
bootdir
builtins
caplog
CLOEXEC
cmdline
CodeCov
configparser
covcombine
covcp
coveragerc
coverallsapp
cpio
cpiofile
cpioinfo
crashkernel
curstate
datamodel
deadsnakes
dinfo
diskutil
distutils
DOTQUAD
drule
dunder
editenv
eliloader
ENOENT
ENVLOGDIR
errkey
errmsg
eths
euxv
extlinux
EXTLINUX
faulthandler
fcoe
filehandle
Filesyste
FilesystemAccessor
filterwarnings
fstype
ftpaccessor
ftpserver
getpid
getpreferredencoding
getuid
grubdir
grubenv
hardlinks
host-cpu-tune
hpet
httpaccessor
httpserver
hwdata
ibft
icdiff
ifrename
igmp
inputtext
intify
isort
keywrd
kname
koji
kwargs
lastboot
laststate
levelname
lfile
libc
libexec
linkname
linktext
localftpserver
logbuf
ltex
lzma
MACPCI
markdownlint
mboot
mdreport
Mellanox
memoryhelper
menuentry
minidom
mountingaccessor
mountpoint
multiboot
mypy
Navi
nektos
netdev
netns
newc
newdefault
newhw
NEWNET
nfspath
nics
nodelist
nodocker
nolvm
noqueue
norules
oldstate
ord
organisation
outerr
outkey
passman
pathexists
pciids
pcis
pcpus
pipx
Popen
ppns
precheck
proc
pvsproxy
pycache
pyenv
pyfakefs
pylance
pyliblzma
pylint
Pylint
pylintrc
pylzma
pyproject
pyright
pytest
PYTHONDEVMODE
pythonpath
PYTHONWARNINGS
pytype
qdisc
qlen
Radeon
rckey
readbuffer
readline
repofiles
REPOMD
retcode
retrans
rulefile
sbdf
SBDF
sbdfi
setdefault
setenv
SETFD
setuptools
shellcheck
signoff
somestring
sourcery
srule
strerror
stringio
subcls
subdevice
subvendor
sysconfig
tboot
Tboot
templatedir
testfile
testpaths
textiowrapper
timeo
tmpfs
tmultiboot
tname
tokenless
Traceback
treeinfo
ucode
ucontext
uidmap
urllib
usecase
usecases
vcpus
vcputune
venv
verhash
vfat
videoclass
virtualenv
virtualenvs
virutalenv
VPRO
workdir
xapi
XAPI
XCP-ng
xcp-python-libs
xcptestlib
xelogging
xenopsd
XenServer
xensource
xmldoc
xmlunwrap
48 changes: 48 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// http://cspell.org/docs/getting-started/#2-add-words-to-the-project-dictionary
{
"version": "0.2",
"language": "en-GB,en-US",
"dictionaryDefinitions": [
{
"name": "cspell-workspace-dictionary",
"path": ".vscode/ltex.dictionary.en-US.txt",
"addWords": true
}
],
"dictionaries": ["cspell-workspace-dictionary"],
"ignorePaths": [
".actrc",
".pylintrc",
"Makefile",
"pyproject.toml",
"stubs/",
"tests/xcptestlib_unshare.py",
"tox.ini",
"xcp/cpiofile.py",
"xcp/net/ifrename/dynamic.py",
"xcp/net/ifrename/logic.py",
"xcp/net/ifrename/util.py",
"xcp/net/ip.py",
"xcp/repository.py",
"xcp-python-libs.spec.in"
],
"ignoreRegExpList": [
// exclude regular expressions from re.compile(pattern)
"re.compile(.*)",
// exclude MAC addresses
"MAC(.*)"
],
"ignoreWords": [
// In a log message, fix in final commit
"Succesfully",
// Volume label used in tests
"vgdorj",
// Unclear words in test method names
"nosrules",
"rshp",
"siobuff",
// Used to test an invalid quad
"efgh",
"ijkl"
]
}

0 comments on commit e5288a1

Please sign in to comment.