Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Jun 14, 2024
1 parent a870091 commit 970dd4f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ 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=JSON $file | jq -c '.[] | {file: "'$file'", line: .Line, column: .Span[0], message: .Message, suggestion: (.Suggestions[0] // "")}' >> rdjson_output.jsonl
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
else
echo "Error processing $file"
fi
done
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
Expand Down

0 comments on commit 970dd4f

Please sign in to comment.