haskell: introduce failOnAllWarnings
Applying `haskell.lib.failOnAllWarnings` to a Haskell package enables the `-Wall` and `-Werror` GHC options to turn all warnings into build failures.
This commit is contained in:
parent
9b8f67969e
commit
b4ea459eab
@ -875,12 +875,17 @@ to your own Haskell packages and integrate that in a Continuous Integration
|
|||||||
server like [hydra](https://nixos.org/hydra/) to assure your packages maintain a
|
server like [hydra](https://nixos.org/hydra/) to assure your packages maintain a
|
||||||
minimum level of quality. This section discusses some of these functions.
|
minimum level of quality. This section discusses some of these functions.
|
||||||
|
|
||||||
|
#### failOnAllWarnings
|
||||||
|
|
||||||
|
Applying `haskell.lib.failOnAllWarnings` to a Haskell package enables the
|
||||||
|
`-Wall` and `-Werror` GHC options to turn all warnings into build failures.
|
||||||
|
|
||||||
#### buildStrictly
|
#### buildStrictly
|
||||||
|
|
||||||
Applying `haskell.lib.buildStrictly` to a Haskell package enables the `-Wall`
|
Applying `haskell.lib.buildStrictly` to a Haskell package calls
|
||||||
and `-Werror` GHC options to turn all warnings into build failures. Additionally
|
`failOnAllWarnings` on the given package to turn all warnings into build
|
||||||
the source of your package is gotten from first invoking `cabal sdist` to ensure
|
failures. Additionally the source of your package is gotten from first invoking
|
||||||
all needed files are listed in the Cabal file.
|
`cabal sdist` to ensure all needed files are listed in the Cabal file.
|
||||||
|
|
||||||
#### checkUnusedPackages
|
#### checkUnusedPackages
|
||||||
|
|
||||||
|
@ -117,7 +117,9 @@ rec {
|
|||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
buildStrictly = pkg: buildFromSdist (appendConfigureFlag pkg "--ghc-option=-Wall --ghc-option=-Werror");
|
buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
|
||||||
|
|
||||||
|
failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";
|
||||||
|
|
||||||
checkUnusedPackages =
|
checkUnusedPackages =
|
||||||
{ ignoreEmptyImports ? false
|
{ ignoreEmptyImports ? false
|
||||||
|
Loading…
Reference in New Issue
Block a user