homplexity: Haskell code quality tool

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Homplexity aims to measure code complexity, warning about fragments that might have higher defect probability due to bad coding style on-the-large:


[Skip to Readme]

Properties

Versions 0.2, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.4.1.0, 0.4.2.0, 0.4.3.0, 0.4.3.1, 0.4.3.2, 0.4.3.3, 0.4.3.4, 0.4.4.0, 0.4.4.1, 0.4.4.2, 0.4.4.3, 0.4.4.4, 0.4.6.0, 0.4.7.0, 0.4.7.0, 0.4.8.0, 0.4.8.1
Change log changelog.md
Dependencies base (>=4.5 && <4.16), blaze-html (>=0.9 && <1), blaze-markup (>=0.8 && <0.9), bytestring, Cabal (>=2.2.0.0), 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), githash (>=0.1.2.0 && <1.0), haskell-src-exts (>=1.20 && <1.24), hflags (>=0.3 && <0.5), homplexity, template-haskell (>=2.6 && <2.18), uniplate (>=1.4 && <1.7) [details]
License BSD-3-Clause
Copyright Copyright by Michal J. Gajda and contributors '2015-'2020 https://gitlab.com/migamake/homplexity/-/graphs/master
Author Michal J. Gajda
Maintainer mjgajda@migamake.com
Category Language, Tools
Home page https://gitlab.com/migamake/homplexity
Bug tracker https://gitlab.com/migamake/homplexity/issues
Source repo head: git clone https://gitlab.com/migamake/homplexity.git
Uploaded by MichalGajda at 2020-03-03T14:19:14Z

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
static

Build static binary

Disabled
Automatic Flags
NameDescriptionDefault
html

Enable HTML output via blaze-html

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for homplexity-0.4.7.0

[back to package description]

homplexity

Aims to assess complexity and quality of Haskell code by measuring relative length of declarations, their depth, and code-to-comment ratio.

For parsing it uses haskell-src-exts, and cppHs.

Builds with Stack: CircleCI (all branches)

Shippable CI: Run Status

Cabal builds across GHC versions: Gitlab pipeline status

Hackage Hackage Dependencies

If you just need latest static executable it is always available here.

Official releases are on Hackage

Gitter

USAGE:

After installing with cabal install homplexity, you might run it with filenames or directories with your Haskell source

    homplexity Main.hs src/ 

Patches and suggestions are welcome.

You may run homplexity --help to see options.

For html output, run:

    homplexity --format=HTML Main.hs src/ 

How does it work?

Homplexity is based on the idea of Metrics that are applied to various CodeFragment types extracted automatically from parsed source. Each metric is then assessed whether it crosses any thresholds, and depending on them the severity of the message is chosen.

To see all metric values, set the warning --severity to INFO.

Diagram of concepts Legend of the diagram