X Tutup
Skip to content

Commit fe22aa5

Browse files
Antoine Leblanchasura-bot
authored andcommitted
ci: improve hlint messages
GitOrigin-RevId: 7547c2a
1 parent 34fc92e commit fe22aa5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/hlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
CHANGED_HS_FILES=$(git diff --name-only origin/${{github.base_ref}}...${{github.sha}} -- "${{env.working-directory}}/*.hs" | xargs -i -d '\n' sh -c 'ls -d {} 2>/dev/null || true')
3535
echo "$CHANGED_HS_FILES"
36-
JQ_SCRIPT='.[] | "::" + (if (.severity=="Warning" or .severity=="Error") then "error" else "warning" end) + " file=\(.file),line=\(.startLine),col=\(.startColumn)::\(.severity):" + " \(.hint)%0AFound:%0A \(.from | gsub("\n";"%0A "))%0A" + try ("Perhaps:%0A " + (.to | gsub("\n";"%0A "))) catch ""'
36+
JQ_SCRIPT='.[] | "::" + (if (.severity=="Warning" or .severity=="Error") then "error" else "warning" end) + " file=\(.file),line=\(.startLine),col=\(.startColumn)::\(.severity):" + " \(.hint)%0AFound:%0A \(.from | gsub("\n";"%0A "))%0A" + try ("Perhaps:%0A " + (.to | gsub("\n";"%0A ")) + "%0A") catch "" + try (if .note | length > 0 then "Note:%0A " + (.note | join("\n") | gsub("\n";"%0A ")) else "" end) catch ""'
3737
if [[ "$CHANGED_HS_FILES" ]]
3838
then
3939
OUT=$(mktemp)

server/.hlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@
128128
- package base
129129
rules:
130130
- warn: {lhs: "Data.Text.intercalate \", \" x", rhs: "commaSeparated x", note: "From Data.Text.Extended"}
131+
- warn: {lhs: "Data.Text.Extended.intercalate \", \" x", rhs: "commaSeparated x"}

0 commit comments

Comments
 (0)
X Tutup