Skip to content

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

Merged
merged 3 commits into from
Sep 6, 2019
Merged

Update detekt extensions doc #1893

merged 3 commits into from
Sep 6, 2019

Conversation

schalkms
Copy link
Member

@schalkms schalkms commented Sep 3, 2019

Closes #1864

The old extensions documentation included deprecated code samples.
This deprecated code samples were replaced with the code in the
detekt-extension project.

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-io
Copy link

codecov-io commented Sep 3, 2019

Codecov Report

Merging #1893 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ Complexity Δ
...ab/arturbosch/detekt/rules/style/WildcardImport.kt 85.71% <0%> (+1.09%) 9% <0%> (+4%) ⬆️

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 29caec9...ce16460. Read the comment docs.

@@ -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) {
Copy link
Member

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

schalkms and others added 2 commits September 4, 2019 18:46
@arturbosch arturbosch merged commit bbb95df into detekt:master Sep 6, 2019
@arturbosch arturbosch added this to the 1.0.2 milestone Sep 6, 2019
sowmyav24 pushed a commit to sowmyav24/detekt that referenced this pull request Sep 17, 2019
* 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
sowmyav24 pushed a commit to sowmyav24/detekt that referenced this pull request Sep 17, 2019
* 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
@arturbosch arturbosch modified the milestones: 1.0.2, 1.1.0 Sep 17, 2019
@schalkms schalkms deleted the schalkms-extension-doc branch November 8, 2019 18:17
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
* 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
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
* 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
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.

Custom rules integration to IntelliJ IDEA plugin?
4 participants