Skip to content

Commit

Permalink
Variable counter is never used warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ermadmi78 committed Oct 11, 2021
1 parent 207add5 commit c0451d8
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,11 @@ private fun FileSpecBuilder.buildEntity(node: KobbyNode, layout: KotlinLayout) =
appendLiteral('(')
}

addStatement("")
addStatement("var·counter·=·0")
addStatement("")
if (node.fields.isNotEmpty()) {
addStatement("")
addStatement("var·counter·=·0")
addStatement("")
}
node.fields { field ->
val fieldCondition = when {
field.isRequired -> "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class MutationImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Mutation").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class SubscriptionImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Subscription").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class MutationImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Mutation").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class SubscriptionImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Subscription").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class MutationImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Mutation").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class SubscriptionImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Subscription").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class MutationImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Mutation").append('(')

var counter = 0

append(')')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ internal class SubscriptionImpl(
@Suppress("UNUSED_PARAMETER", "UNUSED_CHANGED_VALUE")
public override fun toString(): String = buildString {
append("Subscription").append('(')

var counter = 0

append(')')
}

Expand Down

0 comments on commit c0451d8

Please sign in to comment.