Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

cyclomatic-complexity: Convert to function #2533

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

andy-hanson
Copy link
Contributor

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Just a refactor.

const { options: { threshold } } = ctx;
let complexity = 0;

return ts.forEachChild(ctx.sourceFile, function cb(node: ts.Node): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated: I guess it's inteded to not check the complexity of the SourceFile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the way it worked before. Could be updated now, but it would be a breaking change.

@adidahiya adidahiya merged commit f194c9e into palantir:master Apr 12, 2017
@adidahiya adidahiya added this to the TSLint v5.2 milestone Apr 12, 2017
@andy-hanson andy-hanson deleted the cyclomatic-complexity branch April 13, 2017 00:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants