Skip to content

Commit

Permalink
Add linting reviews with danger and danger-hlint (#31)
Browse files Browse the repository at this point in the history
* Add linting reviews with danger and danger-hlint

* Fix error
  • Loading branch information
chameco authored and bmcutler committed Jul 13, 2017
1 parent 6b3ae01 commit dd284bc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,24 @@ before_install:
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- rvm use 2.1 --install --binary --fuzzy
install:
- travis_wait 30 stack --no-terminal --install-ghc --copy-bins build
- stack --no-terminal install hlint
- travis_wait 30 stack --no-terminal --install-ghc --copy-bins build
- stack --no-terminal install hlint
- cp hlint ~/.local/bin
- gem install danger danger-hlint
script:
- stack --no-terminal test --only-dependencies
- "./hlint '--ignore=Parse error' src"
- "./hlint '--ignore=Parse error' app"
- danger
deploy:
provider: releases
api_key:
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=
file:
- count
- plagiarism
- count
- plagiarism
skip_cleanup: true
on:
tags: true
Expand Down
5 changes: 5 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
affected_files = git.added_files + git.modified_files

haskell_files = affected_files.select { |file| file.end_with?('.hs') }

hlint.lint(haskell_files, true)
6 changes: 3 additions & 3 deletions lichen.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,21 @@ library
, blaze-markup
, clay
, jmacro
ghc-options: -Wall -Werror -fwarn-incomplete-patterns
ghc-options: -Wall -fwarn-incomplete-patterns
default-language: Haskell2010

executable plagiarism
hs-source-dirs: app/plagiarism
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -Werror
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall
build-depends: base
, lichen
default-language: Haskell2010

executable count
hs-source-dirs: app/count
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall -Werror
ghc-options: -threaded -rtsopts -with-rtsopts=-N -O2 -Wall
build-depends: base
, lichen
default-language: Haskell2010
Expand Down

0 comments on commit dd284bc

Please sign in to comment.