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

Move gradle testkit test back to test/ #3504

Merged
merged 1 commit into from
Mar 1, 2021
Merged

Conversation

chao2zhang
Copy link
Member

Problem

IntelliJ IDE by default will not recognize our custom source set as test. Therefore the dependencies can be inferred incorrectly. See the screenshot:
WX20210227-114057

It still won't work even if we use the idea gradle plugin as described in IDEA-151925.

Another problem with respect to IDE integration is that the code generated DEFAULT_DETEKT_VERSION cannot be correctly displayed.

Main change

Moving these testkit tests back to test/ would significantly improve the IDE experience: there is no IDE warnings or errors and we can continue run tests in IntelliJ.

Other changes

  • In addition, uses processResources to replace the code generation to pass build time values to runtime.
  • Removes an unnecessary println.

In addition, uses processResources to replace the code generation
to pass build time values to runtime.

Removes an unnecessary println.
@codecov
Copy link

codecov bot commented Feb 28, 2021

Codecov Report

Merging #3504 (119443a) into master (da6c969) will increase coverage by 0.06%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3504      +/-   ##
============================================
+ Coverage     77.56%   77.62%   +0.06%     
- Complexity     2804     2806       +2     
============================================
  Files           461      461              
  Lines          8668     8671       +3     
  Branches       1676     1676              
============================================
+ Hits           6723     6731       +8     
+ Misses         1040     1035       -5     
  Partials        905      905              
Impacted Files Coverage Δ Complexity Δ
...kotlin/io/gitlab/arturbosch/detekt/DetektPlugin.kt 6.25% <75.00%> (+6.25%) 0.00 <0.00> (ø)
...b/arturbosch/detekt/extensions/DetektReportType.kt 83.33% <0.00%> (+83.33%) 2.00% <0.00%> (+2.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 da6c969...119443a. Read the comment docs.

@chao2zhang chao2zhang merged commit c90eafe into detekt:master Mar 1, 2021
@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.

2 participants