Skip to content

Commit

Permalink
Merge branch 'test-vale' into test-vale-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jun 14, 2024
2 parents 9d805af + a870091 commit af1de1e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint and Suggest
name: Lint and suggest

on:
pull_request:
Expand Down Expand Up @@ -34,12 +34,10 @@ jobs:

- name: Run Vale on changed files
run: |
echo "[]" > rdjson_output.jsonl
for file in $(echo ${{ steps.changed-files.outputs.files }} | jq -r '.[]'); do
echo "Running Vale on $file"
vale --output=JSON $file > vale_output.json
cat vale_output.json
cat vale_output.json | jq -c '.[] | {file: "'$file'", line: .Line, column: .Span[0], message: .Message, suggestion: .Suggestions[0]}' > rdjson_output.jsonl
cat rdjson_output.jsonl
vale --output=JSON $file | jq -c '.[] | {file: "'$file'", line: .Line, column: .Span[0], message: .Message, suggestion: (.Suggestions[0] // "")}' >> rdjson_output.jsonl
done
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
Expand Down

0 comments on commit af1de1e

Please sign in to comment.