Skip to content

Commit 3503294

Browse files
committed
Add stan gh-action and exclude all triggered checks.
1 parent 5e38d3a commit 3503294

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

.github/workflows/stan.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: stan
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
name: ghc ${{ matrix.ghc }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
cabal: ["3.6"]
14+
ghc:
15+
- "8.10.7"
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
22+
- uses: haskell/actions/setup@v1
23+
name: Setup GHC and cabal-install
24+
with:
25+
ghc-version: ${{ matrix.ghc }}
26+
cabal-version: ${{ matrix.cabal }}
27+
28+
- uses: actions/cache@v2
29+
name: cache ~/.cabal/store
30+
with:
31+
path: ~/.cabal/store
32+
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
33+
34+
- name: update
35+
run: cabal update
36+
37+
- name: install stan
38+
run: cabal install stan --installdir=.bin --install-method=copy --overwrite-policy=always
39+
40+
- name: generate .hie for analysis
41+
run: cabal build stack:lib:stack
42+
43+
- name: stan
44+
run: .bin/stan report

.stan.toml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Partial: base/!!
2+
[[check]]
3+
id = "STAN-0005"
4+
scope = "all"
5+
type = "Exclude"
6+
7+
# Partial: base/minimum
8+
[[check]]
9+
id = "STAN-0014"
10+
scope = "all"
11+
type = "Exclude"
12+
13+
# Partial: base/minimumBy
14+
[[check]]
15+
id = "STAN-0016"
16+
scope = "all"
17+
type = "Exclude"
18+
19+
# Partial: base/fromList
20+
[[check]]
21+
id = "STAN-0020"
22+
scope = "all"
23+
type = "Exclude"
24+
25+
# Infinite: base/reverse
26+
[[check]]
27+
id = "STAN-0101"
28+
scope = "all"
29+
type = "Exclude"
30+
31+
# Infinite: base/isSuffixOf
32+
[[check]]
33+
id = "STAN-0102"
34+
scope = "all"
35+
type = "Exclude"
36+
37+
# Infinite: base/length
38+
[[check]]
39+
id = "STAN-0103"
40+
scope = "all"
41+
type = "Exclude"
42+
43+
# Anti-pattern: foldl
44+
[[check]]
45+
id = "STAN-0202"
46+
scope = "all"
47+
type = "Exclude"
48+
49+
# Anti-pattern: Data.ByteString.Char8.pack
50+
[[check]]
51+
id = "STAN-0203"
52+
scope = "all"
53+
type = "Exclude"
54+
55+
# Data types with non-strict fields
56+
[[check]]
57+
id = "STAN-0206"
58+
scope = "all"
59+
type = "Exclude"
60+
61+
# Anti-pattern: Foldable methods on possibly error-prone structures
62+
[[check]]
63+
id = "STAN-0207"
64+
scope = "all"
65+
type = "Exclude"
66+
67+
# Anti-pattern: Slow 'length' for Text
68+
[[check]]
69+
id = "STAN-0208"
70+
scope = "all"
71+
type = "Exclude"
72+
73+
# Anti-pattern: unsafe functions
74+
[[check]]
75+
id = "STAN-0212"
76+
scope = "all"
77+
type = "Exclude"
78+
79+
# Anti-pattern: Pattern matching on '_'
80+
[[check]]
81+
id = "STAN-0213"
82+
scope = "all"
83+
type = "Exclude"
84+
85+
# Using tuples of big size (>= 4) can decrease code readability
86+
[[check]]
87+
id = "STAN-0302"
88+
scope = "all"
89+
type = "Exclude"

0 commit comments

Comments
 (0)