Skip to content

Support glob patterns for vale-files input in docs.yaml #943

@erinecon

Description

@erinecon

Enhancement Proposal

Enhance docs.yaml to support glob patterns for files.

Problem

Currently, the vale-files input for docs.yaml does not support glob patterns. For example, let's say I want to check all the Markdown files in the docs repo. I define vale-files like so:

vale-files: '["docs/**/*.md"]'

The workflow will fail with this input, and the failure message is:

  E100 [doLint] Runtime error
  
  argument './docs/**/*.md' does not exist
  
  Execution stopped with code 1.

Even though those files exist, vale-files (and the upstream input for errata-ai/vale-action, files) expects directories and files only. The action looks for the literal file ./docs/**/*.md. Either I would need to run over all files in the docs directory, or I would need to list all the files individually in vale-files.

Proposal

Include an extra step in docs.yaml to compile a list of all files defined by vale-files, including any glob patterns. Then feed this list into the files input used by errata-ai/vale-action.

Impact

Low (The feature is nice to have)

Impact Rationale

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions