`incremental_files_only` appears to be ignored
I'm seeing a pair of issues:
- Typos from a PR are not caught until the code is merged
- 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,
Thank you. I'll see if I can reproduce it.
@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?
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.