-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Reformat the code to have only one statement per line.
-
Highlighting:
- Primary: second statement on the line
- Secondary: rest statements if any (statements highlighted entirely and separately from each other)
- message: none
-
Default Severity:Major
-
Impact:Low
-
Likelihood:High
-
Legacy Key:OneStatementPerLine, OneStatementPerLineCheck
-
Covered Languages:ABAP, C#, C, C++, Cobol, Flex, Go, Java, JavaScript, Kotlin, Objective-C, PHP, PL/I, PL/SQL, Python, Ruby, Scala, Swift, T-SQL, TypeScript, VB.Net, VB6
-
Irrelevant for Languages:HTML, RPG, XML
-
Remediation Function:Constant/Issue
-
Constant Cost:1min
-
Analysis Level:Syntactic Analysis
-
Analysis Scope:Main Sources, Test Sources
-
Common Rule:Yes
-
Checkstyle:OneStatementPerLine
-
ESLint:max-statements-per-line
-
PMD:OneDeclarationPerLine
-
SwiftLint:switch_case_on_newline
-
TSLint-SonarTS:no-statements-same-line
- is implemented by
-
CPP-50 Rule: One statement per line
-
- Closed
-
-
SONARCOBOL-1068 Rule: Statements should be on separate lines
-
- Closed
-
-
SONARSLANG-48 Rule S122: Statements should be on separate lines
-
- Closed
-
-
SONARSLANG-213 [Scala] Enable Rule: S122 Statements should be on separate lines
-
- Closed
-
-
SONARSLANG-296 [Apex] Enable Rule: S122 Statements should be on separate lines
-
- Closed
-
-
SONARSWIFT-48 Rule: Statements should be on separate lines
-
- Closed
-
-
SONARTSQL-40 Rule: Statements should be on separate lines
-
- Closed
-
-
SONARVBSIX-176 Rule: Statements should be on separate lines
-
- Closed
-
-
CPP-707 Create Objective-C rules repository containing targeted rules
-
- Closed
-
-
SONARABAP-239 Rule: Statements should be on separate lines
-
- Closed
-
-
SONARSLANG-449 [Go] - FP on S122 when a semicolon is added
-
- Closed
-
- is related to
-
SONARSLANG-88 Support statements list in match case in Slang
-
- Closed
-
-
CPP-1811 S122: Add exception for flow statements with single nesting
-
- Closed
-
-
CPP-2736 OneStatementPerLine (S122): FP with incomplete loc for temporary expressions
-
- Closed
-
-
RSPEC-1766 More than one property should not be declared per statement
- Active
- links to
- relates to
-
SONARJS-367 Loading...
1.
|
PL/SQL | RSPEC-2400 |
|
Active | Unassigned | |
2.
|
Swift | RSPEC-2502 |
|
Active | Unassigned | |
3.
|
VB6 | RSPEC-2512 |
|
Active | Unassigned | |
4.
|
ABAP | RSPEC-2513 |
|
Active | Unassigned | |
5.
|
COBOL | RSPEC-2514 |
|
Active | Unassigned | |
6.
|
PHP | RSPEC-2515 |
|
Active | Unassigned | |
7.
|
JavaScript | RSPEC-2516 |
|
Active | Unassigned | |
8.
|
VB.NET | RSPEC-3099 |
|
Active | Unassigned | |
9.
|
PL/I | RSPEC-3312 |
|
Active | Unassigned | |
10.
|
C# | RSPEC-3393 |
|
Active | Unassigned | |
11.
|
C-Family | RSPEC-3968 |
|
Active | Unassigned | |
12.
|
Python | RSPEC-4003 |
|
Active | Unassigned | |
13.
|
T-SQL | RSPEC-4161 |
|
Active | Unassigned | |
14.
|
Go | RSPEC-4484 |
|
Active | Unassigned | |
15.
|
Kotlin | RSPEC-4697 |
|
Active | Unassigned | |
16.
|
Ruby | RSPEC-4760 |
|
Active | Unassigned | |
17.
|
Scala | RSPEC-4918 |
|
Active | Unassigned | |
18.
|
Apex | RSPEC-4990 |
|
Active | Unassigned |