-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to address issue 84; support for spaces in file paths requiring q…
…uoting (#90) * This is first shot at a fix of the issue reported in #86. I believe file paths without space has been working as a conincidence since the splitting has not been working at all, but treating the list of file names as a single string also worked. Now it should work for both file paths without spaces and file paths with spaces, which however require uniform quoting using either ' (single quotes) or " (double quotes) * amend! This is first shot at a fix of the issue reported in #84. I believe file paths without space has been working as a conincidence since the splitting has not been working at all, but treating the list of file names as a single string also worked. Now it should work for both file paths without spaces and file paths with spaces, which however require uniform quoting using either ' (single quotes) or " (double quotes) * Bumped version in examples for the upcoming bug fix release * Updated the documentation to support the bug fix addressing issue #84 * Minor correction to Dockerfile, was executing as sh, but was using Bash script
- Loading branch information
Showing
3 changed files
with
104 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
steps: | ||
# The checkout step | ||
- uses: actions/checkout@master | ||
- uses: rojopolis/[email protected].0 | ||
- uses: rojopolis/[email protected].1 | ||
name: Spellcheck | ||
``` | ||
|
@@ -60,6 +60,52 @@ By default, this action will use the `sources:` list under each task in your con | |
|
||
When this option is used, you must also specify the `task_name` to override the `sources:` list for. | ||
|
||
Do note that file paths containing spaces need to be quoted using either `'` (single quotes) or `"` (double quotes). The quoting has to be uniform and the two quoting styles can not be intermixed. | ||
|
||
### Examples | ||
|
||
Parts are lifted from issue [#84](https://github.com/rojopolis/spellcheck-github-actions/issues/84) | ||
|
||
#### No spaces, quotes not required | ||
|
||
```yaml | ||
source_files: README.md CHANGELOG.md notes/Notes.md | ||
``` | ||
|
||
#### No spaces, quotes not required, double quotes used for complete parameter | ||
|
||
```yaml | ||
source_files: "README.md CHANGELOG.md notes/Notes.md" | ||
``` | ||
|
||
This might actually work, but it is not recommended and might it might break, instead using proper quoting. | ||
|
||
#### No spaces, quotes not required, double quotes used for single parameters | ||
|
||
```yaml | ||
source_files: "README.md" "CHANGELOG.md" "notes/Notes.md" | ||
``` | ||
|
||
This would also work using single quotes | ||
|
||
#### Spaces, quotes required, single quotes used | ||
|
||
```yaml | ||
source_files: 'Managed Services/Security Monitor/README.md' 'Terraform/Development Guide/README.md' | ||
``` | ||
|
||
#### Spaces, quotes required, double quotes used | ||
|
||
```yaml | ||
source_files: "Managed Services/Security Monitor/README.md" "Terraform/Development Guide/README.md" | ||
``` | ||
|
||
#### Spaces, quotes required, intermixed quotes, will not work | ||
|
||
```yaml | ||
source_files: README.md CHANGELOG.md notes/Notes.md | ||
``` | ||
|
||
## Specify A Specific Task To Run | ||
|
||
By default, all tasks in your config file will be run. By setting `task_name` you can override this and run only the task you require. | ||
|
@@ -79,7 +125,7 @@ jobs: | |
steps: | ||
# The checkout step | ||
- uses: actions/checkout@master | ||
- uses: rojopolis/[email protected].0 | ||
- uses: rojopolis/[email protected].1 | ||
name: Spellcheck | ||
with: | ||
source_files: README.md CHANGELOG.md notes/Notes.md | ||
|
@@ -152,7 +198,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: rojopolis/[email protected].0 | ||
- uses: rojopolis/[email protected].1 | ||
name: Spellcheck | ||
with: | ||
config_path: config/.spellcheck.yml # put path to configuration file here | ||
|
@@ -414,7 +460,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: rojopolis/[email protected].0 | ||
- uses: rojopolis/[email protected].1 | ||
name: Spellcheck | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters