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 warning: Unused imports should be removed #717

Merged
merged 9 commits into from
Jan 27, 2021

Conversation

Cheshiriks
Copy link
Member

What's done:

  • Added new warning
  • Added new test

Which rule and warnings did you add?

  • UNUSED_IMPORT

This pull request closes #710

Actions checklist

  • Implemented Rule, added Warnings
  • Added tests on checks
  • Added tests on fixers
  • Updated diktat-analysis.yml
  • Updated available-rules.md

@Cheshiriks Cheshiriks force-pushed the feature/unused-imports branch 6 times, most recently from 59341d8 to fe43fef Compare January 21, 2021 07:53
@codecov
Copy link

codecov bot commented Jan 21, 2021

Codecov Report

Merging #717 (33cb3e7) into master (5dd1394) will decrease coverage by 0.04%.
The diff coverage is 73.52%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #717      +/-   ##
============================================
- Coverage     80.00%   79.96%   -0.05%     
- Complexity     1947     1958      +11     
============================================
  Files            93       93              
  Lines          5007     5040      +33     
  Branches       1606     1618      +12     
============================================
+ Hits           4006     4030      +24     
  Misses          245      245              
- Partials        756      765       +9     
Flag Coverage Δ Complexity Δ
unittests 79.96% <73.52%> (-0.05%) 0.00 <11.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...lin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt 78.94% <ø> (ø) 0.00 <0.00> (ø)
.../kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt 80.00% <ø> (ø) 0.00 <0.00> (ø)
...at-rules/src/main/kotlin/generated/WarningNames.kt 0.00% <ø> (ø) 0.00 <0.00> (ø)
...leset/rules/chapter2/comments/HeaderCommentRule.kt 82.79% <ø> (ø) 42.00 <0.00> (ø)
...tat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt 78.34% <ø> (ø) 141.00 <0.00> (ø)
.../cqfn/diktat/ruleset/utils/FunctionAstNodeUtils.kt 66.66% <ø> (ø) 0.00 <0.00> (ø)
.../kotlin/org/cqfn/diktat/ruleset/utils/KdocUtils.kt 15.78% <ø> (ø) 0.00 <0.00> (ø)
.../ruleset/rules/chapter3/files/FileStructureRule.kt 78.66% <67.85%> (-2.64%) 74.00 <11.00> (+11.00) ⬇️
...tlin/org/cqfn/diktat/ruleset/constants/Warnings.kt 97.77% <100.00%> (+0.01%) 12.00 <0.00> (ø)
...tlin/org/cqfn/diktat/ruleset/utils/AstConstants.kt 100.00% <100.00%> (ø) 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 5dd1394...33cb3e7. Read the comment docs.

@Cheshiriks Cheshiriks force-pushed the feature/unused-imports branch 4 times, most recently from 2be5313 to 7ddf1b0 Compare January 21, 2021 12:19
@Cheshiriks Cheshiriks force-pushed the feature/unused-imports branch 2 times, most recently from 53e0d58 to aea803a Compare January 26, 2021 13:14
@Cheshiriks Cheshiriks force-pushed the feature/unused-imports branch 2 times, most recently from d99c779 to dd9d0ea Compare January 26, 2021 14:52
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, fix one comment and you can merge (don't forget to squash and merge)

@Cheshiriks Cheshiriks force-pushed the feature/unused-imports branch 3 times, most recently from 26ab53c to 3ac8856 Compare January 27, 2021 11:07
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
### What's done:
* Added new warning
* Added new test
@Cheshiriks Cheshiriks force-pushed the feature/unused-imports branch from 3ac8856 to 33cb3e7 Compare January 27, 2021 12:28
@Cheshiriks Cheshiriks merged commit de93c7d into master Jan 27, 2021
@Cheshiriks Cheshiriks self-assigned this Jan 27, 2021
@petertrr petertrr deleted the feature/unused-imports branch January 27, 2021 12:56
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.

Check unused imports
2 participants