Details
-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Refactor this method to reduce its Cognitive Complexity from x to the y allowed.
-
Highlighting:
- primary: Method/function name
- secondary: Keywords & operators that cause increments
-
List of parameters:
-
Default Severity:Critical
-
Impact:High
-
Likelihood:Low
-
Default Quality Profiles:Sonar way
-
Targeted languages:APEX, Cobol, Flex, PL/I, PL/SQL, RPG, Rust, Solidity, T-SQL, VB6
-
Covered Languages:ABAP, C#, C, C++, Go, Java, JavaScript, Kotlin, Objective-C, PHP, Python, Ruby, Scala, Swift, TypeScript, VB.Net
-
Irrelevant for Languages:HTML, XML
-
Remediation Function:Linear with offset
-
Linear Argument Description:per complexity point over the threshold
-
Linear Factor:1min
-
Linear Offset:5min
-
Analysis Level:Syntactic Analysis
-
Analysis Scope:Main Sources, Test Sources
-
Common Rule:Yes
-
ESLint-SonarJS:cognitive-complexity
-
FxCop:AvoidUnmantainableCode, CA1505
-
TSLint-SonarTS:cognitive-complexity
Description
Attachments
Issue Links
- is implemented by
-
SONARCOBOL-1458 Rule: Cognitive Complexity of functions should not be too high
-
- Open
-
-
SONARFLEX-133 Rule: Cognitive Complexity of functions should not be too high
-
- Open
-
-
SONARPLI-186 Rule: Cognitive Complexity of functions should not be too high
-
- Open
-
-
SONARPLSQL-640 Rule: Cognitive Complexity of functions should not be too high
-
- Open
-
-
SONARRPG-178 Rule: Cognitive Complexity of functions should not be too high
-
- Open
-
-
SONARTSQL-63 Rule S3776: Cognitive Complexity of methods should not be too high
-
- Open
-
-
SONARVBSIX-268 Rule: Cognitive Complexity of functions should not be too high
-
- Open
-
-
CPP-1745 Rule: Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARABAP-325 Rule: Cognitive Complexity of procedures should not be too high
-
- Closed
-
-
SONARJAVA-1918 Cognitive Complexity rule
-
- Closed
-
-
SONARPHP-683 Rule: Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARPY-186 Rule: Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARSLANG-63 Rule: Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARSLANG-221 [Scala] Enable Rule: S3776 Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARSLANG-320 [Apex] Enable Rule: S3776 Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARSWIFT-286 Rule S3776 : Cognitive Complexity of methods should not be too high
-
- Closed
-
-
SONARSLANG-425 [Go] Enable rules S3776: Cognitive Complexity of functions should not be too high
-
- Closed
-
-
SONARPY-768 S3776 secondary locations are hard to understand for boolean expressions
-
- Open
-
-
SONARPY-767 S3776 cognitive complexity miscount when parentheses are used
-
- Open
-
- is related to
-
CPP-2966 Rule S6194: Cognitive Complexity of coroutines should not be too high
-
- Closed
-
- links to
1.
|
JavaScript | RSPEC-3858 |
|
Active | Unassigned | |
2.
|
C#: Cognitive Complexity of methods should not be too high | RSPEC-3868 |
|
Active | Unassigned | |
3.
|
Java: Cognitive Complexity of methods should not be too high | RSPEC-4241 |
|
Active | Unassigned | |
4.
|
C-Family | RSPEC-5512 |
|
Active | Unassigned |