diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 000000000..a26d2df3f --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,20 @@ +name: Spell check (typos) + +on: + workflow_dispatch: + push: + branches: + - "main" + pull_request: + +permissions: + contents: read + +jobs: + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v4 + + - name: Run typos spell checker + uses: crate-ci/typos@631208b7aac2daa8b707f55e7331f9112b0e062d # pin@v1.44.0 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 000000000..dbd4bf271 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,32 @@ +# Configuration for the typos spell checker. +# See https://github.com/crate-ci/typos + +[files] +# Exclude generated, binary, and data files that produce false positives. +extend-exclude = [ + "*.json", + "*.lock", + "tests_data/", + "assets/models/", +] + +[default.extend-words] +# Domain-specific terms or intentional spellings kept to avoid false positives. + +# "hve" appears in ONNX model internals referenced in comments. +hve = "hve" + +# "afterall" is used as a variable/identifier name in test scripts. +afterall = "afterall" + +# "Hashi" is the first half of "HashiCorp" (vendor name in content type descriptions). +hashi = "hashi" + +# "Harc" is the first half of "LHarc" (a legacy archive format name). +harc = "harc" + +# "cpy" / "CPY" are standard file extensions for COBOL copybook files. +cpy = "cpy" + +# "LICENSEs" is the plural of "LICENSE" (used in dist-workspace.toml comments). +licens = "licens" diff --git a/python/tests/test_magika_python_module.py b/python/tests/test_magika_python_module.py index e25bd40b6..7356b3663 100644 --- a/python/tests/test_magika_python_module.py +++ b/python/tests/test_magika_python_module.py @@ -274,7 +274,6 @@ def test_magika_module_with_whitespaces() -> None: ) for ws_num in ws_nums: - print(f"Calling indentify_bytes with {ws_num} whitespaces") content = b" " * ws_num res = m.identify_bytes(content) assert (