Skip to content

Refactor Gradle integration tests - #3489

Merged
picklebento merged 5 commits into
detekt:masterfrom
picklebento:agpintegrationtest
Feb 24, 2021
Merged

picklebento merged 5 commits into
detekt:masterfrom
picklebento:agpintegrationtest

Conversation

@picklebento

Copy link
Copy Markdown
Member

This PR serves two purposes:

Note

While this mostly maintains the test coverage, I did reduce the following test cases:

  • Test for com.android.test is removed. Since there are many other plugin's like com.android.dynamic-feature, com.android.lint and com.android.reporting, it is not necessary to test all different android plugins. As long as the base plugin com.android.build.gradle.api.AndroidBasePlugin is applied, we do not need to worry too much about other subplugins.
  • Removed one flavor dimension sally from name. This does not provide too much value in my opinion while contributes significantly the lines of code in tests.

@codecov

codecov Bot commented Feb 21, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #3489 (7d020ab) into master (8350ce2) will decrease coverage by 0.78%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3489      +/-   ##
============================================
- Coverage     80.52%   79.74%   -0.79%     
+ Complexity     2888     2864      -24     
============================================
  Files           459      459              
  Lines          8643     8643              
  Branches       1674     1674              
============================================
- Hits           6960     6892      -68     
- Misses          763      841      +78     
+ Partials        920      910      -10     
Impacted Files Coverage Δ Complexity Δ
...gitlab/arturbosch/detekt/internal/DetektAndroid.kt 0.00% <0.00%> (-71.88%) 0.00% <0.00%> (-12.00%)
.../io/gitlab/arturbosch/detekt/internal/DetektJvm.kt 0.00% <0.00%> (-59.26%) 0.00% <0.00%> (-5.00%)
...ab/arturbosch/detekt/extensions/DetektExtension.kt 42.85% <0.00%> (-9.53%) 2.00% <0.00%> (-5.00%)
...tlab/arturbosch/detekt/extensions/DetektReports.kt 35.29% <0.00%> (-5.89%) 5.00% <0.00%> (-1.00%)
...kotlin/io/gitlab/arturbosch/detekt/DetektPlugin.kt 82.22% <0.00%> (-4.45%) 10.00% <0.00%> (ø%)
.../main/kotlin/io/gitlab/arturbosch/detekt/Detekt.kt 26.26% <0.00%> (-1.02%) 19.00% <0.00%> (-1.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 8350ce2...2be8916. Read the comment docs.

@BraisGabin BraisGabin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👏🏻👏🏻 Nice refactor. I had no idea that detektMain was running the android tasks too. Nor the ignored configuration. I have work to do Monday morning at work 😅.

@picklebento picklebento changed the title Register Detekt tasks based on source set for Android Refactor Gradle integration tests Feb 21, 2021

@cortinico cortinico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.
Just one note, should we merge #3453 before this?

@picklebento

Copy link
Copy Markdown
Member Author

LGTM.
Just one note, should we merge #3453 before this?

Good call. Now we have one remaining non-testkit gradle unit test

@picklebento
picklebento merged commit 7cd69d2 into detekt:master Feb 24, 2021
@picklebento
picklebento deleted the agpintegrationtest branch February 24, 2021 00:07
@cortinico cortinico added this to the 1.16.0 milestone Mar 3, 2021
@cortinico cortinico added the housekeeping Marker for housekeeping tasks and refactorings label Mar 3, 2021
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