Details
-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Message:Change return type to "void"; not a single caller uses the returned value.
-
Default Severity:Minor
-
Impact:Low
-
Likelihood:Low
-
Default Quality Profiles:Sonar way
-
Targeted languages:C++, Flex, Java, Objective-C, Python, Swift
-
Covered Languages:C#
-
Remediation Function:Constant/Issue
-
Constant Cost:2min
-
Analysis Scope:Main Sources, Test Sources
-
ReSharper:UnusedMethodReturnValue.Local
Description
Private methods are clearly intended for use only within their own scope. When such methods return values that are never used by any of their callers, then clearly there is no need to actually make the return, and it should be removed in the interests of efficiency and clarity.
Attachments
Issue Links
- is related to
-
RSPEC-1144 Unused "private" methods should be removed
- Active