Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyclomatic complexity removed? #195

Closed
jmecosta opened this issue Dec 11, 2016 · 4 comments
Closed

cyclomatic complexity removed? #195

jmecosta opened this issue Dec 11, 2016 · 4 comments

Comments

@jmecosta
Copy link

hi @duckmatt

notice that the http://fsprojects.github.io/FSharpLint/CyclomaticComplexity.html has been removed from code. Is there a new replacement for it?

regards

jorge costa

@duckmatt
Copy link
Collaborator

Hi Jorge,

It was removed during a reworking of the core of the linter, didn't seem like it was being used by any one so didn't deem it worthy of porting it across. Did you find it useful to have?

@jmecosta
Copy link
Author

i was updating the F# sonar plugin and being complexity such a core metric in sonar its curious that no one is using it in F#. usually complexity gives good indication where we start refactoring and putting limits on it its good to keep the code simple to follow.

maybe it does not apply to F#?

@duckmatt
Copy link
Collaborator

it can apply to f# but is certainly less useful than when applied to imperative languages, a pattern match against each case of a DU of n cases increases the CC of the func by n, with this it's easy to get a lot of "false positives" where refactoring the code to reduce the CC would probably make it more complex and less idomatic

@jmecosta
Copy link
Author

OK @duckmatt, thanks for the explanation. I will follow this recommendation also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants