-
-
Notifications
You must be signed in to change notification settings - Fork 796
Update detekt extensions doc #1893
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
Conversation
Closes #1864 The old extensions documentation included deprecated code samples. This deprecated code samples were replaced with the code in the detekt-extension project.
Codecov Report
@@ Coverage Diff @@
## master #1893 +/- ##
============================================
+ Coverage 80.24% 80.25% +0.01%
- Complexity 1947 1951 +4
============================================
Files 325 325
Lines 5503 5511 +8
Branches 1018 1020 +2
============================================
+ Hits 4416 4423 +7
Misses 557 557
- Partials 530 531 +1
Continue to review full report at Codecov.
|
@@ -48,23 +50,25 @@ class TooManyFunctions : Rule("TooManyFunctions") { | |||
|
|||
Example of a much preciser rule in terms of more specific CodeSmell constructor and Rule attributes: | |||
```kotlin | |||
class TooManyFunctions2(config: Config) : | |||
Rule("TooManyFunctionsTwo", Severity.Maintainability, config) { | |||
class TooManyFunctions2(config: Config) : ThresholdRule(config, THRESHOLD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably forgot to copy over:
const val THRESHOLD = 10
Co-Authored-By: Nicola Corti <corti.nico@gmail.com>
* Update detekt extensions doc Closes detekt#1864 The old extensions documentation included deprecated code samples. This deprecated code samples were replaced with the code in the detekt-extension project. * Apply suggestions from code review Co-Authored-By: Nicola Corti <corti.nico@gmail.com> * Add THRESHOLD constant to code sample
* Update detekt extensions doc Closes detekt#1864 The old extensions documentation included deprecated code samples. This deprecated code samples were replaced with the code in the detekt-extension project. * Apply suggestions from code review Co-Authored-By: Nicola Corti <corti.nico@gmail.com> * Add THRESHOLD constant to code sample
* Update detekt extensions doc Closes detekt#1864 The old extensions documentation included deprecated code samples. This deprecated code samples were replaced with the code in the detekt-extension project. * Apply suggestions from code review Co-Authored-By: Nicola Corti <corti.nico@gmail.com> * Add THRESHOLD constant to code sample
* Update detekt extensions doc Closes detekt#1864 The old extensions documentation included deprecated code samples. This deprecated code samples were replaced with the code in the detekt-extension project. * Apply suggestions from code review Co-Authored-By: Nicola Corti <corti.nico@gmail.com> * Add THRESHOLD constant to code sample
Closes #1864
The old extensions documentation included deprecated code samples.
This deprecated code samples were replaced with the code in the
detekt-extension project.