mirror of
https://github.com/vee1e/kubeedge.git
synced 2026-09-01 10:18:33 +00:00
enable codespell via github workflow.
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
This commit is contained in:
parent
3031526017
commit
280ca10290
5 changed files with 56 additions and 1 deletions
21
.github/workflows/codespell.yml
vendored
Normal file
21
.github/workflows/codespell.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: codespell
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
spellcheck:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies with pip
|
||||
run: pip install --no-warn-script-location --user codespell
|
||||
|
||||
- name: Spellcheck
|
||||
run: make spellcheck
|
||||
18
Makefile
18
Makefile
|
|
@ -483,4 +483,20 @@ conformance_e2e:
|
|||
else
|
||||
conformance_e2e:
|
||||
tests/scripts/conformance_e2e.sh ${KIND_IMAGE} ${CONFORMANCE_TYPE}
|
||||
endif
|
||||
endif
|
||||
|
||||
define SPELLCHECK_HELP_INFO
|
||||
# run spellcheck check.
|
||||
#
|
||||
# Example:
|
||||
# make spellcheck
|
||||
# make spellcheck HELP=y
|
||||
endef
|
||||
.PHONY: spellcheck
|
||||
ifeq ($(HELP),y)
|
||||
spellcheck:
|
||||
@echo "$$CODESPELL_HELP_INFO"
|
||||
else
|
||||
spellcheck:
|
||||
codespell --config codespell.cfg
|
||||
endif
|
||||
|
|
|
|||
18
codespell.cfg
Normal file
18
codespell.cfg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[codespell]
|
||||
|
||||
# Enable built-in dictionaries/rules.
|
||||
# See more details for https://github.com/codespell-project/codespell/tree/main/codespell_lib/data.
|
||||
builtin = clear,rare,informal,code
|
||||
|
||||
# Ignore words listed in this file.
|
||||
ignore-words = codespell_whitelist.txt
|
||||
|
||||
# Add custom dictionary file.
|
||||
dictionary = codespell_dictionary.txt,-
|
||||
|
||||
# Skip checking files or directories.
|
||||
# This folder is ignored for a couple of reasons.
|
||||
# e.g) CHANGELOG files are generated by commit history that could include some misspellings,
|
||||
# but we should keep the original commit messages here.
|
||||
# Besides, it includes names of authors and contributors, which compile up the false alarms.
|
||||
skip = ./vendor/*,./go.sum,./build/*,./LICENSES/*,./CHANGELOG/*,*.svg
|
||||
0
codespell_dictionary.txt
Normal file
0
codespell_dictionary.txt
Normal file
0
codespell_whitelist.txt
Normal file
0
codespell_whitelist.txt
Normal file
Loading…
Add table
Add a link
Reference in a new issue