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

Remove redundant guard clauses #2919

Merged
merged 1 commit into from
Aug 1, 2020
Merged

Remove redundant guard clauses #2919

merged 1 commit into from
Aug 1, 2020

Conversation

veyndan
Copy link
Contributor

@veyndan veyndan commented Aug 1, 2020

The subsequent guard clauses validate the expression in the same way:

val resolvedCall = expression.getResolvedCall(bindingContext) ?: return
if (uselessFqNames.contains(resolvedCall.resultingDescriptor.fqNameOrNull()))

@codecov
Copy link

codecov bot commented Aug 1, 2020

Codecov Report

Merging #2919 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2919   +/-   ##
=========================================
  Coverage     80.23%   80.23%           
+ Complexity     2449     2446    -3     
=========================================
  Files           421      421           
  Lines          7406     7402    -4     
  Branches       1355     1352    -3     
=========================================
- Hits           5942     5939    -3     
  Misses          764      764           
+ Partials        700      699    -1     
Impacted Files Coverage Δ Complexity Δ
...urbosch/detekt/rules/style/UselessCallOnNotNull.kt 80.95% <ø> (+0.95%) 5.00 <0.00> (-3.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 9e14c7b...f686c8f. Read the comment docs.

@schalkms schalkms merged commit 43ac74a into detekt:master Aug 1, 2020
@veyndan veyndan deleted the housekeeping/UselessCallOnNotNull-redudnant-guard-clauses branch August 1, 2020 17:37
@arturbosch arturbosch added this to the 1.10.1 milestone Aug 1, 2020
@arturbosch arturbosch added the housekeeping Marker for housekeeping tasks and refactorings label Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Marker for housekeeping tasks and refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants