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

Document how to create a common baseline file for multi module gradle projects #2140

Merged
merged 1 commit into from
Dec 28, 2019

Conversation

arturbosch
Copy link
Member

Closes #2100

@arturbosch arturbosch added this to the 1.2.1 milestone Nov 28, 2019
@codecov-io
Copy link

codecov-io commented Nov 28, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##             master   #2140     +/-   ##
==========================================
- Coverage      81.2%   80.5%   -0.7%     
+ Complexity     2064    2015     -49     
==========================================
  Files           340     336      -4     
  Lines          5910    5802    -108     
  Branches       1076    1064     -12     
==========================================
- Hits           4799    4671    -128     
- Misses          535     564     +29     
+ Partials        576     567      -9
Impacted Files Coverage Δ Complexity Δ
...ain/kotlin/io/gitlab/arturbosch/detekt/cli/Main.kt 0% <0%> (-50%) 0% <0%> (-7%)
...itlab/arturbosch/detekt/cli/out/XmlOutputReport.kt 68.57% <0%> (-31.43%) 6% <0%> (-3%)
...ab/arturbosch/detekt/cli/runners/ConfigExporter.kt 0% <0%> (-20%) 0% <0%> (-1%)
.../kotlin/io/gitlab/arturbosch/detekt/cli/CliArgs.kt 92.59% <0%> (-7.41%) 6% <0%> (ø)
...in/io/gitlab/arturbosch/detekt/api/SplitPattern.kt 78.94% <0%> (-6.24%) 17% <0%> (ø)
...lab/arturbosch/detekt/formatting/FormattingRule.kt 69.23% <0%> (-4.85%) 8% <0%> (-1%)
...kotlin/io/gitlab/arturbosch/detekt/api/Location.kt 77.77% <0%> (-3.71%) 4% <0%> (ø)
...gitlab/arturbosch/detekt/cli/runners/AstPrinter.kt 74.28% <0%> (-2.86%) 0% <0%> (-1%)
...ch/detekt/api/internal/ValidatableConfiguration.kt 85.71% <0%> (-2.86%) 0% <0%> (ø)
...otlin/io/gitlab/arturbosch/detekt/api/CodeSmell.kt 58.13% <0%> (-2.33%) 11% <0%> (ø)
... and 19 more

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 3d4ea24...6cf1085. Read the comment docs.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

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

Cool thanks!

docs/pages/baseline.md Outdated Show resolved Hide resolved
Comment on lines 51 to 93
task projectBaseline(type: io.gitlab.arturbosch.detekt.DetektCreateBaselineTask) {
description = "Overrides current baseline."

input = files(rootProject.projectDir)
config = files("$rootDir/detekt/config.yml")
baseline = file(new File(rootProject.projectDir, "/detekt/baseline.xml"))
failFast = true
parallel = true
include '**/*.kt'
include '**/*.kts'
exclude '**/test/resources/**'
}
```

Choose a reason for hiding this comment

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

Can we move the entire task to the subprojects block? It did not work correctly for me without doing that.

Copy link
Member Author

Choose a reason for hiding this comment

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

It should work on top level like in our build file. Inside subprojects every sub-project would get a baseline task hm :/

docs/pages/baseline.md Outdated Show resolved Hide resolved
@arturbosch arturbosch modified the milestones: 1.2.1, 1.2.2, 1.3.1 Nov 29, 2019
@arturbosch
Copy link
Member Author

@adrianczuczka thanks for the suggestions, I've incorporated them and added a detektProjectBaseline task for detekt too.

@arturbosch arturbosch merged commit 239656f into master Dec 28, 2019
@arturbosch arturbosch deleted the baseline-task branch December 28, 2019 20:37
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.

DetektAll with baseline fails with error
4 participants