Skip to content

Cyclomatic Complexity #2

Description

@fukit0

Bu sonarqube denen tool class'lar için de bakıyor bu complexity'e 200'den büyükse bağırıyor. Ama her metot için 10'dan büyük olmamalı aslında. pluginlerde var bunu hesaplayan. elle saymak zorunda değiliz :D

"Is it better to have a method with a CC of 30, or three methods with a CC of 10 each ? If you have been in charge of source code maintenance for an application written by somebody else, you know the answer : when having three methods with a CC of 10 each, the chance is higher that the program is more maintainable, with a better separation of logic. As a consequence, you also decrease the risk to inject a bug. The CC value by method can be used to evaluate the quality of the source code."

  • SonarQube

http://www.leepoint.net/principles_and_practices/complexity/complexity-java-method.html
http://www.javaworld.com/article/2074995/dealing-cyclomatic-complexity-in-java-code.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions