From 84a90374b48951144cfdd5909faca4ceae8dcf6d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 18 Oct 2014 09:59:11 -0700 Subject: [PATCH] make build warnings consistent --- Makefile | 9 ++++++++- hledger-lib/hledger-lib.cabal | 5 ++++- hledger-web/hledger-web.cabal | 13 ++++++++----- hledger/hledger.cabal | 13 ++++++++----- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 204587364..3683329e2 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,14 @@ PATCHLEVEL:=$(shell git describe --long | awk -F - '{print $$2}') #PATCHLEVEL:=$(shell git rev-list last_release..HEAD | wc -l) # build flags -WARNINGS:=-W -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-name-shadowing #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction +# comment the below to see more warnings +WARNINGS:=\ + -Wall \ + -fno-warn-unused-do-bind \ + -fno-warn-name-shadowing \ + -fno-warn-missing-signatures \ + -fno-warn-orphans \ + -fno-warn-type-defaults \ # For ghc-only dev builds of hledger-web: enable the language # extensions specified in hledger-web.cabal, except for some which are diff --git a/hledger-lib/hledger-lib.cabal b/hledger-lib/hledger-lib.cabal index a27e3c127..ff22918cc 100644 --- a/hledger-lib/hledger-lib.cabal +++ b/hledger-lib/hledger-lib.cabal @@ -33,6 +33,8 @@ extra-source-files: library -- should set patchlevel here as in Makefile cpp-options: -DPATCHLEVEL=0 + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans default-language: Haskell2010 exposed-modules: Hledger @@ -97,7 +99,8 @@ source-repository head test-suite tests type: exitcode-stdio-1.0 main-is: tests/suite.hs - ghc-options: -Wall + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans default-language: Haskell2010 build-depends: hledger-lib , base >= 4.3 && < 5 diff --git a/hledger-web/hledger-web.cabal b/hledger-web/hledger-web.cabal index 1112370d9..3d277198b 100644 --- a/hledger-web/hledger-web.cabal +++ b/hledger-web/hledger-web.cabal @@ -82,7 +82,8 @@ library if flag(dev) || flag(library-only) cpp-options: -DDEVELOPMENT - ghc-options: -Wall -fno-warn-unused-do-bind + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans extensions: CPP @@ -186,11 +187,12 @@ executable hledger-web cpp-options: -DVERSION="0.23.98" if flag(dev) - cpp-options: -DDEVELOPMENT + cpp-options: -DDEVELOPMENT - ghc-options: -Wall -fno-warn-unused-do-bind + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans if flag(threaded) - ghc-options: -threaded + ghc-options: -threaded if flag(dev) ghc-options: -O0 @@ -278,7 +280,8 @@ executable hledger-web test-suite test type: exitcode-stdio-1.0 - ghc-options: -Wall + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans hs-source-dirs: tests main-is: main.hs build-depends: diff --git a/hledger/hledger.cabal b/hledger/hledger.cabal index 8d50e6737..0c91aab2b 100644 --- a/hledger/hledger.cabal +++ b/hledger/hledger.cabal @@ -42,8 +42,9 @@ flag threaded Default: True library - cpp-options: -DVERSION="0.23.98" - ghc-options: -W + cpp-options: -DVERSION="0.23.98" + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans default-language: Haskell2010 -- should be the same as below exposed-modules: @@ -129,8 +130,9 @@ executable hledger Hledger.Cli.Print Hledger.Cli.Register Hledger.Cli.Stats - cpp-options: -DVERSION="0.23.98" - ghc-options: -W + cpp-options: -DVERSION="0.23.98" + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans if flag(threaded) ghc-options: -threaded -- should be the same as above @@ -167,7 +169,8 @@ executable hledger test-suite tests type: exitcode-stdio-1.0 main-is: tests/suite.hs - ghc-options: -Wall + ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures + ghc-options: -fno-warn-type-defaults -fno-warn-orphans default-language: Haskell2010 build-depends: hledger-lib , hledger