Browse Source

CI: Add job to run codespell, a spell checking software

merge-requests/85/head
georg 2 years ago
committed by jvoisin
parent
commit
8bb2826f7a
  1. 9
      .gitlab-ci.yml
  2. 2
      libmat2/parser_factory.py
  3. 3
      utils/ci/codespell/ignored_words.txt

9
.gitlab-ci.yml

@ -13,6 +13,15 @@ linting:bandit:
- bandit -r ./nautilus/ --format txt --skip B101
- bandit -r ./libmat2 --format txt --skip B101,B404,B603,B405,B314
linting:codespell:
image: $CONTAINER_REGISTRY:linting
stage: linting
script:
# Run codespell to check for spelling errors; ignore errors about binary
# files, use a config with ignored words and exclude the git directory,
# which might contain false positives
- codespell -q 2 -I utils/ci/codespell/ignored_words.txt -S .git
linting:pylint:
image: $CONTAINER_REGISTRY:linting
stage: linting

2
libmat2/parser_factory.py

@ -56,7 +56,7 @@ def get_parser(filename: str) -> Tuple[Optional[T], Optional[str]]:
try:
return parser_class(filename), mtype
except ValueError as e:
logging.info("Got an exception when trying to instanciate "
logging.info("Got an exception when trying to instantiate "
"%s for %s: %s", parser_class, filename, e)
return None, mtype
return None, mtype

3
utils/ci/codespell/ignored_words.txt

@ -0,0 +1,3 @@
# Words to be ignored by codespell.
# Put one word per line and sort alphabetically.
process'
Loading…
Cancel
Save