From 187a9f0536befd05353de3f625e8468b8e5178c3 Mon Sep 17 00:00:00 2001 From: iko Date: Mon, 20 Jan 2020 19:57:26 +0300 Subject: [PATCH 1/3] Added doctests and compiler warnings --- stack.yaml | 4 ++-- test/Doc.hs | 6 ++++++ validationt.cabal | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 test/Doc.hs diff --git a/stack.yaml b/stack.yaml index 31d2404..c73566f 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-8.14 +resolver: lts-14.20 # User packages to be built. # Various formats can be used as shown in the example below. @@ -63,4 +63,4 @@ extra-package-dbs: [] # extra-lib-dirs: [/path/to/dir] # # Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor \ No newline at end of file +# compiler-check: newer-minor diff --git a/test/Doc.hs b/test/Doc.hs new file mode 100644 index 0000000..4efb7ee --- /dev/null +++ b/test/Doc.hs @@ -0,0 +1,6 @@ +module Main (main) where + +import Test.DocTest + +main :: IO () +main = doctest [ "-XOverloadedStrings", "src" ] diff --git a/validationt.cabal b/validationt.cabal index 94cd1e9..78cce4f 100644 --- a/validationt.cabal +++ b/validationt.cabal @@ -38,3 +38,33 @@ library , vector hs-source-dirs: src default-language: Haskell2010 + ghc-options: -fwarn-unused-binds + -Wall + -Wincomplete-uni-patterns + -Wincomplete-record-updates + -Wpartial-fields + -Werror=missing-home-modules + -Wmissing-home-modules + -Widentities + -Wredundant-constraints + -Wmissing-export-lists + +test-suite doctest + type: exitcode-stdio-1.0 + hs-source-dirs: test + ghc-options: -Wall + main-is: Doc.hs + build-depends: base >=4.8 && < 5 + , aeson >= 1.0 + , doctest + , containers + , exceptions + , lens + , monad-control + , mtl + , QuickCheck + , text + , transformers + , transformers-base + , vector + , doctest From 97db6c41fd0d76951c9ed0790f6f40e671ec09b5 Mon Sep 17 00:00:00 2001 From: iko Date: Mon, 27 Jan 2020 16:21:27 +0300 Subject: [PATCH 2/3] Reenabled tests --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0620b6a..3db6438 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,7 @@ install: script: - | if [ -z "$STACK_YAML" ]; then - echo 0 - # cabal new-test --enable-tests + cabal new-test --enable-tests else stack test --system-ghc fi From 9b48aab0a785044573c8f5f3dd43c02e410d1ae2 Mon Sep 17 00:00:00 2001 From: iko Date: Mon, 27 Jan 2020 16:29:27 +0300 Subject: [PATCH 3/3] Updated resolver --- stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index c73566f..2819e28 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-14.20 +resolver: lts-14.21 # User packages to be built. # Various formats can be used as shown in the example below.