Skip to content

Commit

Permalink
Added configuration and rule provider
Browse files Browse the repository at this point in the history
  • Loading branch information
YauhenDaresay committed Apr 25, 2024
1 parent 5eb6d02 commit 4ed3a43
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build/
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea/*
*.iws
*.iml
*.ipr
Expand Down
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/gradle.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

17 changes: 17 additions & 0 deletions src/main/kotlin/com/github/kiolk/provider/RuleProvider.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.github.kiolk.provider

import com.github.kiolk.rules.UseInvokeForOperator
import io.gitlab.arturbosch.detekt.api.Config
import io.gitlab.arturbosch.detekt.api.RuleSet
import io.gitlab.arturbosch.detekt.api.RuleSetProvider

class RuleProvider : RuleSetProvider {

override val ruleSetId: String = "kiolk-detekt-rules"
override fun instance(config: Config): RuleSet = RuleSet(
ruleSetId,
listOf(
UseInvokeForOperator(config),
)
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.github.kiolk.provider.RuleProvider
4 changes: 4 additions & 0 deletions src/main/resources/config/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kiolk-detekt-rules:
active: true
UseInvokeForOperator:
active: true

0 comments on commit 4ed3a43

Please sign in to comment.