Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Haskell mass formatted with fourmolu
dbe4bbfa76ffcb567ff58a77a639814d567cdc5f
24 changes: 24 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,30 @@ jobs:
- name: Build and test
run: ./scripts/test --stack-yaml ${{ matrix.stack-yaml }}

formatting-check:
name: Formatting Check
if: >-
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-24.04
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v6

# Nothing is compiled here, so there is no stack-root worth caching. The
# setup is still needed to establish the docker environment the scripts
# run in.
- name: Setup Stack (for docker env)
uses: flipstone/github-actions/setup-dockerized-stack@2c1f2781f8a1b92a0ad82223adf77bbf24b262c2
with:
stack-root: ./stack-root

- name: Format and Check for Diff
run: ./scripts/format-repo

cabal-check:
name: Cabal Check
if: >-
Expand Down
1 change: 1 addition & 0 deletions example/Setup.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import Distribution.Simple

main = defaultMain
14 changes: 7 additions & 7 deletions example/app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module Main (main) where

import Network.FTP.Client
import qualified Network.FTP.Client.Conduit as FC
import Conduit
import qualified Data.ByteString.Char8 as C
import Network.FTP.Client
import qualified Network.FTP.Client.Conduit as FC

main :: IO ()
main = withFTPS "hostname.com" 21 $ \h _welcome -> do
_ <- login h "username" "password"
runConduitRes
$ FC.mlsd h "."
.| mapC (C.pack . (<> "\n") . show)
.| stdoutC
_ <- login h "username" "password"
runConduitRes $
FC.mlsd h "."
.| mapC (C.pack . (<> "\n") . show)
.| stdoutC
14 changes: 14 additions & 0 deletions fourmolu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
indentation: 2
function-arrows: trailing
comma-style: leading # default
import-export-style: leading
indent-wheres: false # default
record-brace-space: true
newlines-between-decls: 1 # default
haddock-style: multi-line # default
haddock-style-module: # default
let-style: newline
in-style: left-align
unicode: never # default
respectful: true # default
single-constraint-parens: never
9 changes: 9 additions & 0 deletions ftp-client-conduit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog for ftp-client-conduit

## 0.5.0.8

* Enable the `henforcer` plugin and `fourmolu` under the `ci` flag. Imports are
now qualified per the house style and the source is fourmolu formatted;
neither changes the API.

* Correct the Haddock module header, which named `Network.FTP.Client` rather
than `Network.FTP.Client.Conduit`.

## 0.5.0.7

* Add the missing upper bounds on `bytestring`, `conduit` and `exceptions`.
Expand Down
1 change: 1 addition & 0 deletions ftp-client-conduit/Setup.hs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import Distribution.Simple

main = defaultMain
6 changes: 5 additions & 1 deletion ftp-client-conduit/ftp-client-conduit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: ftp-client-conduit
version: 0.5.0.7
version: 0.5.0.8
synopsis: Transfer file with FTP and FTPS with Conduit
description: ftp-client is a library for communicating with an FTP server. It works over both a clear channel or TLS. ftp-client-conduit uses conduit to stream files and data in constant space.
category: Web
Expand Down Expand Up @@ -63,6 +63,10 @@ library
ghc-options: -Wincomplete-export-warnings -Wmissing-poly-kind-signatures -Wterm-variable-capture
if impl (ghc >= 9.10)
ghc-options: -Wdefaulted-exception-context
if impl (ghc >= 9.6)
ghc-options: -fplugin Henforcer
build-depends:
henforcer

test-suite ftp-conduit-test
type: exitcode-stdio-1.0
Expand Down
10 changes: 10 additions & 0 deletions ftp-client-conduit/henforcer.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[forAnyModule]
allowedOpenUnaliasedImports = 1
moduleHeaderCopyrightMustExistNonEmpty = true
moduleHeaderDescriptionMustExistNonEmpty = false
moduleHeaderLicenseMustExistNonEmpty = true
moduleHeaderMaintainerMustExistNonEmpty = false
[[forPatternModules]]
pattern = "Paths_*"
[forPatternModules.rulesToIgnore]
all = true
7 changes: 6 additions & 1 deletion ftp-client-conduit/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ftp-client-conduit
version: 0.5.0.7
version: 0.5.0.8
synopsis: Transfer file with FTP and FTPS with Conduit
description: ftp-client is a library for communicating with an FTP server. It works over both a clear channel or TLS. ftp-client-conduit uses conduit to stream files and data in constant space.
homepage: https://github.com/flipstone/ftp-client
Expand Down Expand Up @@ -82,6 +82,11 @@ library:
- condition: impl (ghc >= 9.10)
ghc-options:
- -Wdefaulted-exception-context
- condition: impl (ghc >= 9.6)
dependencies:
- henforcer
ghc-options:
- -fplugin Henforcer
Comment on lines +87 to +89

tests:
ftp-conduit-test:
Expand Down
Loading
Loading