@@ -306,32 +306,37 @@ jobs:
306306 CABAL_PROJECT=cabal.project
307307 ignore_error : false
308308
309- # - name: ci
310- # runner: ubuntu-latest
311- # command: hlint
312- # # WARNING! cannot use # comments inside pack_options.
313- # pack_options: >-
314- # HLINT_VERSION=3.6.1
315- # HLINT_OPTIONS="lint"
316- # HLINT_TARGETS="src"
317- # ignore_error: false
309+ # The name is part of the cache key, packcheck uses a cached
310+ # hlint binary of any version. Change the name along with
311+ # HLINT_VERSION. The trailing spaces check runs in this job.
312+ - name : hlint-3.10
313+ runner : ubuntu-latest
314+ command : hlint
315+ # WARNING! cannot use # comments inside pack_options.
316+ pack_options : >-
317+ HLINT_VERSION=3.10
318+ HLINT_OPTIONS="lint"
319+ HLINT_TARGETS="core/src src"
320+ ignore_error : false
318321
319- # NOTE: need to expose other-modules in cabal to doctest those
320- # - name: docspec
321- # runner: ubuntu-latest
322- # command: cabal
323- # ghc_version: 9.12.4
324- # # WARNING! cannot use # comments inside pack_options.
325- # pack_options: >-
326- # DISABLE_SDIST_BUILD="y"
327- # DISABLE_TEST="y"
328- # DISABLE_BENCH="y"
329- # DISABLE_DOCS="y"
330- # ENABLE_DOCSPEC="y"
331- # DOCSPEC_URL=https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20250606/cabal-docspec-0.0.0.20250606-x86_64-linux.xz
332- # DOCSPEC_OPTIONS="--timeout 60 --check-properties --property-variables xs"
333- # CABAL_PROJECT="cabal.project.doctest"
334- # ignore_error: false
322+ # other-modules are changed to exposed-modules before the build
323+ # so that docspec checks them too.
324+ - name : docspec
325+ runner : ubuntu-latest
326+ command : cabal
327+ ghc_version : 9.14.1
328+ # WARNING! cannot use # comments inside pack_options.
329+ pack_options : >-
330+ DISABLE_SDIST_BUILD="y"
331+ DISABLE_TEST="y"
332+ DISABLE_BENCH="y"
333+ DISABLE_DOCS="y"
334+ DISABLE_DIST_CHECKS="y"
335+ ENABLE_DOCSPEC="y"
336+ DOCSPEC_URL=https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20250606/cabal-docspec-0.0.0.20250606-x86_64-linux.xz
337+ DOCSPEC_OPTIONS="--timeout 60 --check-properties --property-variables xs"
338+ CABAL_PROJECT="cabal.project.doctest"
339+ ignore_error : false
335340
336341 # - name: 8.10.7-coverage
337342 # ghc_version: 8.10.7
@@ -368,6 +373,20 @@ jobs:
368373
369374 - uses : actions/checkout@v4
370375
376+ - name : Check trailing spaces
377+ if : matrix.command == 'hlint'
378+ run : |
379+ if git grep -n ' $' -- '*.hs'; then
380+ echo "Trailing spaces found in the files above."
381+ exit 1
382+ fi
383+
384+ - name : Expose other-modules for docspec
385+ if : matrix.name == 'docspec'
386+ run : |
387+ sed -i 's/other-modules:/exposed-modules:/g' streamly.cabal
388+ sed -i 's/other-modules:/exposed-modules:/g' core/streamly-core.cabal
389+
371390 # The macOS image may ship Command Line Tools newer than the default
372391 # Xcode (e.g. CLT 27.0 with Xcode 26.6). Linking against the CLT SDK then
373392 # fails with "tapi error: malformed file ... unknown architecture
0 commit comments