Skip to content

chore: check typos only on changed files in PRs#2221

Open
TC-MO wants to merge 1 commit intomasterfrom
rework-typos-check
Open

chore: check typos only on changed files in PRs#2221
TC-MO wants to merge 1 commit intomasterfrom
rework-typos-check

Conversation

@TC-MO
Copy link
Contributor

@TC-MO TC-MO commented Feb 3, 2026

I've added a step to check only changed files since it has been failing PR's that were not connected to the failed check


Note

Low Risk
CI-only workflow change; risk is limited to possibly missing typos outside the changed file set or mis-detecting changed files due to checkout/diff configuration.

Overview
Updates the GitHub Actions Spell check workflow to run typos only against files changed in the PR/push, avoiding failures from unrelated existing typos.

This adds tj-actions/changed-files and configures actions/checkout with fetch-depth: 0, then gates the typos step on any_changed and passes all_changed_files to the action.

Written by Cursor Bugbot for commit 38e51bf. Configure here.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@TC-MO TC-MO requested a review from vdusek February 3, 2026 14:39
@TC-MO TC-MO self-assigned this Feb 3, 2026
@TC-MO TC-MO added documentation Improvements or additions to documentation. adhoc Ad-hoc unplanned task added during the sprint. t-docs Issues owned by technical writing team. labels Feb 3, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit 38e51bff and is ready at https://pr-2221.preview.docs.apify.com!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 24

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment @cursor review or bugbot run to trigger another review on this PR

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

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

Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

Is this really what we want? 🙂

Consider this scenario: someone introduces a typo, but it slips past the CI checks and gets merged into master. It fails there once, but won't be flagged in future PRs. As a result, the typo remains in the codebase, and the spell checker treats it as acceptable.

I don't think this is a step in the right direction. In my experience, linters should run against the entire codebase to prevent issues like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. documentation Improvements or additions to documentation. t-docs Issues owned by technical writing team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants