Skip to content

docs: document multiple-file Vale input for doc-style - #1501

Open
jorgepiloto wants to merge 9 commits into
mainfrom
docs/vale-multiple-files
Open

docs: document multiple-file Vale input for doc-style#1501
jorgepiloto wants to merge 9 commits into
mainfrom
docs/vale-multiple-files

Conversation

@jorgepiloto

Copy link
Copy Markdown
Member

This updates the doc-style action docs to show how to lint an explicit list of files with Vale.

  • Clarifies that the files input accepts either a directory path or a JSON-formatted array of file paths.
  • Adds a doc-style-multiple-files.yml example that builds a JSON file list with jq and passes it through env.VALE_FILES.

Closes #730.

@jorgepiloto
jorgepiloto marked this pull request as ready for review August 25, 2026 12:58
@jorgepiloto
jorgepiloto requested a review from a team as a code owner August 25, 2026 12:58
@moe-ad moe-ad added the deploy-pr-doc Deploy pull request documentation label Aug 25, 2026
@github-actions

Copy link
Copy Markdown

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.

@RobPasMue RobPasMue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice example!

@moe-ad moe-ad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread doc/source/style-actions/examples/doc-style-multiple-files.yml
Comment thread doc/source/style-actions/examples/doc-style-multiple-files.yml Outdated

@moe-ad moe-ad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am requesting changes just to make sure we don't mistakenly merge given the existing approvals.

@github-actions github-actions Bot added the ci Pipelines maintenance related label Aug 26, 2026
Comment thread doc/source/style-actions/examples/doc-style-multiple-files.yml Outdated
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
@jorgepiloto

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, could you refactor this step to use shell: python instead ? That's how we are handling that in other actions.

@moe-ad moe-ad Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread doc/source/style-actions/examples/doc-style-multiple-files.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pipelines maintenance related deploy-pr-doc Deploy pull request documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document how to pass multiple files to Vale

5 participants