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

org.sonar.l10n.csharp.rules.csharpsquid.S121.html Maven / Gradle / Ivy

There is a newer version: 4.0
Show newest version

While not technically incorrect, the omission of curly braces can be misleading, and may lead to the introduction of errors during maintenance.

Noncompliant Code Example

// the two statements seems to be attached to the if statement, but that is only true for the first one:
if (condition)
  executeSomething();
  checkSomething();

Compliant Solution

if (condition) {
  executeSomething();
  checkSomething();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy