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

New Rule: UnnecessaryNotNullOperator #2578

Merged
merged 3 commits into from
Apr 4, 2020

Conversation

cortinico
Copy link
Member

As suggested in #2572, I'm adding a rule to detect unnecessary usages of the not-null (!!) operator.

@cortinico cortinico changed the title New rule: UnnecessaryNotNullOperator New Rule: UnnecessaryNotNullOperator Apr 4, 2020
@codecov-io
Copy link

codecov-io commented Apr 4, 2020

Codecov Report

Merging #2578 into master will increase coverage by 0.04%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2578      +/-   ##
============================================
+ Coverage     25.17%   25.21%   +0.04%     
- Complexity      393      394       +1     
============================================
  Files           378      379       +1     
  Lines          7399     7411      +12     
  Branches       1222     1224       +2     
============================================
+ Hits           1863     1869       +6     
- Misses         5405     5411       +6     
  Partials        131      131              
Impacted Files Coverage Δ Complexity Δ
...ch/detekt/rules/bugs/UnnecessaryNotNullOperator.kt 45.45% <45.45%> (ø) 1.00 <1.00> (?)
...sch/detekt/rules/providers/PotentialBugProvider.kt 100.00% <100.00%> (ø) 2.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 d07b4bb...a4d4fd0. Read the comment docs.

@cortinico cortinico force-pushed the unnecessary-not-null branch from 514cfb9 to 31f8bce Compare April 4, 2020 15:13
@cortinico
Copy link
Member Author

My bad I forgot to rebuild the docs

@schalkms schalkms merged commit 15ce830 into detekt:master Apr 4, 2020
@cortinico cortinico deleted the unnecessary-not-null branch April 4, 2020 17:10
@arturbosch arturbosch added this to the 1.8.0 milestone Apr 6, 2020
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.

4 participants