-
-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...formatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/wrappers/ClassNaming.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.gitlab.arturbosch.detekt.formatting.wrappers | ||
|
||
import com.pinterest.ktlint.ruleset.standard.rules.ClassNamingRule | ||
import io.gitlab.arturbosch.detekt.api.Config | ||
import io.gitlab.arturbosch.detekt.formatting.FormattingRule | ||
|
||
/** | ||
* See [ktlint docs](https://pinterest.github.io/ktlint/rules/standard/#classobject-naming) for | ||
* documentation. | ||
*/ | ||
class ClassNaming(config: Config) : FormattingRule(config) { | ||
override val wrapping = ClassNamingRule() | ||
override val issue = | ||
issueFor("Class or object name should start with an uppercase letter and use camel case.") | ||
} |
15 changes: 15 additions & 0 deletions
15
...ormatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/wrappers/FunctionName.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.gitlab.arturbosch.detekt.formatting.wrappers | ||
|
||
import com.pinterest.ktlint.ruleset.standard.rules.FunctionNamingRule | ||
import io.gitlab.arturbosch.detekt.api.Config | ||
import io.gitlab.arturbosch.detekt.formatting.FormattingRule | ||
|
||
/** | ||
* See [ktlint docs](https://pinterest.github.io/ktlint/rules/experimental/#function-naming) for | ||
* documentation. | ||
*/ | ||
class FunctionName(config: Config) : FormattingRule(config) { | ||
override val wrapping = FunctionNamingRule() | ||
override val issue = | ||
issueFor("Function name should start with a lowercase letter (except factory methods) and use camel case.") | ||
} |
15 changes: 15 additions & 0 deletions
15
...ormatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/wrappers/PropertyName.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.gitlab.arturbosch.detekt.formatting.wrappers | ||
|
||
import com.pinterest.ktlint.ruleset.standard.rules.PropertyNamingRule | ||
import io.gitlab.arturbosch.detekt.api.Config | ||
import io.gitlab.arturbosch.detekt.formatting.FormattingRule | ||
|
||
/** | ||
* See [ktlint docs](https://pinterest.github.io/ktlint/rules/experimental/#property-naming) for | ||
* documentation. | ||
*/ | ||
class PropertyName(config: Config) : FormattingRule(config) { | ||
override val wrapping = PropertyNamingRule() | ||
override val issue = | ||
issueFor("Reports incorrect property name.") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters