docs: document multiple-file Vale input for doc-style - #1501
Conversation
Fixes #730 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The documentation for this pull request will be available at https://actions.docs.ansys.com/pull/1501. Please allow some time for the documentation to be deployed. |
moe-ad
left a comment
There was a problem hiding this comment.
Thanks for this @jorgepiloto. I left a few comments.
Also can we test this just to make sure it works? I know we have faced issues in the past concerning passing json-formatted data to nested action calls. We can simply extend the existing ci test as a minimum.
moe-ad
left a comment
There was a problem hiding this comment.
I am requesting changes just to make sure we don't mistakenly merge given the existing approvals.
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
|
Thanks for the suggestions, @moe-ad. Feel free to merge when CI/CD passes. |
|
|
||
| - name: "Collect files for Vale as JSON" | ||
| id: collect-vale-files | ||
| shell: bash |
There was a problem hiding this comment.
For consistency, could you refactor this step to use shell: python instead ? That's how we are handling that in other actions.
There was a problem hiding this comment.
Doable, yes. But that approach will make writing to GITHUB_OUTPUT not as straightforward as just doing it through bash. So I would advice leaving it as is.
There was a problem hiding this comment.
Feel free to discard my comment then but I would emphasize to improve consistency in other actions then.
Note that, AFAIK, moving to shell: python would only require to replace print(f"vale_files={json.dumps(files)}") with
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"vale_files={json.dumps(files)}\n")But again, as long as we are consitent, I'm fine with it.
This updates the
doc-styleaction docs to show how to lint an explicit list of files with Vale.filesinput accepts either a directory path or a JSON-formatted array of file paths.doc-style-multiple-files.ymlexample that builds a JSON file list withjqand passes it throughenv.VALE_FILES.Closes #730.