Installing

Simple as stack install argon or cabal install argon . Note: if you are using Stack and your resolver if too old, you might have to add some packages to your stack.yaml file.

GHC compatibility

Argon is compatible with GHC 7.8 and 7.10, it's tested against those versions only.

Running

The Argon executable expects a list of file paths (files or directories):

$ argon --no-color --min 2 src src/Argon/Types.hs 61:5 toJSON - 2 src/Argon/Visitor.hs 55:1 visitExp - 5 62:1 visitOp - 4 28:11 visit - 2 35:1 getFuncName - 2 src/Argon/Parser.hs 55:1 parseModuleWithCpp - 3 88:1 customLogAction - 3 35:1 analyze - 2 39:9 analysis - 2 src/Argon/Formatters.hs 61:1 formatResult - 3 42:1 coloredFunc - 2 43:11 color - 2 src/Argon/Results.hs 35:1 export - 3 28:1 filterResults - 2 src/Argon/Loc.hs 18:11 toRealSrcLoc - 2

For every file, Argon sorts results with the following criteria (and in this order):

complexity (descending) line number (ascending) alphabetically

When colors are enabled (default), Argon computes a rank associated with the complexity score:

| Complexity | Rank | |:----------:|:----:| | 0..5 | A | | 5..10 | B | | above 10 | C |

JSON

Results can also be exported to JSON: