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]}