diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06ab608e2040839ed08f31ae903f1b4494614fbb..4d1f844345708da3ce90a22cc57ea22679f84980 100644 --- a/.gitlab-ci.yml +++ b/.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 diff --git a/libmat2/parser_factory.py b/libmat2/parser_factory.py index 6150b269df5466772030a842d6ad34e39e2e311e..23529db400ed30a76c0da33dacf012bc604bcc44 100644 --- a/libmat2/parser_factory.py +++ b/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 diff --git a/utils/ci/codespell/ignored_words.txt b/utils/ci/codespell/ignored_words.txt new file mode 100644 index 0000000000000000000000000000000000000000..02ae70c5b7f4e1e31903ad566a84ca09a3660988 --- /dev/null +++ b/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'