mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
fabf0b928e
### Describe Your Changes Implement spellcheck command: - add cspell configuration files - dockerize spellchecking process - add Makefile targets This PR adds a standalone `make spellcheck` target to check `docs/*.md` files for spelling errors. The target process is dockerized to be run in a separate npm environment. Some `docs/` typo fixes also included. ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Signed-off-by: Arkadii Yakovets <ark@victoriametrics.com> Signed-off-by: hagen1778 <roman@victoriametrics.com> Co-authored-by: hagen1778 <roman@victoriametrics.com>
26 lines
647 B
Makefile
26 lines
647 B
Makefile
# These commands must be run from the VictoriaMetrics repository root.
|
|
|
|
# Builds cspell image.
|
|
cspell-install:
|
|
@ (docker inspect cspell > /dev/null) || (docker build cspell --tag cspell)
|
|
|
|
# Checks for spelling errors.
|
|
cspell-check: cspell-install
|
|
@CMD="cspell --no-progress" $(MAKE) cspell-run-command
|
|
|
|
# Runs spelling error check.
|
|
# A user facing alias to cspell-check command.
|
|
spellcheck: cspell-check
|
|
|
|
# Runs cspell container commands.
|
|
cspell-run-command:
|
|
@cp cspell/cspell.json cspell.json
|
|
@-docker run \
|
|
--entrypoint /bin/sh \
|
|
--mount type=bind,src=".",dst=/victoriametrics \
|
|
--rm \
|
|
--tty \
|
|
cspell -c "$(CMD)"
|
|
@rm cspell.json
|
|
|