cspell-action icon indicating copy to clipboard operation
cspell-action copied to clipboard

`incremental_files_only` appears to be ignored

Open tpeterson-metropolis opened this issue 6 months ago • 3 comments

I'm seeing a pair of issues:

  1. Typos from a PR are not caught until the code is merged
  2. Said typos are then picked up in unrelated changes despite those files not being touched in those changes

Details from action run:

Run streetsidesoftware/cspell-action@eb29b6a67d122d2e6af385ff16bdb200d93b2e54
  with:
    check_dot_files: true
    config: ./.github/spelling/cspell.json
    suggestions: true
    incremental_files_only: true
    inline: warning
    treat_flagged_words_as_errors: false
    strict: true
    verbose: false
    use_cspell_files: false

tpeterson-metropolis avatar May 28 '25 13:05 tpeterson-metropolis

@tpeterson-metropolis,

Thank you. I'll see if I can reproduce it.

Jason3S avatar May 28 '25 14:05 Jason3S

@tpeterson-metropolis,

I'm not able to reproduce the issue you are seeing.

It causes an error for me: https://github.com/streetsidesoftware/cspell-action-example/pull/2

Do you have an example repo that shows the issue?

Jason3S avatar May 28 '25 16:05 Jason3S

We were running into the same issue with the following output:

Run streetsidesoftware/cspell-action@v7
  with:
    incremental_files_only: true
    inline: warning
    treat_flagged_words_as_errors: false
    strict: true
    suggestions: false
    verbose: false
    check_dot_files: explicit
    use_cspell_files: false
    report: all
  env:
    BRANCH_NAME: internal/spellcheck
  
cspell-action
Pull Request
Files checked: 0, Issues found: 0 in 0 files.
Done.

The job for this is

  spellcheck:
    name: Spell Check
    runs-on: [self-hosted, normal]
    steps:
      - uses: actions/checkout@v4
      - uses: streetsidesoftware/cspell-action@v7

While trying to provide a small cspell.json that could reproduce this I found that it was specifically caused by a files entry in the configuration which looked like the following:

{
  "files": [
    ".github",
    "applications/application_a/docker",
    "applications/application_a/html/modules/concepts",
    "applications/application_a/html/modules/extensions",
    "applications/application_a/html/modules/projects",
    "applications/application_a/html/profiles/profile",
    "applications/application_a/scripts",
    "applications/application_a/tests",
    "applications/application_a/tools",
    "applications/application_b"
  ]
}

Removing that files entry would cause the GitHub action to work as expected. Locally this files configuration already works as expected.

My hypothesis is that this could be a difference between how the GitHub action interprets this vs how CSpell itself does so. Or it's a platform difference (Mac locally; Linux in the CI).

Re-reading the documentation, I suspect that our configuration might be invalid (it's not actually a glob?) but it's not exactly clear to me whether that's true or why it would then still work on our local development machines.

Kingdutch avatar Aug 06 '25 13:08 Kingdutch