Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3763

Support Records in rules targeting Classes

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Rules
    • Labels:
      None

      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
      S1311?: Cyclomatic Complexity of classes should not be too high
      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                margarita.nedzelska Margarita Nedzelska
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: