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

Use annotations to configure rules in rules-naming #3769

Merged
merged 18 commits into from
May 19, 2021

Conversation

marschwar
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #3769 (87b90e1) into main (21b7d7c) will increase coverage by 0.00%.
The diff coverage is 97.22%.

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

@@            Coverage Diff            @@
##               main    #3769   +/-   ##
=========================================
  Coverage     83.52%   83.52%           
  Complexity     2915     2915           
=========================================
  Files           452      452           
  Lines          8765     8767    +2     
  Branches       1665     1665           
=========================================
+ Hits           7321     7323    +2     
  Misses          542      542           
  Partials        902      902           
Impacted Files Coverage Δ Complexity Δ
...etekt/rules/coroutines/RedundantSuspendModifier.kt 57.14% <ø> (ø) 20.00 <0.00> (ø)
...h/detekt/rules/documentation/DeprecatedBlockTag.kt 93.75% <ø> (ø) 5.00 <0.00> (ø)
...ab/arturbosch/detekt/rules/bugs/ExitOutsideMain.kt 66.66% <ø> (ø) 4.00 <0.00> (ø)
...ab/arturbosch/detekt/rules/bugs/HasPlatformType.kt 68.00% <ø> (ø) 11.00 <0.00> (ø)
...arturbosch/detekt/rules/bugs/IgnoredReturnValue.kt 83.33% <ø> (ø) 10.00 <0.00> (ø)
...kt/rules/exceptions/InstanceOfCheckForException.kt 76.19% <ø> (ø) 8.00 <0.00> (ø)
...lab/arturbosch/detekt/rules/style/ModifierOrder.kt 100.00% <ø> (ø) 3.00 <0.00> (ø)
...h/detekt/rules/style/MultilineLambdaItParameter.kt 87.09% <ø> (ø) 13.00 <0.00> (ø)
...rbosch/detekt/rules/style/RedundantExplicitType.kt 65.62% <ø> (ø) 15.00 <0.00> (ø)
...b/arturbosch/detekt/rules/style/UseCheckOrError.kt 91.66% <ø> (ø) 8.00 <0.00> (ø)
... and 18 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 21b7d7c...7c9704c. Read the comment docs.

Comment on lines 77 to 78
const val VARIABLE_PATTERN = "variablePattern"
const val PRIVATE_VARIABLE_PATTERN = "privateVariablePattern"
const val EXCLUDE_CLASS_PATTERN = "excludeClassPattern"
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need these constants?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, they are used in NamingConventionCustomPatternTest which tests multiple rules at the same time and I think it would lead to confusion if they were inlined there. This way you at least have a chance to see where they are coming from.

Copy link
Member

Choose a reason for hiding this comment

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

We should simplify split that test in multiple ones. But that's completely out of the scope of this PR.

@cortinico cortinico added this to the 1.18.0 milestone May 14, 2021
Comment on lines 77 to 78
const val VARIABLE_PATTERN = "variablePattern"
const val PRIVATE_VARIABLE_PATTERN = "privateVariablePattern"
const val EXCLUDE_CLASS_PATTERN = "excludeClassPattern"
Copy link
Member

Choose a reason for hiding this comment

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

We should simplify split that test in multiple ones. But that's completely out of the scope of this PR.

@chao2zhang
Copy link
Member

@BraisGabin Let's use #3784 to document configuration naming / deprecations

@chao2zhang chao2zhang merged commit 693f4f3 into detekt:main May 19, 2021
@marschwar marschwar deleted the annotation-rules-naming branch May 24, 2021 12:42
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