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

Bugfix in IndentationRule (#343) #350

Merged
merged 13 commits into from
Oct 6, 2020
Merged

Bugfix in IndentationRule (#343) #350

merged 13 commits into from
Oct 6, 2020

Conversation

petertrr
Copy link
Member

@petertrr petertrr commented Oct 2, 2020

This pull request closes #343

What's done:

Created #349 for other discovered issues

FIXME:

  • add extendedIndentBeforeDot to README
  • Case with 3 from new test
  • Indentation when if has braces and else doesn't

### What's done:
* Minor fixes
### What's done:
* Changed logic
* Added tests
### What's done:
* Added extendedIndentBeforeDot
* Added handling of increasing tokens on the same line
### What's done:
* Fixing logic of conditionals and loops without braces
* Tests
* Code style
### What's done:
* Code style
@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #350 into master will increase coverage by 0.10%.
The diff coverage is 83.87%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #350      +/-   ##
============================================
+ Coverage     82.80%   82.91%   +0.10%     
- Complexity     1219     1224       +5     
============================================
  Files            60       60              
  Lines          3001     3026      +25     
  Branches        954      967      +13     
============================================
+ Hits           2485     2509      +24     
+ Misses          171      170       -1     
- Partials        345      347       +2     
Flag Coverage Δ Complexity Δ
#unittests 82.91% <83.87%> (+0.10%) 1224.00 <14.00> (+5.00)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...ktat/ruleset/rules/ClassLikeStructuresOrderRule.kt 83.33% <ø> (ø) 40.00 <0.00> (ø)
...diktat/ruleset/rules/comments/HeaderCommentRule.kt 88.75% <0.00%> (ø) 36.00 <0.00> (ø)
...in/org/cqfn/diktat/ruleset/rules/files/FileSize.kt 66.66% <0.00%> (ø) 8.00 <0.00> (ø)
...tlin/org/cqfn/diktat/ruleset/utils/ASTConstants.kt 100.00% <ø> (ø) 0.00 <0.00> (ø)
.../cqfn/diktat/ruleset/utils/indentation/Checkers.kt 76.00% <78.57%> (+4.57%) 0.00 <0.00> (ø)
...cqfn/diktat/ruleset/rules/files/IndentationRule.kt 86.31% <86.48%> (-3.30%) 24.00 <11.00> (+1.00) ⬇️
.../cqfn/diktat/ruleset/rules/BlockStructureBraces.kt 82.65% <100.00%> (ø) 53.00 <2.00> (ø)
...cqfn/diktat/ruleset/rules/ConsecutiveSpacesRule.kt 92.00% <100.00%> (ø) 15.00 <0.00> (ø)
...eset/utils/indentation/CustomIndentationChecker.kt 100.00% <100.00%> (ø) 1.00 <0.00> (ø)
...tat/ruleset/utils/indentation/IndentationConfig.kt 85.71% <100.00%> (+35.71%) 12.00 <1.00> (+4.00)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db3e907...5484d7c. Read the comment docs.

@petertrr petertrr marked this pull request as ready for review October 6, 2020 12:39
### What's done:
* Fixes
Copy link
Collaborator

@kentr0w kentr0w left a comment

Choose a reason for hiding this comment

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

LGTM

@petertrr petertrr merged commit 36c4ca4 into master Oct 6, 2020
@petertrr petertrr deleted the bugfix/indentation#343 branch October 6, 2020 15:54
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.

Indentation rule doesn't increase indentation inside lambda passed as argument in arguments list
2 participants