Skip to content

Commit 0293da9

Browse files
GambolingPangolinProofOfKeags
authored andcommitted
Sets up hlint ci workflow
1 parent 2a13ee8 commit 0293da9

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/hlint.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: HLint
3+
4+
concurrency:
5+
group: ${{ github.ref }}-hlint
6+
cancel-in-progress: true
7+
8+
on:
9+
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- stack.yaml
14+
- .hlint.yaml
15+
- "src/**/*.hs"
16+
- "test/**/*.hs"
17+
- ".github/workflows/hlint.yaml"
18+
types:
19+
- synchronize
20+
- opened
21+
- reopened
22+
- ready_for_review
23+
push:
24+
branches:
25+
- master
26+
paths:
27+
- stack.yaml
28+
- .hlint.yaml
29+
- "src/**/*.hs"
30+
- "test/**/*.hs"
31+
- ".github/workflows/hlint.yaml"
32+
workflow_dispatch:
33+
inputs: {}
34+
35+
jobs:
36+
hlint:
37+
if: github.event.pull_request.draft == false
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v3
41+
42+
- name: 'Set up HLint'
43+
uses: haskell/actions/hlint-setup@v2
44+
with:
45+
version: '3.5'
46+
47+
- name: 'Run HLint'
48+
uses: haskell/actions/hlint-run@v2
49+
with:
50+
# For some reason this has to be a string containing JSON rather than a YAML sequence
51+
path: '[ "src/", "test/"]'
52+
fail-on: warning

.hlint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
3+
- ignore:
4+
name: Use head
5+
6+
- flags:
7+
- default: true
8+
- name:
9+
- "-fdefer-typed-holes"
10+
- "-Wno-typed-holes"
11+
within: []

0 commit comments

Comments
 (0)