Details
-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Message:Remove this unnecessary cast to "XXX".
-
Default Severity:Minor
-
Impact:Low
-
Likelihood:Low
-
Default Quality Profiles:Sonar way
-
Targeted languages:ABAP, Flex, JavaScript, PHP, Python, VB.Net
-
Covered Languages:C#, C, C++, Java, Objective-C
-
Remediation Function:Constant/Issue
-
Constant Cost:5min
-
Analysis Scope:Main Sources, Test Sources
-
ESLint:no-extra-boolean-cast
-
ReSharper:RedundantEnumerableCastCall, RedundantCast
-
Quick-fixes:
Description
Unnecessary casting expressions make the code harder to read and understand.
Attachments
Issue Links
- is implemented by
-
CPP-1184 Rule S1905: Redundant casts should not be used
-
- Closed
-
-
SONARJAVA-570 Rule : Redundant type casts
-
- Closed
-
- is related to
-
SONARJAVA-3921 Add quick fixes for S1905 (RedundantTypeCastCheck)
-
- Closed
-
-
SONARJAVA-3191 S1905 should also raise issues in method invocation and constructor call arguments
-
- Closed
-
-
SONARJAVA-3794 Improve S1905 (Redundant cast) rule precision by relying on compiler warnings
-
- Closed
-
-
CPP-2818 S1905: fix false positive with "typedef"
-
- Open
-
-
SONARJAVA-3170 S1905 raises FP on generic method return value
-
- Closed
-
-
SONARJAVA-3468 FP on S1905 when casted argument is an ambiguous method reference.
-
- Closed
-
-
SONARJAVA-3615 FP in S1905 when casted argument is a method reference to a varargs.
-
- Closed
-
- relates to
-
RSPEC-3247 Duplicate casts should not be made
- Active
1.
|
Java | RSPEC-1906 |
|
Active | Unassigned | |
2.
|
C-Family | RSPEC-2989 |
|
Active | Unassigned | |
3.
|
C# | RSPEC-3082 |
|
Active | Unassigned |