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 "package xmonad" >> cabal.project
|
||||||
echo " ghc-options: -Werror=missing-methods" >> cabal.project
|
echo " ghc-options: -Werror=missing-methods" >> cabal.project
|
||||||
cat >> cabal.project <<EOF
|
cat >> cabal.project <<EOF
|
||||||
|
package xmonad
|
||||||
|
flags: +pedantic
|
||||||
EOF
|
EOF
|
||||||
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(xmonad)$/; }' >> cabal.project.local
|
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(xmonad)$/; }' >> cabal.project.local
|
||||||
cat cabal.project
|
cat cabal.project
|
||||||
|
3
.github/workflows/stack.yml
vendored
3
.github/workflows/stack.yml
vendored
@ -65,4 +65,5 @@ jobs:
|
|||||||
set -ex
|
set -ex
|
||||||
stack test \
|
stack test \
|
||||||
--fast --no-terminal \
|
--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
|
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
|
type: git
|
||||||
location: https://github.com/xmonad/xmonad
|
location: https://github.com/xmonad/xmonad
|
||||||
|
|
||||||
|
flag pedantic
|
||||||
|
description: Be pedantic (-Werror and the like)
|
||||||
|
default: False
|
||||||
|
manual: True
|
||||||
|
|
||||||
flag generatemanpage
|
flag generatemanpage
|
||||||
default: False
|
default: False
|
||||||
manual: True
|
manual: True
|
||||||
@ -78,20 +83,26 @@ library
|
|||||||
, setlocale
|
, setlocale
|
||||||
, unix
|
, unix
|
||||||
, utf8-string >= 0.3 && < 1.1
|
, 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'
|
-- Keep this in sync with the oldest version in 'tested-with'
|
||||||
if impl(ghc <= 8.4.4)
|
if impl(ghc > 8.4.4)
|
||||||
ghc-options: -Werror=unused-imports
|
ghc-options: -Wno-unused-imports
|
||||||
|
|
||||||
|
if flag(pedantic)
|
||||||
|
ghc-options: -Werror
|
||||||
|
|
||||||
executable xmonad
|
executable xmonad
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
build-depends: base, X11, mtl, unix, xmonad
|
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'
|
-- Keep this in sync with the oldest version in 'tested-with'
|
||||||
if impl(ghc <= 8.4.4)
|
if impl(ghc > 8.4.4)
|
||||||
ghc-options: -Werror=unused-imports
|
ghc-options: -Wno-unused-imports
|
||||||
|
|
||||||
|
if flag(pedantic)
|
||||||
|
ghc-options: -Werror
|
||||||
|
|
||||||
executable generatemanpage
|
executable generatemanpage
|
||||||
main-is: GenerateManpage.hs
|
main-is: GenerateManpage.hs
|
||||||
@ -124,3 +135,6 @@ test-suite properties
|
|||||||
Utils
|
Utils
|
||||||
hs-source-dirs: tests
|
hs-source-dirs: tests
|
||||||
build-depends: base, QuickCheck >= 2, X11, containers, xmonad
|
build-depends: base, QuickCheck >= 2, X11, containers, xmonad
|
||||||
|
|
||||||
|
if flag(pedantic)
|
||||||
|
ghc-options: -Werror
|
||||||
|
Loading…
x
Reference in New Issue
Block a user