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

org.sonar.l10n.javascript.rules.javascript.S108.html Maven / Gradle / Ivy

There is a newer version: 10.20.0.29356
Show newest version

Why is this an issue?

An empty code block is confusing. It will require some effort from maintainers to determine if it is intentional or indicates the implementation is incomplete.

for (let i = 0; i < length; i++) {}  // Noncompliant: is the block empty on purpose, or is code missing?

Removing or filling the empty code blocks takes away ambiguity and generally results in a more straightforward and less surprising code.

Exceptions

The rule ignores:

  • code blocks that contain comments
  • catch blocks




© 2015 - 2024 Weber Informatics LLC | Privacy Policy