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

Treat androidTest directory and *Spek.kt files as test sources. #1456

Merged
merged 2 commits into from
Feb 6, 2019
Merged

Treat androidTest directory and *Spek.kt files as test sources. #1456

merged 2 commits into from
Feb 6, 2019

Conversation

vanniktech
Copy link
Contributor

Closes #1449

- '.*Test.kt'
- '.*Spec.kt'
- '.*Spek.kt'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sneaked this one in since I think Spek 2 does use Spek instead of Spec.

@vanniktech
Copy link
Contributor Author

Locally, I'm getting:

➜  detekt git:(test-Spek-androidTest) ./gradlew generateDocumentation               
Downloading https://services.gradle.org/distributions/gradle-5.0-all.zip
...........................................................................................................................

Welcome to Gradle 5.0!

Here are the highlights of this release:
 - Kotlin DSL 1.0
 - Task timeouts
 - Dependency alignment aka BOM support
 - Interactive `gradle init`

For more details see https://docs.gradle.org/5.0/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :detekt-gradle-plugin
e: /home/niklas/dev/GitHub/detekt/detekt-gradle-plugin/build.gradle.kts:117:2: Unresolved reference: dependsOn

FAILURE: Build failed with an exception.

* Where:
Build file '/home/niklas/dev/GitHub/detekt/detekt-gradle-plugin/build.gradle.kts' line: 117

* What went wrong:
Script compilation error:

  Line 117:     dependsOn(generateDefaultDetektVersionFile)
             ^ Unresolved reference: dependsOn

1 error

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
➜  detekt git:(test-Spek-androidTest) 

@vanniktech
Copy link
Contributor Author

CI says:

Execution failed for task ':detekt-generator:verifyGeneratorOutput'.
> The default-detekt-config.yml is not up-to-date. You can execute the generateDocumentation Gradle task to update it and commit the changed files.

@arturbosch
Copy link
Member

arturbosch commented Feb 6, 2019

Mh, just checked your branch and I can build it locally with the gradle wrapper. However the indentation of the two lines is wrong. You just used tabs but yaml spaces -> that means first three tabs and then four spaces because we do trimIndent ...
I know that stupid indentation, we after we convert to standard KtLint formatting in 1.0, this will go away ^^

@vanniktech
Copy link
Contributor Author

Okay. I should have seen that theoretically. Just today I uninstalled - https://github.com/lukechilds/github-custom-tab-size - this plugin basically adjusted the tab spacing to be the same and now that I have it no longer I saw what was actually wrong.

I believe this should go green now.

@codecov-io
Copy link

Codecov Report

Merging #1456 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1456      +/-   ##
============================================
- Coverage     74.65%   74.63%   -0.02%     
+ Complexity     1717     1716       -1     
============================================
  Files           326      326              
  Lines          5176     5181       +5     
  Branches        939      942       +3     
============================================
+ Hits           3864     3867       +3     
  Misses          788      788              
- Partials        524      526       +2
Impacted Files Coverage Δ Complexity Δ
...ekt/generator/printer/rulesetpage/ConfigPrinter.kt 85.71% <ø> (ø) 9 <0> (ø) ⬇️
.../arturbosch/detekt/rules/style/UnnecessaryApply.kt 83.33% <0%> (-6.15%) 6% <0%> (-1%)

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 a4bf04e...b4b2a5b. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #1456 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1456      +/-   ##
============================================
- Coverage     74.65%   74.63%   -0.02%     
+ Complexity     1717     1716       -1     
============================================
  Files           326      326              
  Lines          5176     5181       +5     
  Branches        939      942       +3     
============================================
+ Hits           3864     3867       +3     
  Misses          788      788              
- Partials        524      526       +2
Impacted Files Coverage Δ Complexity Δ
...ekt/generator/printer/rulesetpage/ConfigPrinter.kt 85.71% <ø> (ø) 9 <0> (ø) ⬇️
.../arturbosch/detekt/rules/style/UnnecessaryApply.kt 83.33% <0%> (-6.15%) 6% <0%> (-1%)

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 a4bf04e...b4b2a5b. Read the comment docs.

@arturbosch arturbosch merged commit ca719ea into detekt:master Feb 6, 2019
@arturbosch arturbosch added this to the 1.0.0 milestone Feb 6, 2019
@vanniktech vanniktech deleted the test-Spek-androidTest branch February 7, 2019 09:07
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