
org.sonar.l10n.csharp.rules.csharpsquid.S121.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-csharp-plugin Show documentation
Show all versions of sonar-csharp-plugin Show documentation
Enable analysis and reporting on C# projects.
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