Skip to content

Commit

Permalink
Use MagicNumber as sample for the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Jul 24, 2022
1 parent 82d0e7e commit 134276c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Expand Up @@ -10,8 +10,8 @@ class DeprecatedPrinterSpec {
fun `prints the correct properties`() {
val markdownString = DeprecatedPrinter.print(listOf(createRuleSetPage()))
val expectedMarkdownString = """
style>WildcardImport>conf2=use conf1 instead
style>WildcardImport>conf4=use conf3 instead
style>MagicNumber>conf2=use conf1 instead
style>MagicNumber>conf4=use conf3 instead
""".trimIndent()
assertThat(markdownString).isEqualTo(expectedMarkdownString)
Expand Down
Expand Up @@ -22,9 +22,9 @@ class ConfigPrinterSpec {
rulesetconfig3:
- 'first'
- 'se*cond'
WildcardImport:
MagicNumber:
active: true
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts']
conf1: 'foo'
conf3:
- 'a'
Expand Down
Expand Up @@ -59,7 +59,7 @@ internal fun createRuleSetPage(): RuleSetPage {

internal fun createRules(): List<Rule> {
val rule1 = Rule(
name = "WildcardImport",
name = "MagicNumber",
description = "a wildcard import",
nonCompliantCodeExample = "import foo.*",
compliantCodeExample = "import foo.bar",
Expand Down
2 changes: 1 addition & 1 deletion detekt-generator/src/test/resources/RuleSet.md
@@ -1,6 +1,6 @@
style rule set

### WildcardImport
### MagicNumber

a wildcard import

Expand Down

0 comments on commit 134276c

Please sign in to comment.