Skip to content

Document how to pass multiple files to Vale #730

Closed

Description

@jorgepiloto

This is a continuation of #432, in particular of this comment:

      - name: "Install jq"
        run: |
          # Used to format Vale input as a JSON-formatted list of files
          sudo apt install -y jq

      - name: "Collect desired files"
        run: |
          # Find all .rst files excluding those in doc/source/api/
          RST_FILES=$(find doc/source -type f -name "*.rst" ! -path "doc/source/api/*")

          # Find all .py files inside the examples/ directory, excluding those with an underscore
          PY_FILES=$(find examples -type f -name "*.py" ! -name "*_*")

          # Combine both file lists and convert them to a JSON array
          # TODO: include Python files too. See Vale issue
          # https://github.com/errata-ai/vale/issues/858
          # VALE_FILES=$(echo -e "$RST_FILES\n$PY_FILES" | jq -R . | jq -s .)
          VALE_FILES=$(echo -e "$RST_FILES" | jq -R . | jq -s .)
          echo "VALE_FILES=$(echo $VALE_FILES)" >> $GITHUB_ENV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions