Skip to content

Commit

Permalink
Merge branch 'master' into infra/andrey.shcheglov/failsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6675636b796f75676974687562 authored Oct 31, 2022
2 parents 3f5bc94 + 61cd2b7 commit c21ee94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ abstract class DiktatRule(
*/
lateinit var emitWarn: EmitType

@Suppress(
"TooGenericExceptionThrown",
"OVERRIDE_DEPRECATION",
)
override fun visit(
@Suppress("TooGenericExceptionThrown")
final override fun beforeVisitChildNodes(
node: ASTNode,
autoCorrect: Boolean,
emit: EmitType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class RunInScript(private val configRules: List<RulesConfig>) : Rule(NAME_ID.qua
private var isFixMode: Boolean = false
private lateinit var emitWarn: EmitType

@Suppress("OVERRIDE_DEPRECATION")
override fun visit(
override fun beforeVisitChildNodes(
node: ASTNode,
autoCorrect: Boolean,
emit: EmitType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,9 @@ private class PrettyPrintingVisitor(private val elementType: IElementType,
private val maxLevel: Int,
private val expected: String
) : Rule("print-ast") {
@Suppress("OVERRIDE_DEPRECATION")
override fun visit(node: ASTNode,
autoCorrect: Boolean,
emit: EmitType
override fun beforeVisitChildNodes(node: ASTNode,
autoCorrect: Boolean,
emit: EmitType
) {
if (node.elementType == elementType) {
Assertions.assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ internal fun applyToCode(code: String,
text = code,
ruleSets = listOf(
RuleSet("test", object : Rule("astnode-utils-test") {
@Suppress("OVERRIDE_DEPRECATION")
override fun visit(node: ASTNode,
autoCorrect: Boolean,
emit: EmitType
override fun beforeVisitChildNodes(node: ASTNode,
autoCorrect: Boolean,
emit: EmitType
) {
applyToNode(node, counter)
}
Expand Down

0 comments on commit c21ee94

Please sign in to comment.