Skip to content

Use annotation to configure rules in rules-empty #3771

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 2 commits into from
May 17, 2021

Conversation

marschwar
Copy link
Contributor

This belongs to #3670 and replaces all configuration kdoc tags in rules-empty with annotations.

@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #3771 (d3eddc8) into main (21b7d7c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #3771   +/-   ##
=========================================
  Coverage     83.52%   83.52%           
  Complexity     2915     2915           
=========================================
  Files           452      452           
  Lines          8765     8766    +1     
  Branches       1665     1665           
=========================================
+ Hits           7321     7322    +1     
  Misses          542      542           
  Partials        902      902           
Impacted Files Coverage Δ Complexity Δ
...b/arturbosch/detekt/rules/empty/EmptyCatchBlock.kt 88.88% <100.00%> (ø) 3.00 <0.00> (ø)
...rturbosch/detekt/rules/empty/EmptyFunctionBlock.kt 92.85% <100.00%> (+0.54%) 12.00 <0.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 21b7d7c...d3eddc8. Read the comment docs.

@Suppress("unused")
@Configuration("Excludes all the overridden functions")
@Deprecated("Use `ignoreOverridden` instead")
private val ignoreOverriddenFunctions: Boolean by config(false)
Copy link
Member

Choose a reason for hiding this comment

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

Can't we remove this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it is used to generate the documentation for the deprecated config option. The configWithFallback even checks that the property is there to ensure there is no typo.

Copy link
Member

Choose a reason for hiding this comment

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

Let's tackle deprecated configs in separate PRs. I have not yet merged #3621

@cortinico cortinico added this to the 1.18.0 milestone May 14, 2021
@chao2zhang chao2zhang merged commit 2fbac45 into detekt:main May 17, 2021
@marschwar marschwar deleted the annotation-rules-empty branch May 24, 2021 12:42
@cortinico cortinico changed the title Use annotation to confugure rules in rules-empty Use annotation to configure rules in rules-empty Jul 8, 2021
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.

5 participants