Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/spell-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@ jobs:
name: Spell check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Check spelling with typos
uses: crate-ci/typos@v1.43.0
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
with:
separator: ' '
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space separator breaks filenames containing spaces

Low Severity

Using separator: ' ' (space) to separate filenames is problematic when any changed file has a space in its name. The tj-actions/changed-files action may quote such filenames, but the crate-ci/typos action receiving this input via files may not correctly parse quoted paths. This would cause spell checking to fail or skip files with spaces in their names. Using a newline separator would be safer.

Additional Locations (1)

Fix in Cursor Fix in Web


- name: Check spelling with typos
if: steps.changed-files.outputs.any_changed == 'true'
uses: crate-ci/typos@v1.43.0
with:
files: ${{ steps.changed-files.outputs.all_changed_files }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spell check fails on deleted files

Medium Severity

The all_changed_files output from tj-actions/changed-files includes deleted files. When passed to the typos action, it will attempt to spell-check files that no longer exist, causing the workflow to fail for any PR that deletes files. This contradicts the PR's goal of preventing unrelated failures. Using all_modified_files (which excludes deleted files) or combining added_files and modified_files would fix this.

Fix in Cursor Fix in Web