Skip to content

Dynamic deprecation #4104

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

Merged
merged 4 commits into from
Sep 13, 2021
Merged

Dynamic deprecation #4104

merged 4 commits into from
Sep 13, 2021

Conversation

BraisGabin
Copy link
Member

Make the list of deprecation configurations dynamic. This way we don't forget about updating a hardcoded list.

@BraisGabin BraisGabin added the housekeeping Marker for housekeeping tasks and refactorings label Sep 11, 2021
@codecov
Copy link

codecov bot commented Sep 11, 2021

Codecov Report

Merging #4104 (f7fce45) into main (cc74174) will decrease coverage by 0.02%.
The diff coverage is 95.23%.

❗ Current head f7fce45 differs from pull request most recent head a893dab. Consider uploading reports for the commit a893dab to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #4104      +/-   ##
============================================
- Coverage     83.60%   83.57%   -0.03%     
- Complexity     3187     3189       +2     
============================================
  Files           459      460       +1     
  Lines          9098     9108      +10     
  Branches       1769     1770       +1     
============================================
+ Hits           7606     7612       +6     
- Misses          560      564       +4     
  Partials        932      932              
Impacted Files Coverage Δ
...itlab/arturbosch/detekt/generator/DetektPrinter.kt 0.00% <0.00%> (ø)
...io/gitlab/arturbosch/detekt/generator/Generator.kt 0.00% <ø> (ø)
...sch/detekt/generator/collection/DetektCollector.kt 0.00% <ø> (ø)
.../arturbosch/detekt/generator/out/AbstractWriter.kt 0.00% <0.00%> (ø)
...t/generator/printer/defaultconfig/ConfigPrinter.kt 92.10% <ø> (ø)
...etekt/generator/printer/defaultconfig/Exclusion.kt 96.66% <ø> (ø)
...ab/arturbosch/detekt/core/config/ValidateConfig.kt 100.00% <100.00%> (ø)
...urbosch/detekt/generator/collection/RuleSetPage.kt 100.00% <100.00%> (ø)
...osch/detekt/generator/printer/DeprecatedPrinter.kt 100.00% <100.00%> (ø)
...sch/detekt/generator/printer/RuleSetPagePrinter.kt 89.58% <100.00%> (ø)
... and 3 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 b4c095e...a893dab. Read the comment docs.

@BraisGabin BraisGabin force-pushed the dynamic-deprecation branch 2 times, most recently from 75195be to 9d78247 Compare September 11, 2021 18:04
Copy link
Member

@chao2zhang chao2zhang left a comment

Choose a reason for hiding this comment

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

I think this PR is making a positive impact in general, but as mentioned in #3935, our config validation is still relatively incomplete.

@@ -36,19 +37,20 @@ val generateDocumentation by tasks.registering(JavaExec::class) {
inputs.files(
ruleModules.map { fileTree(it) },
fileTree("${rootProject.rootDir}/detekt-formatting/src/main/kotlin"),
file("${rootProject.rootDir}/detekt-generator/build/libs/detekt-generator-${Versions.DETEKT}-all.jar")
file("${rootProject.rootDir}/detekt-generator/build/libs/detekt-generator-${Versions.DETEKT}-all.jar"),
Copy link
Member

Choose a reason for hiding this comment

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

Did we enable rules to force comma to be added on the last argument?

Copy link
Member Author

Choose a reason for hiding this comment

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

We did not. But I added them because I think that they improve the code.

@BraisGabin BraisGabin added this to the 1.19.0 milestone Sep 13, 2021
@BraisGabin BraisGabin merged commit 3b39209 into main Sep 13, 2021
@BraisGabin BraisGabin deleted the dynamic-deprecation branch September 13, 2021 17:53
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