Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to exit gracefully when all files in the diff are excluded #1946

Merged
6 commits merged into from
Sep 13, 2021

Conversation

danieljurek
Copy link
Member

@danieljurek danieljurek commented Aug 27, 2021

Some exercise of eng/common synchronization scenarios revealed an interesting set of behaviors in cspell configuration:

  • cspell requires that a file be listed on the command line of cspell lint ... IF all of the files in the cspell config file's file section are excluded by ignorePaths from the config file. That is, when ignoring eng/common/**/* and all files in the PR are changes to eng/common, cspell will exit with an error and show help text implying that a file must be specified on the command line.
    • cspell will not fail IFF the files configuration value includes a file which exists, is not empty, and is not excluded by ignorePaths
  • cspell merges configurations given with --config <file path> with configurations in "known" locations (e.g. .vscode/cspell.json)

This change:

  • places a non-empty file in the temp folder (unlikely to be excluded in the original cspell.json file)
  • renames the supplied config path to .vscode/cspell.json.ignore which will not be picked up by cspell.

@danieljurek danieljurek requested a review from a team as a code owner August 27, 2021 20:47
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

… 'files' config list are excluded by the expressions in 'ignorePaths'
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

…cript, logic for testing should happen above that and exit appropriately if running tests
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link

ghost commented Sep 13, 2021

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit e2103d5 into Azure:main Sep 13, 2021
@danieljurek danieljurek deleted the spellcheck-requires-filename branch September 13, 2021 20:07
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants