Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
code.js

README.md

Complexity Calculation

This Program is a copy of my private github repo hence lacks other files.

It can be used to do the following:

  1. Do a simple calculations

    • String Usage: How many string literals are used in file.
    • ParameterCount: The number of parameters for function.
    • PackageComplexity: The number of imports used in file.
    • Returns: The number of return statements in function.
    • AllConditions: The total number of conditions in file.
  2. Using multiple visitors

    • SimpleCyclomaticComplexity: The number of if statements/loops + 1.
    • MaxMessageChains: The max length of a message chain in a function. A message chain can be formed from a method call (), a data access (.), or array access [0].
    • MaxConditions: The max number of conditions inside one if statement per function.
    • MaxNestingDepth: The max depth of scopes (nested ifs, loops, etc) per function.
You can’t perform that action at this time.