All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.py.rules.python.S1763.html Maven / Gradle / Ivy

The newest version!

Once control flow has been moved out of the current code block, any subsequent statements become effectively unreachable.

Why is this an issue?

Jump statements (return, break, continue, and raise) move control flow out of the current code block. So any statements that come after a jump are dead code.

Noncompliant code example

def fun(a):
  i = 10
  return i + a       # Noncompliant
  i += 1             # this is never executed

Compliant solution

def fun(a):
  i = 10
  return i + a

Resources





© 2015 - 2025 Weber Informatics LLC | Privacy Policy