Skip to content

Commit dd284bc

Browse files
chamecobmcutler
authored andcommitted
Add linting reviews with danger and danger-hlint (#31)
* Add linting reviews with danger and danger-hlint * Fix error
1 parent 6b3ae01 commit dd284bc

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,24 @@ before_install:
1212
- mkdir -p ~/.local/bin
1313
- export PATH=$HOME/.local/bin:$PATH
1414
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
15+
- rvm use 2.1 --install --binary --fuzzy
1516
install:
16-
- travis_wait 30 stack --no-terminal --install-ghc --copy-bins build
17-
- stack --no-terminal install hlint
17+
- travis_wait 30 stack --no-terminal --install-ghc --copy-bins build
18+
- stack --no-terminal install hlint
19+
- cp hlint ~/.local/bin
20+
- gem install danger danger-hlint
1821
script:
1922
- stack --no-terminal test --only-dependencies
2023
- "./hlint '--ignore=Parse error' src"
2124
- "./hlint '--ignore=Parse error' app"
25+
- danger
2226
deploy:
2327
provider: releases
2428
api_key:
2529
secure: zM6T6ZwD1Tv0Igk9LORh3YZJvLlZHtjEbb6vkAQTicQ82Y/Ls88+67C0S4IkJbCkWqLUkfLkCv2x8aaZ7O6cbGi2xDtSPf+NyWfagvA+E2I6T2USJ93iYNs10Ep/SoAx7NEn6hnEKkNJd/kdFYtx/CvgXeN+PYHRfBD+NF106zoV4b9cF/mgSev/fxXqwT3GhaBJ/EEQ9LtEvgek3vjVWiSchCuubDdklgfAcgSBzGoQQLxyCq/BRF28ekFefKRQKiUNS4WI2btv+VnrP8xOvIPXnMSkFeF++druwPI75LRWYrhZA1ayj/5/NMHnn+TE4BMm5a2bdoLocvRHOwFIeK29oS5CdDttfiwpGHIykZGCoMIehfTJIecXyxezs1K8p0E6PV3eoCGyodXCoRDUXMWVUSaGbWnaIR8XcIOi3Rl6aYYfXWJc0MKiaQYSNQ7X2f4CqDDANqu587FPBQyHwlaEpXbb/bxFR6tvGSwnWgeU+bHseSKMesDz+wzhFHbyA77ls48dlKS2jpm/6qGx2Av1agz/cT7AJjrfuOhj8ZhpSIMtl3p1CfUCw1hh6lm42LrwOTRSBLMW7ErYDD5w4xw1YLQKMZVERGDrwYDVcbjgymZO0kE4kE1eh7KJJFZhsMkVCc/C3hi0TCtgjfiZ6uLKs5NYUUmiD9rCbp5UNeY=
2630
file:
27-
- count
28-
- plagiarism
31+
- count
32+
- plagiarism
2933
skip_cleanup: true
3034
on:
3135
tags: true

Dangerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
affected_files = git.added_files + git.modified_files
2+
3+
haskell_files = affected_files.select { |file| file.end_with?('.hs') }
4+
5+
hlint.lint(haskell_files, true)

lichen.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ library
5454
, blaze-markup
5555
, clay
5656
, jmacro
57-
ghc-options: -Wall -Werror -fwarn-incomplete-patterns
57+
ghc-options: -Wall -fwarn-incomplete-patterns
5858
default-language: Haskell2010
5959

6060
executable plagiarism
6161
hs-source-dirs: app/plagiarism
6262
main-is: Main.hs
63-
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -Werror
63+
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall
6464
build-depends: base
6565
, lichen
6666
default-language: Haskell2010
6767

6868
executable count
6969
hs-source-dirs: app/count
7070
main-is: Main.hs
71-
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -Werror
71+
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall
7272
build-depends: base
7373
, lichen
7474
default-language: Haskell2010

0 commit comments

Comments
 (0)