Support Records in rules targeting Classes

Description

Here is a list of the rules that can be improved to support Records as well as classes:

S1820: Classes should not have too many fields Does not make sense for records components... having many is fine, as records are designed to store data.
S1186: Methods should not be empty
S1067: Expressions should not be too complex
S2176: Class names should not shadow interfaces or superclasses
S1845: Methods and field names should not be the same or differ only by capitalization (except standard getters)
S2333: Redundant modifiers should not be used(final for records)
S2693: Threads should not be started in constructors
S1448: Classes should not have too many methods
S1128: Unnecessary imports should be removed (might trigger FP because of Records, see community thread)
S1939: Extensions and implementations should not be redundant
S2326: Unused type parameters should be removed
 S101: Class names should comply with a naming convention

Activity

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Due date

Priority

Sentry

Created March 22, 2021 at 4:43 PM
Updated October 16, 2024 at 2:12 PM
Resolved July 16, 2021 at 8:23 AM