diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml index d89deb3..ac26821 100644 --- a/.github/workflows/cabal.yml +++ b/.github/workflows/cabal.yml @@ -28,11 +28,6 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - uses: rwe/actions-hlint-setup@v1 - name: Set up HLint - with: - version: "3.3.6" - - uses: actions/cache@v2 name: cache ~/.cabal/store with: @@ -46,9 +41,3 @@ jobs: - name: test golden run: cabal test test:golden --test-show-details=direct --test-option="--color=always" - - - uses: rwe/actions-hlint-run@v2 - name: hlint - with: - path: '["library", "exe", "test-suite-golden/src"]' - fail-on: suggestion \ No newline at end of file diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml new file mode 100644 index 0000000..6aaf283 --- /dev/null +++ b/.github/workflows/hlint.yml @@ -0,0 +1,30 @@ +name: hlint + +on: + push: + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +jobs: + build: + name: hlint-3.8 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: haskell-actions/hlint-setup@v2 + name: Set up HLint + with: + version: "3.8" + + - uses: haskell-actions/hlint-run@v2 + name: hlint + with: + path: '["library/", "exe/", "test-suite-golden/src"]' + fail-on: suggestion diff --git a/.hlint.yaml b/.hlint.yaml new file mode 100644 index 0000000..e69de29 diff --git a/test-suite-hlint/HLint.hs b/test-suite-hlint/HLint.hs deleted file mode 100644 index ddccfc5..0000000 --- a/test-suite-hlint/HLint.hs +++ /dev/null @@ -1,21 +0,0 @@ -module Main (main) where - -import Language.Haskell.HLint (hlint) -import System.Exit (exitFailure, exitSuccess) - -arguments :: [String] -arguments = - [ "library" - , "exe" - , "test-suite-hlint" - , "test-suite-golden" - -- WARNING: HLint turns off QuasiQuotes even if turned on in - -- default-extensions in the cabal file, #55. - -- SEE: https://github.com/ndmitchell/hlint/issues/223 - , "-XQuasiQuotes" - ] - -main :: IO () -main = do - hints <- hlint arguments - if null hints then exitSuccess else exitFailure