From 2c829f6ac2223579cbe84588c5d03c9d0238f6ed Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Thu, 13 Jun 2024 15:15:03 +0100 Subject: [PATCH] add --- .github/workflows/vale.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index 5bc12bba682..95a2ba18963 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -35,18 +35,21 @@ jobs: - name: Create RDJSON Conversion Script run: | cat << 'EOF' > convert-to-rdjson.jq - . as $input | to_entries[] | .value[] | { - message: .Message, - location: { - path: $input.key, - range: { - start: { line: .Line, column: (.Span[0] + 1) }, - end: { line: .Line, column: (.Span[1] + 1) } - } - }, - severity: .Severity, - code: { value: .Check, url: .Link } - } + map( + # Construct the Reviewdog-compatible object + { + message: .Message, + location: { + path: .File, + range: { + start: { line: .Line, column: (.Span[0] + 1) }, + end: { line: .Line, column: (.Span[1] + 1) } + } + }, + severity: .Severity, + code: { value: .Check, url: .Link } + } + ) EOF - name: Run Vale and Reviewdog on Changed Files