Use remote cspell dictionary

This commit is contained in:
Taiki Endo
2023-12-24 19:59:08 +09:00
parent 2b2d802813
commit c9bdd59639
3 changed files with 2 additions and 187 deletions

View File

@@ -5,7 +5,7 @@
"dictionaryDefinitions": [
{
"name": "organization-dictionary",
"path": "./.github/.cspell/organization-dictionary.txt",
"path": "https://raw.githubusercontent.com/taiki-e/github-actions/HEAD/.github/.cspell/organization-dictionary.txt",
"addWords": true
},
{

View File

@@ -1,185 +0,0 @@
// This is a dictionary shared by projects under https://github.com/taiki-e.
// It is not intended for manual editing.
endo
taiki
// tool name and its configs or options
asan
cdylib
cflags
clippy
codegen
cranelift
cxxflags
dylib
exitcode
miri
miriflags
msan
rlib
rustc
rustdoc
rustdocflags
rustflags
rustfmt
rustsec
rustup
staticlib
tsan
valgrind
xcompile
Zmiri
// Rust target triple/spec
aarch
amdgpu
androideabi
armeb
armebv
armv
atmega
bpfeb
bpfel
csky
cuda
eabi
eabihf
emscripten
espidf
fortanix
gnuabi
gnuabiv
gnueabi
gnueabihf
gnullvm
gnuspe
gnux
illumos
imac
imafc
libnx
loongarch
macabi
mipsel
mipsisa
msvc
muslabi
musleabi
musleabihf
newlib
newlibeabihf
nvptx
ohos
openwrt
relibc
riscv
softfloat
sparcv
spirv
teeos
thumbeb
thumbebv
thumbv
tvos
uclibc
uclibceabi
uclibceabihf
uefi
vxworks
wasi
watchos
xous
xtensa
// Rust other
aclass
acqrel
alloc
builtins
bytecount
canonicalize
cfgs
compat
concat
ctypes
dealloc
deque
doctest
doctests
hasher
idents
impls
incompat
inlateout
intrinsics
lateout
libdir
mclass
memcpy
msrv
nand
nanos
nomem
nonoverlapping
noreturn
nostack
peekable
powf
punct
rclass
repr
rfind
rfold
rposition
rsplit
rustlib
seqcst
simd
splitn
structs
subsec
supertrait
supertraits
sysroot
toolchains
turbofish
uninit
unsized
upcastable
// Other
armel
armhf
binutils
connrefused
cygwin
dpkg
elif
endianness
esac
euxo
gsub
libc
markdownlint
moreutils
msys
noninteractive
noprofile
norc
nproc
objcopy
objdump
pacman
pipefail
powerset
proto
ranlib
readelf
shellcheckrc
SIGABRT
SIGILL
subcmd
tempdir
tlsv
tmpdir

View File

@@ -350,7 +350,7 @@ if [[ -f .cspell.json ]]; then
dependencies=$(sed <<<"${dependencies}" 's/[0-9_-]/\n/g' | LC_ALL=C sort -f -u)
fi
config_old=$(<.cspell.json)
config_new=$(grep <<<"${config_old}" -v ' *//' | jq 'del(.dictionaries[] | select(index("organization-dictionary") | not))' | jq 'del(.dictionaryDefinitions[] | select(.name == "organization-dictionary" | not))')
config_new=$(grep <<<"${config_old}" -v '^ *//' | jq 'del(.dictionaries[] | select(index("organization-dictionary") | not))' | jq 'del(.dictionaryDefinitions[] | select(.name == "organization-dictionary" | not))')
trap -- 'echo "${config_old}" >.cspell.json; echo >&2 "$0: trapped SIGINT"; exit 1' SIGINT
echo "${config_new}" >.cspell.json
if [[ -n "${has_rust}" ]]; then