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

Refactor Gradle integration tests #3489

Merged
merged 5 commits into from
Feb 24, 2021

Conversation

chao2zhang
Copy link
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
Copy link

codecov bot commented Feb 21, 2021

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.

Copy link
Member

@BraisGabin BraisGabin left a comment

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 😅.

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

@cortinico cortinico left a comment

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?

@chao2zhang
Copy link
Member Author

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

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

@chao2zhang chao2zhang merged commit 7cd69d2 into detekt:master Feb 24, 2021
@chao2zhang chao2zhang 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.

None yet

3 participants