diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index c712dc58d12..be546131f3b 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -35,15 +35,18 @@ jobs: - name: Run Vale on changed files run: | echo "[]" > rdjson_output.jsonl - for file in $(echo "${{ steps.changed-files.outputs.files }}" | jq -r '.[]'); do + for file in $(echo "${{ steps.changed-files.outputs.files }}" | jq -r '.[]'); do echo "Running Vale on $file" vale_output=$(vale --output=JSON "$file") if [ $? -eq 0 ]; then - echo "$vale_output" | jq -c '.[] | {file: "'"$file"'", line: .Line, column: .Span[0], message: .Message, suggestion: (.Suggestions[0] // "")}' >> rdjson_output.jsonl + echo "$vale_output" | jq -c --arg file "$file" '.[] | {file: $file, line: .Line, column: .Span[0], message: .Message, suggestion: (.Suggestions[0] // "")}' >> rdjson_output.jsonl else echo "Error processing $file" fi done + echo "Vale output:" + cat rdjson_output.jsonl + env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}