Enable HLint on Travis

This commit is contained in:
Tomas Janousek 2017-03-02 20:43:56 +01:00
parent 13a2adfb67
commit d72412caac
2 changed files with 17 additions and 17 deletions

View File

@ -13,28 +13,28 @@ before_cache:
matrix:
include:
- env: CABALVER=1.18 GHCVER=7.8.4 DO_CHECKS=0
- env: CABALVER=1.18 GHCVER=7.8.4 HAPPYVER=1.19.3 DO_CHECKS=0
compiler: ": #GHC 7.8.4"
addons: {apt: {packages: [cabal-install-1.18, ghc-7.8.4], sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.3 DO_CHECKS=0
addons: {apt: {packages: [cabal-install-1.18, ghc-7.8.4, happy-1.19.3], sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.3 HAPPYVER=1.19.4 DO_CHECKS=0
compiler: ": #GHC 7.10.3"
addons: {apt: {packages: [cabal-install-1.22, ghc-7.10.3], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.1 DO_CHECKS=1
addons: {apt: {packages: [cabal-install-1.22, ghc-7.10.3, happy-1.19.4], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.1 HAPPYVER=1.19.5 DO_CHECKS=1
compiler: ": #GHC 8.0.1"
addons: {apt: {packages: [cabal-install-1.24, ghc-8.0.1], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.2 DO_CHECKS=1
addons: {apt: {packages: [cabal-install-1.24, ghc-8.0.1, happy-1.19.5], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.2 HAPPYVER=1.19.5 DO_CHECKS=1
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [cabal-install-1.24, ghc-8.0.2], sources: [hvr-ghc]}}
- env: CABALVER=head GHCVER=head DO_CHECKS=1
addons: {apt: {packages: [cabal-install-1.24, ghc-8.0.2, happy-1.19.5], sources: [hvr-ghc]}}
- env: CABALVER=head GHCVER=head HAPPYVER=1.19.5 DO_CHECKS=1
compiler: ": #GHC head"
addons: {apt: {packages: [cabal-install-head, ghc-head], sources: [hvr-ghc]}}
addons: {apt: {packages: [cabal-install-head, ghc-head, happy-1.19.5], sources: [hvr-ghc]}}
allow_failures:
- env: CABALVER=head GHCVER=head DO_CHECKS=1
- env: CABALVER=head GHCVER=head HAPPYVER=1.19.5 DO_CHECKS=1
before_install:
- unset CC
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- export PATH=/opt/happy/$HAPPYVER/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
install:
- cabal --version
@ -46,7 +46,7 @@ install:
fi
- travis_retry cabal update -v
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v -f-test-hlint > installplan.txt
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
# check whether current requested install-plan matches cached package-db snapshot
@ -60,7 +60,7 @@ install:
echo "cabal build-cache MISS";
rm -rf $HOME/.cabsnap;
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
cabal install --only-dependencies --enable-tests --enable-benchmarks -f-test-hlint;
cabal install --only-dependencies --enable-tests --enable-benchmarks;
fi
# snapshot package-db on cache miss
@ -77,8 +77,7 @@ install:
script:
- if [ -f configure.ac ]; then autoreconf -i; fi
# Option -v2 provides useful information for debugging.
# Building newer HLint (-ftest-hlint) ghc-src-exts >=0.19 fails, giving up on it.
- cabal configure --enable-tests --enable-benchmarks -v2 -f-test-hlint
- cabal configure --enable-tests --enable-benchmarks -v2 --flags="pedantic"
- cabal build # this builds all libraries and executables (including tests/benchmarks)
- cabal test
# Older Cabal versions do not handle "ghc-options: -Werror" in -fpedantic

View File

@ -135,7 +135,6 @@ test-suite test
ghc-options: -Werror
test-suite hlint
buildable: False
hs-source-dirs: tests
type: exitcode-stdio-1.0
main-is: hlint.hs
@ -146,6 +145,8 @@ test-suite hlint
build-depends:
base >=4.8 && <5.0
, hlint ==1.9.*
else
buildable: False
ghc-options:
-Wall