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. NPE in indentation rule(#555) #596

Merged
merged 6 commits into from
Dec 3, 2020

Conversation

aktsay6
Copy link
Collaborator

@aktsay6 aktsay6 commented Dec 1, 2020

This PR fixes NPE in Indentation Rule

This pull request closes #555

@aktsay6 aktsay6 added the bug Something isn't working label Dec 1, 2020
@aktsay6
Copy link
Collaborator Author

aktsay6 commented Dec 1, 2020

Guess fix for apply in this case is not right. See Example4Expected.kt. Should we open an issue on it? @petertrr

@codecov
Copy link

codecov bot commented Dec 1, 2020

Codecov Report

Merging #596 (7c47535) into master (67ffa9c) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #596      +/-   ##
============================================
- Coverage     81.33%   81.26%   -0.07%     
- Complexity     1720     1722       +2     
============================================
  Files            87       87              
  Lines          4548     4548              
  Branches       1359     1361       +2     
============================================
- Hits           3699     3696       -3     
  Misses          306      306              
- Partials        543      546       +3     
Flag Coverage Δ Complexity Δ
unittests 81.26% <0.00%> (-0.07%) 0.00 <0.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
.../cqfn/diktat/ruleset/utils/indentation/Checkers.kt 75.72% <0.00%> (-2.92%) 0.00 <0.00> (ø)

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 67ffa9c...7c47535. Read the comment docs.

### What's done:
  * Added this case to CompactInitialization fix tests
# Conflicts:
#	diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example4Expected.kt
#	diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example4Test.kt
Copy link
Member

@petertrr petertrr left a comment

Choose a reason for hiding this comment

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

lgtm

@aktsay6 aktsay6 merged commit 592031c into master Dec 3, 2020
@aktsay6 aktsay6 deleted the bugfix/npe-indentation-rule(#555) branch December 3, 2020 14:34
@@ -9,4 +9,12 @@ httpClient.doRequest()

fun setDefaultUrl(httpClient: HttpClient) {
httpClient.url = "http://example.com"
}

fun foo() {
Copy link
Member

Choose a reason for hiding this comment

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

I would add check tests too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in IndentationRule (during autofix)
3 participants