From 888563664ec314faa4bd288ea4851c99a4d1d644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9cate=20Kleidukos?= Date: Tue, 4 Feb 2025 13:23:26 +0100 Subject: [PATCH] Use cabal-gild --- Makefile | 2 +- one-time-password.cabal | 143 +++++++++++++++++++++------------------- 2 files changed, 77 insertions(+), 68 deletions(-) diff --git a/Makefile b/Makefile index 84570d0..83c39eb 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ lint: ## Run the code linter (HLint) @find src test -name "*.hs" | xargs -P $(PROCS) -I {} hlint --refactor-options="-i" --refactor {} style: ## Run the code formatter (fourmolu, cabal-fmt) - @cabal-fmt -i one-time-password.cabal + @cabal-gild --io one-time-password.cabal @fourmolu -q --mode inplace test src help: ## Display this help message diff --git a/one-time-password.cabal b/one-time-password.cabal index 17eda70..01f3270 100644 --- a/one-time-password.cabal +++ b/one-time-password.cabal @@ -1,71 +1,80 @@ -cabal-version: 3.4 -name: one-time-password -version: 3.0.0.0 -synopsis: HMAC-Based and Time-Based One-Time Passwords +cabal-version: 3.4 +name: one-time-password +version: 3.0.0.0 +synopsis: HMAC-Based and Time-Based One-Time Passwords description: Implements HMAC-Based One-Time Password Algorithm as defined in RFC 4226 and Time-Based One-Time Password Algorithm as defined in RFC 6238. -license: MIT -license-file: LICENSE -copyright: (c) 2023 The Haskell Cryptography Group -author: Hécate Moonlight -maintainer: The Haskell Cryptography Group contributors -homepage: https://github.com/haskell-cryptography/one-time-password +license: MIT +license-file: LICENSE +copyright: (c) 2023 The Haskell Cryptography Group +author: Hécate Moonlight +maintainer: The Haskell Cryptography Group contributors +homepage: https://github.com/haskell-cryptography/one-time-password bug-reports: https://github.com/haskell-cryptography/one-time-password/issues -category: Cryptography -build-type: Simple +category: Cryptography +build-type: Simple extra-source-files: README.md -extra-doc-files: CHANGELOG.md -tested-with: GHC ==9.4.8 || ==9.6.4 || ==9.8.2 +extra-doc-files: CHANGELOG.md +tested-with: ghc ==9.4.8 || ==9.6.4 || ==9.8.2 source-repository head - type: git + type: git location: git://github.com/haskell-cryptography/one-time-password.git common ghc-options ghc-options: - -Wall -Wcompat -Widentities -Wincomplete-record-updates - -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints - -fhide-source-paths -Wno-unused-do-bind -fshow-hole-constraints - -Wno-unticked-promoted-constructors -Werror=unused-imports - -fdicts-strict -fmax-worker-args=16 -fspec-constr-recursive=16 + -Wall + -Wcompat + -Widentities + -Wincomplete-record-updates + -Wincomplete-uni-patterns + -Wpartial-fields + -Wredundant-constraints + -fhide-source-paths + -Wno-unused-do-bind + -fshow-hole-constraints + -Wno-unticked-promoted-constructors + -Werror=unused-imports + -fdicts-strict + -fmax-worker-args=16 + -fspec-constr-recursive=16 -Wunused-packages default-language: GHC2021 library - import: ghc-options - hs-source-dirs: src - - -- cabal-fmt: expand src/ + import: ghc-options + hs-source-dirs: src + -- cabal-gild: discover src exposed-modules: OTP.Commons OTP.HOTP OTP.TOTP build-depends: - , base >=4.17 && <5 - , bytestring ^>=0.12 - , cereal ^>=0.5 - , chronos ^>=1.1.6 - , cryptohash-sha1 ^>=0.11 - , network-uri ^>=2.6 - , sel ^>=0.0.2 - , text >=2.0 - , text-display ^>=0.0 + base >=4.17 && <5, + bytestring ^>=0.12, + cereal ^>=0.5, + chronos ^>=1.1.6, + cryptohash-sha1 ^>=0.11, + network-uri ^>=2.6, + sel ^>=0.0.2, + text >=2.0, + text-display ^>=1.0, - ghc-options: -Wall + ghc-options: -Wall test-suite tests - import: ghc-options - type: exitcode-stdio-1.0 - hs-source-dirs: test + import: ghc-options + type: exitcode-stdio-1.0 + hs-source-dirs: test default-extensions: OverloadedStrings - main-is: Test.hs + main-is: Test.hs other-modules: Test.Comparison Test.HOTP @@ -74,25 +83,25 @@ test-suite tests Test.Utils build-depends: - , base >=4.17 && <5 - , base16 - , base32 ^>=0.4 - , bytestring - , chronos - , cryptonite - , one-time-password - , sel - , tasty - , tasty-hunit - , tasty-quickcheck - , text - , text-display - , torsor + base >=4.17 && <5, + base16, + base32 ^>=0.4, + bytestring, + chronos, + cryptonite, + one-time-password, + sel, + tasty, + tasty-hunit, + tasty-quickcheck, + text, + text-display, + torsor, executable one-time-password - import: ghc-options - main-is: Main.hs - hs-source-dirs: app + import: ghc-options + main-is: Main.hs + hs-source-dirs: app default-extensions: DataKinds DefaultSignatures @@ -116,16 +125,16 @@ executable one-time-password TypeOperators build-depends: - , base >=4.17 && <5 - , bytestring - , chronos - , one-time-password - , optparse-applicative >=0.15 && <0.19 - , sel - , text - , text-display - , torsor ^>=0.1 + base >=4.17 && <5, + bytestring, + chronos, + one-time-password, + optparse-applicative >=0.15 && <0.19, + sel >=0.0.3, + text, + text-display, + torsor ^>=0.1, - other-modules: Paths_one_time_password - autogen-modules: Paths_one_time_password - ghc-options: -Wall + other-modules: Paths_one_time_password + autogen-modules: Paths_one_time_password + ghc-options: -Wall