mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
ci: Enable -Werror
We don't want to ignore warnings do we?
This commit is contained in:
parent
22b579bd14
commit
5cdf428f55
2
.github/workflows/haskell-ci.yml
vendored
2
.github/workflows/haskell-ci.yml
vendored
@ -136,6 +136,8 @@ jobs:
|
||||
echo "package xmonad" >> cabal.project
|
||||
echo " ghc-options: -Werror=missing-methods" >> cabal.project
|
||||
cat >> cabal.project <<EOF
|
||||
package xmonad
|
||||
flags: +pedantic
|
||||
EOF
|
||||
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(xmonad)$/; }' >> cabal.project.local
|
||||
cat cabal.project
|
||||
|
3
.github/workflows/stack.yml
vendored
3
.github/workflows/stack.yml
vendored
@ -65,4 +65,5 @@ jobs:
|
||||
set -ex
|
||||
stack test \
|
||||
--fast --no-terminal \
|
||||
--resolver=${{ matrix.resolver }} --system-ghc
|
||||
--resolver=${{ matrix.resolver }} --system-ghc \
|
||||
--flag=xmonad:pedantic
|
||||
|
@ -1 +1,5 @@
|
||||
apt: libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev
|
||||
|
||||
raw-project
|
||||
package xmonad
|
||||
flags: +pedantic
|
||||
|
26
xmonad.cabal
26
xmonad.cabal
@ -51,6 +51,11 @@ source-repository head
|
||||
type: git
|
||||
location: https://github.com/xmonad/xmonad
|
||||
|
||||
flag pedantic
|
||||
description: Be pedantic (-Werror and the like)
|
||||
default: False
|
||||
manual: True
|
||||
|
||||
flag generatemanpage
|
||||
default: False
|
||||
manual: True
|
||||
@ -78,20 +83,26 @@ library
|
||||
, setlocale
|
||||
, unix
|
||||
, utf8-string >= 0.3 && < 1.1
|
||||
ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-do-bind -Wno-unused-imports
|
||||
ghc-options: -funbox-strict-fields -Wall -fno-warn-unused-do-bind
|
||||
|
||||
-- Keep this in sync with the oldest version in 'tested-with'
|
||||
if impl(ghc <= 8.4.4)
|
||||
ghc-options: -Werror=unused-imports
|
||||
if impl(ghc > 8.4.4)
|
||||
ghc-options: -Wno-unused-imports
|
||||
|
||||
if flag(pedantic)
|
||||
ghc-options: -Werror
|
||||
|
||||
executable xmonad
|
||||
main-is: Main.hs
|
||||
build-depends: base, X11, mtl, unix, xmonad
|
||||
ghc-options: -Wall -fno-warn-unused-do-bind -Wno-unused-imports
|
||||
ghc-options: -Wall -fno-warn-unused-do-bind
|
||||
|
||||
-- Keep this in sync with the oldest version in 'tested-with'
|
||||
if impl(ghc <= 8.4.4)
|
||||
ghc-options: -Werror=unused-imports
|
||||
if impl(ghc > 8.4.4)
|
||||
ghc-options: -Wno-unused-imports
|
||||
|
||||
if flag(pedantic)
|
||||
ghc-options: -Werror
|
||||
|
||||
executable generatemanpage
|
||||
main-is: GenerateManpage.hs
|
||||
@ -124,3 +135,6 @@ test-suite properties
|
||||
Utils
|
||||
hs-source-dirs: tests
|
||||
build-depends: base, QuickCheck >= 2, X11, containers, xmonad
|
||||
|
||||
if flag(pedantic)
|
||||
ghc-options: -Werror
|
||||
|
Loading…
x
Reference in New Issue
Block a user