39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
=== on 6 Mar 2018, 17:22:14 Tibor Blenessy wrote:
|
|
Go requires curly braces for conditional statements.
|
|
|
|
=== on 8 Jun 2018, 17:52:10 Duncan Pocklington wrote:
|
|
This rule seems to overlap almost completely with https://jira.sonarsource.com/browse/RSPEC-2681[S2681]
|
|
|
|
|
|
Given the non-compliant example:
|
|
|
|
|
|
----
|
|
if (condition) // Noncompliant
|
|
doTheThing();
|
|
doTheOtherThing(); // <- S2681 "This line will not be executed conditionally; only the first line of this 3-line block will be ..."
|
|
somethingElseEntirely();
|
|
|
|
foo();
|
|
----
|
|
|
|
Fixing the indentation or using blocks stops S2681 from raising. Do we need both rules?
|
|
|
|
|
|
\[UPDATE] The wording of this rule and S2681 and examples have been updated.
|
|
|
|
=== on 1 Feb 2019, 10:31:32 Amaury Levé wrote:
|
|
Adding VB.NET and VB6 as irrelevant because by design you always have a block.
|
|
|
|
=== on 08 Jun 2023, 15:55:00 Sébastien Marichal wrote:
|
|
|
|
During a LaYC sprint, I removed dummy implementations for the following language:
|
|
|
|
* apex
|
|
* flex
|
|
* rust
|
|
* scala
|
|
* solidity
|
|
|
|
It is not implemented in the corresponding analyzer and there currently are no tickets open in order to do so.
|