Skip to content

Fix violations #7

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

Merged
merged 1 commit into from
Dec 28, 2015
Merged

Fix violations #7

merged 1 commit into from
Dec 28, 2015

Conversation

S2dentik
Copy link
Contributor

Add ViolationData struct

This struct encapsulates some arguments passed to Violation thus reducing init arguments
and increasing readability.

Add TemperStatistics struct

This struct encapsulates statistics about Temper class to reduce complexity and instance variables over
the class.

Refactor Finder class

Add generic removeDuplicated() extension over array, make some functions
extensions over the class.

Remove violations in Scissors

Make methods ExtendedComponent doesn't depend upon extensions.
Refactor appendComponents(::) method.
Remove parent from list of parameters over ExtendedComponent and make it
nil by default.

Refactor NPath Complexity

Add extensions on ComponentType for a more self-explaining way of calculating
complexity over a component.

Remove some newlines to clear the corresponding warning

Refactor Temper

Reduce CyclomaticComplexity of checkPair(::) and updateStatistics(::) methods.

Refactor Caprice module

Add reduceTwoElements(::) function to iterate over the arguments intercepted by the module.
Refactor optionObjectFromOption(::) to work more generically and reduce complexity.

@codecov-io
Copy link

Current coverage is 93.18%

Merging #7 into master will increase coverage by +0.23% as of d8b1e76

@@            master      #7   diff @@
======================================
  Files           59      59       
  Stmts         1646    1614    -32
  Branches         0       0       
  Methods          0       0       
======================================
- Hit           1530    1504    -26
  Partial          0       0       
+ Missed         116     110     -6

Review entire Coverage Diff as of d8b1e76

Powered by Codecov. Updated on successful CI builds.

@@ -8,7 +8,7 @@


final class NPathComplexityRule : Rule {
let rule = "NPathComplexity"
var rule = "NPathComplexity"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you 'var' this?

@S2dentik S2dentik force-pushed the fixViolations branch 2 times, most recently from 9ddb00f to 9ece84e Compare December 28, 2015 14:20
Add ViolationData struct

This struct encapsulates some arguments passed to Violation thus reducing init arguments
and increasing readability.

Add TemperStatistics struct

This struct encapsulates statistics about Temper class to reduce complexity and instance variables over
the class.

Refactor Finder class

Add generic removeDuplicated() extension over array, make some functions
extensions over the class.

Remove violations in Scissors

Make methods ExtendedComponent doesn't depend upon extensions.
Refactor appendComponents(_:_:) method.
Remove parent from list of parameters over ExtendedComponent and make it
nil by default.

Refactor NPath Complexity

Add extensions on ComponentType for a more self-explaining way of calculating
complexity over a component.

Remove some newlines to clear the corresponding warning

Refactor Temper

Reduce CyclomaticComplexity of checkPair(_:_:) and updateStatistics(_:_:) methods.

Refactor Caprice module

Add reduceTwoElements(_:_:) function to iterate over the arguments intercepted by the module.
Refactor optionObjectFromOption(_:_:) to work more generically and reduce complexity.
@thelvis4
Copy link
Contributor

I'm going to merge it. Thanks!

thelvis4 added a commit that referenced this pull request Dec 28, 2015
@thelvis4 thelvis4 merged commit 182c560 into yopeso:master Dec 28, 2015
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

Successfully merging this pull request may close these issues.

3 participants