Skip to content

Commit

Permalink
Merge pull request #611 from typechecker/add/stan
Browse files Browse the repository at this point in the history
Add stan gh-action.
  • Loading branch information
facundominguez authored Aug 2, 2022
2 parents f49105f + 154830a commit 3bdb678
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/stan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: stan

on:
push:
pull_request:

jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
cabal: ["3.6"]
ghc:
- "8.10.7"

steps:
- uses: actions/checkout@v2
with:
submodules: true

- uses: haskell/actions/setup@v1
name: Setup GHC and cabal-install
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- uses: actions/cache@v2
name: cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal

- uses: pavpanchekha/[email protected]
name: setup z3
with:
version: "4.8.7"

- name: update
run: cabal update

- name: install stan
run: cabal install stan --installdir=.bin --install-method=copy --overwrite-policy=always

- name: generate .hie for analysis
run: cabal build liquid-fixpoint:lib:liquid-fixpoint

- name: stan
run: .bin/stan report
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ Session.vim
/TAGS
/tags
*.swp
*.hie
stan.html
.bin/stan
143 changes: 143 additions & 0 deletions .stan.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Partial: base/head
[[check]]
id = "STAN-0001"
scope = "all"
type = "Exclude"

# Partial: base/tail
[[check]]
id = "STAN-0002"
scope = "all"
type = "Exclude"

# Partial: base/init
[[check]]
id = "STAN-0003"
scope = "all"
type = "Exclude"

# Usage of partial function 'last' for lists
[[check]]
id = "STAN-0004"
scope = "all"
type = "Exclude"

# Partial: base/!!
[[check]]
id = "STAN-0005"
scope = "all"
type = "Exclude"

# Partial: base/fromJust
[[check]]
id = "STAN-0008"
scope = "all"
type = "Exclude"

# Partial: base/read
[[check]]
id = "STAN-0009"
scope = "all"
type = "Exclude"

# Partial: base/toEnum
[[check]]
id = "STAN-0012"
scope = "all"
type = "Exclude"

# Partial: base/maximum
[[check]]
id = "STAN-0013"
scope = "all"
type = "Exclude"

# Partial: base/minimum
[[check]]
id = "STAN-0014"
scope = "all"
type = "Exclude"

# Partial: base/foldr1
[[check]]
id = "STAN-0019"
scope = "all"
type = "Exclude"

# Infinite: base/reverse
[[check]]
id = "STAN-0101"
scope = "all"
type = "Exclude"

# Infinite: base/isSuffixOf
[[check]]
id = "STAN-0102"
scope = "all"
type = "Exclude"

# Infinite: base/length
[[check]]
id = "STAN-0103"
scope = "all"
type = "Exclude"

# Infinite: base/sum
[[check]]
id = "STAN-0105"
scope = "all"
type = "Exclude"

# Anti-pattern: foldl
[[check]]
id = "STAN-0202"
scope = "all"
type = "Exclude"

# Data types with non-strict fields
[[check]]
id = "STAN-0206"
scope = "all"
type = "Exclude"

# Anti-pattern: Slow 'length' for Text
[[check]]
id = "STAN-0208"
scope = "all"
type = "Exclude"

# Anti-pattern: Slow 'nub' for lists
[[check]]
id = "STAN-0209"
scope = "all"
type = "Exclude"

# Anti-pattern: unsafe functions
[[check]]
id = "STAN-0212"
scope = "all"
type = "Exclude"

# Anti-pattern: Pattern matching on '_'
[[check]]
id = "STAN-0213"
scope = "all"
type = "Exclude"

# Anti-pattern: use 'compare'
[[check]]
id = "STAN-0214"
scope = "all"
type = "Exclude"

# Missing fixity declaration for operator
[[check]]
id = "STAN-0301"
scope = "all"
type = "Exclude"

# Using tuples of big size (>= 4) can decrease code readability
[[check]]
id = "STAN-0302"
scope = "all"
type = "Exclude"
3 changes: 3 additions & 0 deletions liquid-fixpoint.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ library
, text
, transformers
, unordered-containers
ghc-options:
-fwrite-ide-info
-hiedir=.hie

if flag(devel)
ghc-options: -Werror
Expand Down

0 comments on commit 3bdb678

Please sign in to comment.