refactor: move spellcheck dictionary to this repo
prior to this change, the EMQX spellcheck dictionary is baked into the docker image, which makes adding new words to the dict more complicated long process: you'd have to send a separate PR to the docker image repo and tag a new docker image and update the dokcer iamge tag in emqx.git
This commit is contained in:
parent
732a183576
commit
d6bd1555ec
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -uo pipefail
|
||||
|
||||
if [ -z "${1:-}" ]; then
|
||||
SCHEMA="_build/emqx/lib/emqx_dashboard/priv/www/static/schema.json"
|
||||
else
|
||||
SCHEMA="$1"
|
||||
fi
|
||||
|
||||
docker run -d --name langtool "ghcr.io/emqx/emqx-schema-validate:0.3.3"
|
||||
|
||||
docker exec -i langtool ./emqx_schema_validate - < "${SCHEMA}"
|
||||
success="$?"
|
||||
|
||||
docker kill langtool || true
|
||||
docker rm langtool || true
|
||||
|
||||
echo "If this script finds a false positive (e.g. when it things that a protocol name is a typo),
|
||||
make a PR here: https://github.com/emqx/emqx-schema-validate/blob/master/dict/en_spelling_additions.txt"
|
||||
|
||||
exit "$success"
|
|
@ -0,0 +1,265 @@
|
|||
ACL
|
||||
AES
|
||||
APIs
|
||||
BPAPI
|
||||
BSON
|
||||
Backplane
|
||||
CA
|
||||
CAs
|
||||
CHACHA
|
||||
CLI
|
||||
CMD
|
||||
CN
|
||||
CONNACK
|
||||
CoAP
|
||||
Cygwin
|
||||
DES
|
||||
DN
|
||||
DNS
|
||||
DTLS
|
||||
DevOps
|
||||
Dialyzer
|
||||
Diffie
|
||||
EIP
|
||||
EMQX
|
||||
EPMD
|
||||
ERL
|
||||
ETS
|
||||
FIXME
|
||||
GCM
|
||||
HMAC
|
||||
HOCON
|
||||
HTTPS
|
||||
JSON
|
||||
JWK
|
||||
JWKs
|
||||
JWT
|
||||
Kubernetes
|
||||
LwM
|
||||
MQTT
|
||||
Makefile
|
||||
MitM
|
||||
Multicast
|
||||
NIF
|
||||
OTP
|
||||
PEM
|
||||
PINGREQ
|
||||
PSK
|
||||
PSK
|
||||
PSKs
|
||||
PUBREL
|
||||
QoS
|
||||
RESTful
|
||||
ROADMAP
|
||||
RSA
|
||||
Req
|
||||
Riak
|
||||
SHA
|
||||
SMS
|
||||
Struct
|
||||
TCP
|
||||
TLS
|
||||
TTL
|
||||
UDP
|
||||
URI
|
||||
XMLs
|
||||
acceptors
|
||||
ack
|
||||
acked
|
||||
addr
|
||||
api
|
||||
apiserver
|
||||
arg
|
||||
args
|
||||
async
|
||||
attr
|
||||
auth
|
||||
authenticator
|
||||
authenticators
|
||||
authn
|
||||
authz
|
||||
autoclean
|
||||
autoheal
|
||||
backend
|
||||
backends
|
||||
backoff
|
||||
backplane
|
||||
backtrace
|
||||
badarg
|
||||
badkey
|
||||
bcrypt
|
||||
behaviour
|
||||
bhvr
|
||||
boolean
|
||||
bytesize
|
||||
cacert
|
||||
cacertfile
|
||||
certfile
|
||||
ci
|
||||
clientid
|
||||
clientinfo
|
||||
cmake
|
||||
coap
|
||||
conf
|
||||
config
|
||||
configs
|
||||
confirmable
|
||||
conn
|
||||
connectionless
|
||||
cors
|
||||
cpu
|
||||
ctx
|
||||
customizable
|
||||
datagram
|
||||
datagrams
|
||||
desc
|
||||
dir
|
||||
dns
|
||||
downlink
|
||||
downlink
|
||||
dtls
|
||||
ekka
|
||||
emqx
|
||||
enablement
|
||||
enqueue
|
||||
enqueued
|
||||
env
|
||||
eof
|
||||
epmd
|
||||
erl
|
||||
erts
|
||||
escript
|
||||
etcd
|
||||
eval
|
||||
exe
|
||||
executables
|
||||
exhook
|
||||
exproto
|
||||
extensibility
|
||||
formatter
|
||||
gRPC
|
||||
github
|
||||
goto
|
||||
grpcbox
|
||||
hocon
|
||||
hoconsc
|
||||
hostname
|
||||
hrl
|
||||
http
|
||||
https
|
||||
iface
|
||||
img
|
||||
impl
|
||||
inet
|
||||
inflight
|
||||
ini
|
||||
init
|
||||
ip
|
||||
ipv
|
||||
jenkins
|
||||
jq
|
||||
kb
|
||||
keepalive
|
||||
libcoap
|
||||
lifecycle
|
||||
localhost
|
||||
lwm
|
||||
mnesia
|
||||
mountpoint
|
||||
mqueue
|
||||
mria
|
||||
msg
|
||||
multicalls
|
||||
multicasts
|
||||
namespace
|
||||
natively
|
||||
nodelay
|
||||
nodetool
|
||||
nullable
|
||||
num
|
||||
os
|
||||
params
|
||||
peerhost
|
||||
peername
|
||||
perf
|
||||
powershell
|
||||
procmem
|
||||
procs
|
||||
progname
|
||||
prometheus
|
||||
proto
|
||||
ps
|
||||
psk
|
||||
pubsub
|
||||
pushgateway
|
||||
qlen
|
||||
qmode
|
||||
qos
|
||||
quic
|
||||
ratelimit
|
||||
rebar
|
||||
recbuf
|
||||
relup
|
||||
replayq
|
||||
replicant
|
||||
repo
|
||||
reuseaddr
|
||||
rh
|
||||
rlog
|
||||
rootdir
|
||||
rpc
|
||||
runtime
|
||||
sc
|
||||
scalable
|
||||
seg
|
||||
setcookie
|
||||
sharded
|
||||
shareload
|
||||
sn
|
||||
sndbuf
|
||||
sockname
|
||||
sql
|
||||
src
|
||||
ssl
|
||||
statsd
|
||||
structs
|
||||
subprotocol
|
||||
subprotocols
|
||||
superset
|
||||
sys
|
||||
sysmem
|
||||
sysmon
|
||||
tcp
|
||||
ticktime
|
||||
tlog
|
||||
tls
|
||||
tlsv
|
||||
travis
|
||||
trie
|
||||
ttl
|
||||
typerefl
|
||||
udp
|
||||
uid
|
||||
un-acked
|
||||
unsub
|
||||
uplink
|
||||
url
|
||||
utc
|
||||
util
|
||||
ver
|
||||
vm
|
||||
vsn
|
||||
wakaama
|
||||
websocket
|
||||
ws
|
||||
wss
|
||||
xml
|
||||
HStream
|
||||
HStreamDB
|
||||
hstream
|
||||
hstreamDB
|
||||
hstream
|
||||
hstreamdb
|
||||
SASL
|
||||
GSSAPI
|
||||
keytab
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# ensure dir
|
||||
cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/../.."
|
||||
PROJ_ROOT="$(pwd)"
|
||||
|
||||
if [ -z "${1:-}" ]; then
|
||||
SCHEMA="${PROJ_ROOT}/_build/emqx/lib/emqx_dashboard/priv/www/static/schema.json"
|
||||
else
|
||||
SCHEMA="$(realpath "$1")"
|
||||
fi
|
||||
|
||||
set +e
|
||||
docker run --rm -i --name spellcheck \
|
||||
-v "${PROJ_ROOT}"/scripts/spellcheck/dicts:/dicts \
|
||||
-v "$SCHEMA":/schema.json \
|
||||
ghcr.io/emqx/emqx-schema-validate:0.4.0 /schema.json
|
||||
|
||||
result="$?"
|
||||
|
||||
if [ "$result" -eq 0 ]; then
|
||||
echo "Spellcheck OK"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "If this script finds a false positive (e.g. when it thinks that a protocol name is a typo),"
|
||||
echo "Add the word to dictionary in scripts/spellcheck/dicts"
|
||||
exit $result
|
Loading…
Reference in New Issue