mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
Fix issues
This commit is contained in:
@@ -23,7 +23,8 @@ class MainSpec {
|
||||
@Nested
|
||||
inner class `Build runner` {
|
||||
|
||||
fun runnerConfigs(): List<Arguments> {
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun runnerConfigs(): List<Arguments> {
|
||||
return listOf(
|
||||
arguments(arrayOf("--generate-config"), ConfigExporter::class),
|
||||
arguments(arrayOf("--run-rule", "RuleSet:Rule"), Runner::class),
|
||||
|
||||
@@ -146,7 +146,7 @@ class ValidateConfigSpec {
|
||||
@Nested
|
||||
inner class `configure additional exclude paths` {
|
||||
|
||||
fun patterns(str: String) = CommaSeparatedPattern(str).mapToRegex()
|
||||
private fun patterns(str: String) = CommaSeparatedPattern(str).mapToRegex()
|
||||
|
||||
@Test
|
||||
fun `does not report any complexity properties`() {
|
||||
|
||||
@@ -641,7 +641,7 @@ class MagicNumberSpec {
|
||||
inner class `ignoring named arguments` {
|
||||
@Nested
|
||||
inner class `in constructor invocation` {
|
||||
fun code(numberString: String) = """
|
||||
private fun code(numberString: String) = """
|
||||
data class Model(
|
||||
val someVal: Int,
|
||||
val other: String = "default"
|
||||
@@ -705,7 +705,7 @@ class MagicNumberSpec {
|
||||
@Nested
|
||||
inner class `Issue#659 - false-negative reporting on unnamed argument when ignore is true` {
|
||||
|
||||
fun code(numberString: String) = """
|
||||
private fun code(numberString: String) = """
|
||||
data class Model(
|
||||
val someVal: Int,
|
||||
val other: String = "default"
|
||||
@@ -722,7 +722,7 @@ class MagicNumberSpec {
|
||||
|
||||
@Nested
|
||||
inner class `in function invocation` {
|
||||
fun code(number: Number) = """
|
||||
private fun code(number: Number) = """
|
||||
fun tested(someVal: Int, other: String = "default")
|
||||
|
||||
val t = tested(someVal = $number)
|
||||
@@ -888,7 +888,8 @@ class MagicNumberSpec {
|
||||
@Nested
|
||||
inner class `a number as part of a range` {
|
||||
|
||||
fun cases() = listOf(
|
||||
@Suppress("UnusedPrivateMember")
|
||||
private fun cases() = listOf(
|
||||
"val range = 1..27",
|
||||
"val range = (1..27)",
|
||||
"val range = 27 downTo 1",
|
||||
|
||||
@@ -193,7 +193,7 @@ class RedundantVisibilityModifierRuleSpec {
|
||||
|
||||
val rule = RedundantVisibilityModifierRule()
|
||||
|
||||
fun mockCompilerResources(mode: ExplicitApiMode): CompilerResources {
|
||||
private fun mockCompilerResources(mode: ExplicitApiMode): CompilerResources {
|
||||
val languageVersionSettings = mockk<LanguageVersionSettings>()
|
||||
every {
|
||||
hint(ExplicitApiMode::class)
|
||||
|
||||
Reference in New Issue
Block a user