packages feed

homplexity-0.4.6.0: homplexity.cabal

name:                homplexity
version:             0.4.6.0
synopsis:            Haskell code quality tool
description:         Homplexity aims to measure code complexity,
                     warning about fragments that might have higher defect probability
                     due to bad coding style on-the-large:
                     .
                       * too large functions
                     .
                       * too deeply nested conditions
                     .
                       * too few comments

homepage:            https://gitlab.com/migamake/homplexity
license:             BSD3
license-file:        LICENSE
author:              Michal J. Gajda
maintainer:          mjgajda@migamake.com
copyright:           Copyright by Michal J. Gajda and contributors '2015-'2020 https://gitlab.com/migamake/homplexity/-/graphs/master
category:            Language, Tools
build-type:          Simple
extra-source-files:  README.md changelog.md
cabal-version:       >=1.10
bug-reports:         https://gitlab.com/migamake/homplexity/issues
tested-with:         GHC==8.4.4
                   , GHC==8.6.5
                   , GHC==8.8.2

Flag Html
  Description: Enable HTML output via blaze-html
  Default:     True

source-repository head
  type:     git
  location: https://github.com/mgajda/homplexity.git

Library
  exposed-modules:
    Language.Haskell.Homplexity.Assessment
    Language.Haskell.Homplexity.CabalFiles
    Language.Haskell.Homplexity.CodeFragment
    Language.Haskell.Homplexity.Comments
    Language.Haskell.Homplexity.Cyclomatic
    Language.Haskell.Homplexity.Message
    Language.Haskell.Homplexity.Metric
    Language.Haskell.Homplexity.Parse
    Language.Haskell.Homplexity.SrcSlice
    Language.Haskell.Homplexity.RecordFieldsCount
    Language.Haskell.Homplexity.TypeClassComplexity
    Language.Haskell.Homplexity.TypeComplexity
    Language.Haskell.Homplexity.Utilities
  Hs-source-dirs:      lib
  Other-Modules:
    Paths_homplexity
  build-depends:       base             >=4.5  && <4.16,
                       bytestring,
                       containers       >=0.3  && <0.7,
                       cpphs            >=1.5  && <1.21,
                       deepseq          >=1.3  && <1.7,
                       directory        >=1.1  && <1.4,
                       filepath         >=1.2  && <1.5,
                       haskell-src-exts >=1.20 && <1.24,
                       hflags           >=0.3  && <0.5,
                       template-haskell >=2.6  && <2.18,
                       uniplate         >=1.4  && <1.7
  if impl(ghc>=8.8.1)
    build-depends:     Cabal            ==3.0.0.0
  else
    build-depends:     Cabal            >=2.2.0.0

  other-extensions:    BangPatterns,
                       DeriveDataTypeable,
                       FlexibleContexts,
                       FlexibleInstances,
                       GeneralizedNewtypeDeriving,
                       IncoherentInstances,
                       MultiParamTypeClasses,
                       OverlappingInstances,
                       RecordWildCards,
                       ScopedTypeVariables,
                       StandaloneDeriving,
                       TemplateHaskell,
                       TypeFamilies,
                       TypeSynonymInstances,
                       UndecidableInstances,
                       ViewPatterns
  default-language:    Haskell2010
  if flag(Html)
    CPP-Options:       -DHTML_OUTPUT
    build-depends:     blaze-html   >= 0.9 && < 1,
                       blaze-markup >= 0.8 && < 0.9

executable homplexity-cli
  main-is:             Homplexity.hs
  hs-source-dirs:      app/
  build-depends:       base             >=4.5  && <4.16,
                       homplexity,
                       containers       >=0.3  && <0.7,
                       cpphs            >=1.5  && <1.21,
                       deepseq          >=1.3  && <1.7
  Other-Modules:
    Paths_homplexity
  build-depends:       base             >=4.5  && <4.16,
                       directory        >=1.1  && <1.4,
                       filepath         >=1.2  && <1.5,
                       githash          >=0.1.2.0 && <1.0,
                       haskell-src-exts >=1.20 && <1.24,
                       hflags           >=0.3  && <0.5,
                       template-haskell >=2.6  && <2.18,
                       uniplate         >=1.4  && <1.7
  default-language:    Haskell2010
  Other-Modules:
    Paths_homplexity
  -- STATIC: ld-options: -static
  -- STATIC: ghc-options: -fPIC
  if flag(Html)
    CPP-Options:       -DHTML_OUTPUT
    build-depends:     blaze-html   >= 0.9  && < 1,
                       bytestring   >= 0.10 && < 0.11


test-suite homplexity-tests
  main-is:             Tests.hs
  hs-source-dirs:      tests
  other-modules:
    Test.Utils
    Test.Utilities
    Test.Metrics.TypeClassComplexitySpec
    Test.Parse.CommentsSpec
    Test.Parse.ExtensionsSpec
  type:                exitcode-stdio-1.0
  build-depends:       base             >=4.5  && <4.16,
                       homplexity,
                       filepath         >=1.2  && <1.5,
                       haskell-src-exts >=1.20 && <1.24,
                       template-haskell >=2.6  && <2.18
  if impl(ghc>=8.8.0)
    build-depends:     hspec            >=2.7.0
  else
    build-depends:     hspec            <2.6.0
  default-language:    Haskell2010
  ghc-options:         -Wall -threaded -rtsopts "-with-rtsopts=-N"