From 93172bfd21386be2022c669d6a9f5a8402aeb6cb Mon Sep 17 00:00:00 2001 From: Taylor Fausak Date: Sat, 6 Nov 2021 21:30:05 +0000 Subject: [PATCH] Add flag for turning warnings into errors --- .github/workflows/ci.yaml | 2 +- brittany.cabal | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc3cd3e..ce15348 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - run: cabal configure --enable-tests + - run: cabal configure --enable-tests --flags pedantic --jobs - run: cabal freeze - run: cat cabal.project.freeze - uses: actions/cache@v2 diff --git a/brittany.cabal b/brittany.cabal index d8574e4..79d5b8b 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -30,6 +30,11 @@ source-repository head type: git location: https://github.com/lspitzner/brittany.git +flag pedantic + default: False + description: Enables @-Werror@, which turns warnings into errors. + manual: True + common library build-depends: , aeson ^>= 2.0.1 @@ -75,6 +80,9 @@ common library -Wno-safe -Wno-unsafe + if flag(pedantic) + ghc-options: -Werror + common executable import: library