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

Workaround config #3001

Merged
merged 8 commits into from
Aug 24, 2020
Merged

Workaround config #3001

merged 8 commits into from
Aug 24, 2020

Conversation

BraisGabin
Copy link
Member

Right now we are using FailFastConfig and DisabledAutoCorrectConfig to modify the configuration of all detekt and not just the configuration related with the rules itself.

This is kind of complex because we have all those configurations mixed. We should think about this for 2.0.

I need this refactor to implement --all-rules. Because I want to enable all the rules, but I don't want to enable any PostProcessor or Report. And all of them checks the same key: "active".

I really don't like too much this code but I don't want to change any current behaviour.

Copy link
Member

@arturbosch arturbosch left a comment

Choose a reason for hiding this comment

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

I like this!

I was thinking if this location is the only one which needs to get wrapped for fail fast and co (instead of creating a new settings objects which potentially can lead to opening two threadpool/classloaders/environments)?

private val config: Config = settings.config

@BraisGabin
Copy link
Member Author

I think that we don't need to wrap it any where else.

@arturbosch arturbosch added this to the 1.12.0 milestone Aug 24, 2020
@arturbosch arturbosch added the migration Marker to add a migration step in the changelog label Aug 24, 2020
@codecov
Copy link

codecov bot commented Aug 24, 2020

Codecov Report

Merging #3001 into master will decrease coverage by 0.08%.
The diff coverage is 56.75%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3001      +/-   ##
============================================
- Coverage     79.78%   79.70%   -0.09%     
+ Complexity     2506     2504       -2     
============================================
  Files           427      427              
  Lines          7534     7543       +9     
  Branches       1420     1424       +4     
============================================
+ Hits           6011     6012       +1     
- Misses          767      773       +6     
- Partials        756      758       +2     
Impacted Files Coverage Δ Complexity Δ
...b/arturbosch/detekt/core/tooling/AnalysisFacade.kt 65.38% <25.00%> (+2.42%) 6.00 <1.00> (ø)
.../arturbosch/detekt/core/tooling/ParsingStrategy.kt 27.27% <27.27%> (-11.19%) 0.00 <0.00> (ø)
...ab/arturbosch/detekt/core/config/Configurations.kt 83.33% <33.33%> (-0.46%) 0.00 <0.00> (ø)
...otlin/io/gitlab/arturbosch/detekt/core/Analyzer.kt 67.64% <76.92%> (-0.22%) 6.00 <0.00> (-1.00)
...io/gitlab/arturbosch/detekt/core/rules/RuleSets.kt 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...gitlab/arturbosch/detekt/core/tooling/Lifecycle.kt 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
...h/detekt/api/internal/DisabledAutoCorrectConfig.kt 44.44% <0.00%> (-33.34%) 5.00% <0.00%> (-2.00%)
...kotlin/io/gitlab/arturbosch/detekt/DetektPlugin.kt 53.84% <0.00%> (-1.84%) 10.00% <0.00%> (ø%)
.../main/kotlin/io/gitlab/arturbosch/detekt/Detekt.kt 27.90% <0.00%> (-0.67%) 16.00% <0.00%> (ø%)
... and 5 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 2dd828c...8d32e33. Read the comment docs.

@BraisGabin BraisGabin merged commit 923b3b5 into detekt:master Aug 24, 2020
@BraisGabin BraisGabin deleted the workaround-config branch August 24, 2020 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration Marker to add a migration step in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants