From e9da6f635ed9f3279c752f865d64ae763feb26ed Mon Sep 17 00:00:00 2001 From: sdiehl Date: Sat, 4 Jan 2020 18:48:01 +0000 Subject: [PATCH] Add HLint action. --- .github/workflows/hlint.yml | 31 +++++++++++++++++++++++++++++++ .hlint.yaml | 9 +++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/hlint.yml create mode 100644 .hlint.yaml diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml new file mode 100644 index 000000000..21540b5f4 --- /dev/null +++ b/.github/workflows/hlint.yml @@ -0,0 +1,31 @@ +name: HLint CI + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + name: hlint + runs-on: ubuntu-16.04 + strategy: + matrix: + ghc: ["8.8.1"] + cabal: ["3.0"] + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-haskell@v1 + name: Setup Haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install hlint + run: | + cabal new-install hlint + - name: Run hlint + run: | + hlint -g diff --git a/.hlint.yaml b/.hlint.yaml new file mode 100644 index 000000000..2f02039e3 --- /dev/null +++ b/.hlint.yaml @@ -0,0 +1,9 @@ +- ignore: {name: Avoid lambda} +- ignore: {name: Eta reduce} +- ignore: {name: Redundant lambda} +- ignore: {name: Collapse lambdas} +- ignore: {name: Use String} +- ignore: {name: Use putStr, within: Protolude.Show} +- ignore: {name: Use putStrLn, within: Protolude.Show} +# CPP preprocessor oddities +- ignore: {name: Unused LANGUAGE pragma, within: [Protolude.Base, Protolude.CallStack, Protolude.Conv, Protolude.Error]}