Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jetbrains/resharper-cyclomatic-complexity
ReSharper plugin to measure cyclomatic complexity as you type
https://github.com/jetbrains/resharper-cyclomatic-complexity
cyclomatic-complexity jetbrains plugin resharper resharper-plugin
Last synced: about 1 month ago
JSON representation
ReSharper plugin to measure cyclomatic complexity as you type
- Host: GitHub
- URL: https://github.com/jetbrains/resharper-cyclomatic-complexity
- Owner: JetBrains
- License: apache-2.0
- Created: 2015-08-26T08:44:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-30T21:47:19.000Z (about 2 months ago)
- Last Synced: 2024-10-07T10:48:31.015Z (about 1 month ago)
- Topics: cyclomatic-complexity, jetbrains, plugin, resharper, resharper-plugin
- Language: C#
- Size: 6.85 MB
- Stars: 122
- Watchers: 25
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![official JetBrains project](http://jb.gg/badges/official-flat-square.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![Rider](https://img.shields.io/jetbrains/plugin/v/10395-cyclomatic-complexity.svg?label=rider%20&colorB=0A7BBB&style=flat-square&logo=%20data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADAAAAAsCAYAAAAjFjtnAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAAEEklEQVRoQ%2B2ZS0hUURjHLSoKominVIta1aLaFYhBES1t1bLFRCAREbQKaiHpqgeEpjDjRhIFHWwzIyo6oWXqwmfkW0evr9TxNT7GcZxX%2FzPzzZk53jsyc%2B91I%2FcHB4a5%2F%2B%2B79z%2Fn3O98RzOOBKFQ6BeGlOrw%2B%2F2S0%2Bn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ukCyCGoMIPcaGjYrK6NIEa33ycBb%2FRhtgClx4EEu0%2BWkoPo83B%2FHBo59QqzZbH4LE7UHjbq6ulpsjM9QJEwFBQWPlHoqAwMDAwMDAwODo0hJScnZoqKic3oOHPST%2Fs9Md1wulxMjrNfAuZYdbK5S%2BsNH6UCjBfZ3HJgwDKQMDLzGKNRrwECh2%2B0WjpUGimRk%2FAdgThdOY4UJ9QAAAABJRU5ErkJggg%3D%3D)](https://plugins.jetbrains.com/plugin/10395-cyclomatic-complexity)
[![ReSharper](https://img.shields.io/resharper/v/PowerToys.CyclomaticComplexity.svg?label=resharper%20&colorB=0A7BBB&style=flat-square&logo=%20data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADIAAAAxCAYAAACYq%2FofAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAAE%2BElEQVRoQ%2B2Ya0hkZRzG3d1oWehLLQS2QRC1tEWflhLqU0QgsbAb6ZesiL5KXxKE3GBa86uE0IdWiTJq8BLGMiqapnjDYfAy3jCv6XgfZC7explxnJ73zDPvnOM7M%2BtlslrOD%2F7InOc5%2F%2Ff8z3mvZplkgJKSkuzS0tIb8bBYLC9RMoDr1%2FW%2B4uLiG5RUDg8PFxCek4Tf7%2Fe4XK7W0dHRosbGxieZ6tg4nU7%2F3t5eNB67u7tBSpK8vLwr29vbXr1veno6Ci7QYgSCT6inJRQK7UxNTd3F23ucKR%2FGBbyMAG%2FXWFpaClCT2Gy2F4PBIB0x0FYbZRXoZyokzszMTFdtbe0Vpk1JTU3NawcHB7wrBn7XU5a0tLS8Q1kyNDRko6wCPSOFCCYnJ2uYNiXLy8tv0y4ZHx%2F%2FnrIEL6aIsmRlZeUzyirQM1YI3mxodXX1OaZOCvr517RLPB7PR5QlGH9WyhIM%2BDzKKtCVQtCHf8Cfi0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jQ9o0XC6XT%2B%2FBnixKSYJj9FVMGjt6Hwa2W%2BzRaEkPnvsmHjxHH7j2POW04Mu83tHRkXM0rFbrK7Ro9PT03NTr9fX1OZQk4v9ira2thjzY4r9M2cTExMTExMTExMTkEaSpqemB3W5fznTg2LrMJs6HgYEB5YSYKdjE%2BfDIFOJ0Ol1sN%2BOwifMB7T2Bc%2FrT%2F0SwCZOHk5X1N%2Fu%2FydjP06PFAAAAAElFTkSuQmCC)](https://resharper-plugins.jetbrains.com/packages/PowerToys.CyclomaticComplexity/)# Cyclomatic complexity plugin for ReSharper
This is a ReSharper plugin that measures [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) as you type. If the complexity of a method, function or property exceeds a configurable threshold, the method, function or property is marked with a warning highlight ("squiggly"). Supported languages are C#, VB, JavaScript, TypeScript and C++.
It can be installed by going to **ReSharper → Extensions Manager** and searching for "Cyclomatic Complexity".
Cyclomatic complexity is a metric intended to show the complexity of your code. It measures the number of paths through a code block - the more branches and conditional statements, the higher the metric. As the code gets more complex, the metric gets higher. A higher value is a good indicator that a method is getting too complex, and is becoming a maintainability risk, and should be refactored. You can read more about [cyclomatic complexity at wikipedia](https://en.wikipedia.org/wiki/Cyclomatic_complexity).
The complexity of a method, function or other code member is always available as a tooltip on the method name:
![Complexity displayed as an info tooltip](docs/info.png)
When the complexity reaches a configurable threshold, the tooltip is shown as a warning:
![Complexity exceeds the configurable threshold](docs/warning.png)
And the complexity threshold can be configured in the options, per language:
![Options](docs/options.png)