diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index f947179..3854bde 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -13,7 +13,7 @@ jobs: - uses: haskell-actions/run-fourmolu@v10 with: - version: "0.14.1.0" + version: "0.16.2.0" pattern: | src/**/*.hs test/**/*.hs diff --git a/app/Main.hs b/app/Main.hs index 5306475..5762e3d 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -2,19 +2,19 @@ module Main (main) where import Chronos (Time (..), Timespan (..), datetimeToTime, decode_YmdHMS, now, second, w3c) import Data.ByteString (StrictByteString) -import qualified Data.ByteString.Char8 as BSC8 +import Data.ByteString.Char8 qualified as BSC8 import Data.Maybe (fromJust) import Data.Text (Text) import Data.Text.Display -import qualified Data.Text.Encoding as TE -import qualified Data.Text.IO as TIO +import Data.Text.Encoding qualified as TE +import Data.Text.IO qualified as TIO import Data.Version (showVersion) import Data.Word import Options.Applicative import Paths_one_time_password (version) import Sel (secureMain) -import qualified Sel.HMAC.SHA256 as SHA256 -import qualified Sel.HMAC.SHA512 as SHA512 +import Sel.HMAC.SHA256 qualified as SHA256 +import Sel.HMAC.SHA512 qualified as SHA512 import System.Exit (exitFailure) import Torsor (scale) diff --git a/fourmolu.yaml b/fourmolu.yaml index 39acb7d..23e8600 100644 --- a/fourmolu.yaml +++ b/fourmolu.yaml @@ -1,11 +1,53 @@ +# Number of spaces per indentation step indentation: 2 -comma-style: leading # for lists, tuples etc. - can also be 'leading' -import-export-style: leading -record-brace-space: false # rec {x = 1} vs. rec{x = 1} -indent-wheres: true # 'false' means save space by only half-indenting the 'where' keyword -respectful: true # don't be too opinionated about newlines etc. -haddock-style: single-line # '--' vs. '{-' -newlines-between-decls: 1 # number of newlines between top-level declarations -fixities: [] + +# Max line length for automatic line breaking +column-limit: none + +# Styling of arrows in type signatures (choices: trailing, leading, or leading-args) function-arrows: leading + +# How to place commas in multi-line lists, records, etc. (choices: leading or trailing) +comma-style: leading + +# Styling of import/export lists (choices: leading, trailing, or diff-friendly) +import-export-style: leading + +# Whether to full-indent or half-indent 'where' bindings past the preceding body +indent-wheres: true + +# Whether to leave a space before an opening record brace +record-brace-space: false + +# Number of spaces between top-level declarations +newlines-between-decls: 1 + +# How to print Haddock comments (choices: single-line, multi-line, or multi-line-compact) +haddock-style: single-line + +# How to print module docstring +haddock-style-module: null + +# Styling of let blocks (choices: auto, inline, newline, or mixed) +let-style: auto + +# How to align the 'in' keyword with respect to the 'let' keyword (choices: left-align, right-align, or no-space) +in-style: right-align + +# Whether to put parentheses around a single constraint (choices: auto, always, or never) single-constraint-parens: never + +# Whether to put parentheses around a single deriving class (choices: auto, always, or never) +single-deriving-parens: always + +# Output Unicode syntax (choices: detect, always, or never) +unicode: never + +# Give the programmer more choice on where to insert blank lines +respectful: true + +# Fixity information for operators +fixities: [] + +# Module reexports Fourmolu should know about +reexports: []