Giter VIP home page Giter VIP logo

code-complexity-plugin's Introduction

Code Complexity plugin for IDEA

Build Version Downloads

This plugin calculates code complexity metric right in the editor and shows the complexity in the hint next to the method/class. It's based on the Cognitive Complexity metric proposed by G. Ann Campbell in Cognitive Complexity - A new way of measuring understandability.

Works with Java, Kotlin, and Python.


Example hints

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "code-complexity-plugin" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > โš™๏ธ > Install plugin from disk...

Score

I chose 8 points as a medium complexity method and use it as 100%. This means that all the methods above 100% are good candidates for splitting/improving. The formula is: percentage = points / 8 * 100

Release

  • Update version in gradle.properties
  • Update version and description in CHANGELOG.md
  • Run ./gradlew publishPlugin
  • Push to repo with the proper tag

Plugin based on the IntelliJ Platform Plugin Template.

code-complexity-plugin's People

Contributors

actions-user avatar hemeroc avatar mattogodoy avatar nikolaikopernik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.