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

Fix false positive at EmptyIfBlock #2026

Merged
merged 1 commit into from
Oct 17, 2019
Merged

Fix false positive at EmptyIfBlock #2026

merged 1 commit into from
Oct 17, 2019

Conversation

BraisGabin
Copy link
Member

This code was detected as an EmptyIfBlock.

fun f() {
    var i = 0
    if (i == 0) i++;
}

And it's strange but correct. This PR fix it.

@codecov-io
Copy link

Codecov Report

Merging #2026 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2026      +/-   ##
============================================
- Coverage     80.68%   80.67%   -0.01%     
  Complexity     1985     1985              
============================================
  Files           329      329              
  Lines          5591     5590       -1     
  Branches       1021     1021              
============================================
- Hits           4511     4510       -1     
  Misses          539      539              
  Partials        541      541
Impacted Files Coverage Δ Complexity Δ
...tlab/arturbosch/detekt/rules/empty/EmptyIfBlock.kt 83.33% <100%> (-2.39%) 9 <0> (ø)

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 d99550d...8607087. Read the comment docs.

@3flex 3flex merged commit 07f2bbe into detekt:master Oct 17, 2019
@arturbosch arturbosch added this to the 1.2.0 milestone Oct 28, 2019
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
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.

5 participants