Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1196

Cycles between packages should be removed

    XMLWordPrintable

    Details

    • Type: Finding Detection
    • Status: Closed
    • Resolution: Won't Fix
    • Labels:
    • Message:
      Remove the dependency on the source file "xxxx" to break a package cycle.
    • Default Severity:
      Major
    • Impact:
      Low
    • Likelihood:
      High
    • Legacy Key:
      CycleBetweenPackages
    • Targeted languages:
      Java
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      1d
    • FindBugs:
      CD_CIRCULAR_DEPENDENCY

      Description

      When several packages are involved in a cycle (package A > package B > package C > package A, where ">" means "depends upon"), that means those packages are highly coupled, and there is no way to reuse/extract one of those packages without importing all the other packages. Such cycle could quickly increase the effort required to maintain an application and embrace business change.
      SonarQube not only detect cycles between packages, but also calculates the minimum effort to break those cycles. This rule logs a violation on each source file having an outgoing dependency to be cut in order to break a cycle.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: