Skip to content

Commit 920c6ea

Browse files
hasura-botAntoine Leblanc
andcommitted
ci: add hlint escape hatch (#71)
* ci: add hlint escape hatch Co-authored-by: Antoine Leblanc <[email protected]> GITHUB_PR_NUMBER: 6164 GITHUB_PR_URL: hasura#6164 * Applied changes to new workflow files. * Add missing label trigger for lint worklow Co-authored-by: Antoine Leblanc <[email protected]> GitOrigin-RevId: 3e22c30
1 parent 4f76b9f commit 920c6ea

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
on: pull_request
2-
name: changelog
1+
on: [label, pull_request]
2+
name: changelog
33
jobs:
44
check:
55
runs-on: ubuntu-latest

.github/workflows/hlint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
name: server lint
22
on:
3+
label:
34
pull_request:
45
paths:
56
- 'server/**'
67

78
jobs:
89
hlint:
910
runs-on: ubuntu-20.04
11+
if: "!contains(github.event.pull_request.labels.*.name, 'ignore-server-hlint-checks') && github.event.label.name != 'ignore-server-hlint-checks'"
1012
env:
1113
working-directory: ./server
1214
HLINT_BASE_URL: https://dl.haskellworks.io/binaries/hlint
1315
HLINT_VERSION: 3.1.6
1416
HLINT_ARCH: x86_64
1517
HLINT_OS: linux
1618
HLINT_URL: $HLINT_BASE_URL/hlint-${HLINT_VERSION}-${HLINT_ARCH}-${HLINT_OS}.tar.gz
17-
1819
steps:
1920
- uses: actions/checkout@v2
2021
with:

server/.hlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
- warn: {lhs: "case x of {Just b -> pure b; Nothing -> a}", rhs: "onNothing x a"}
110110
- warn: {lhs: "case x of {Nothing -> a; Just b -> return b}", rhs: "onNothing x a"}
111111
- warn: {lhs: "case x of {Just b -> return b; Nothing -> a}", rhs: "onNothing x a"}
112+
- warn: {lhs: "fromMaybe [] x", rhs: "maybeToList x"}
112113

113114
- group:
114115
name: data-text-extended

0 commit comments

Comments
 (0)