Skip to content

DuplicatedCondition: Support more statements in dataflow #400

Description

@jubnzv
fun test() {
  require (a > 1, "condition 1");
  // some code
  require(a > 1, "condition 2"); // Bad: already have this check
}

Use instead:

fun test() {
  require (a > 1, "condition 1");
  // some code
}

It should work with require / throw* functions and if statements and ternary expressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:detectorsRelated to existing detectorsenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions