Skip to content

[FEATURE] Add spell-checking to pre-commit hooks #2374

@mr-raj12

Description

@mr-raj12

The problem

Currently, there is no automated way to catch spelling mistakes in documentation files (*.md), code comments, docstrings, and UI widget names. Typos reduce readability, look unprofessional, and cause confusion—especially for non-native English speakers.

Recent example: Issue #2371 identified several spelling errors (incase, everytime, wont, posess, seperator) that could have been caught automatically before committing.

Requested Solution

Add codespell to the existing pre-commit configuration (.pre-commit-config.yaml) to catch spelling errors locally before commits are made.

Example pre-commit hook:

- repo: https://github.com/codespell-project/codespell
  rev: v2.2.6
  hooks:
      - id: codespell
        args: [--ignore-words-list, "borg,vorta,deduplicated,uncompress"]
        exclude: "^(.*\\.ts|.*\\.lock)$"

Benefits:

  1. Catches typos before code is pushed
  2. No CI changes needed—uses existing pre-commit infrastructure
  3. Runs automatically for contributors who use pre-commit install
  4. Lightweight and fast

Alternatives

  1. CI-based spell-checking — Adds CI complexity and slower feedback loop
  2. Manual review — Current approach; error-prone and time-consuming
  3. Use typos instead of codespell — Lower false-positive rate but less mature pre-commit support

Additional context

  • Vorta already uses pre-commit hooks (ruff, trailing whitespace, etc.)
  • A custom ignore-words list can exclude project-specific terms
  • Translation files (.ts) should be excluded to avoid false positives on non-English strings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions