Interface NewIssue


  • public interface NewIssue
    Represents an issue detected by a Sensor.
    Since:
    5.1
    • Method Detail

      • gap

        NewIssue gap​(@Nullable
                     java.lang.Double gap)
        Gap used for the computation of the effort.
        Since:
        5.5
      • overrideSeverity

        NewIssue overrideSeverity​(@Nullable
                                  Severity severity)
        Override severity of the issue. Setting a null value or not calling this method means to use severity configured in quality profile.
      • addLocation

        NewIssue addLocation​(NewIssueLocation secondaryLocation)
        Add a secondary location for this issue. Several secondary locations can be registered.
        Since:
        5.2
      • addFlow

        NewIssue addFlow​(java.lang.Iterable<NewIssueLocation> flowLocations)
        Register a flow for this issue. A flow is an ordered list of issue locations that help to understand the issue. It should be a path that backtracks the issue from its primary location to the start of the flow. Several flows can be registered.
        Since:
        5.2
      • newLocation

        NewIssueLocation newLocation()
        Create a new location for this issue. First registered location is considered as primary location.
        Since:
        5.2
      • save

        void save()
        Save the issue. If rule key is unknown or rule not enabled in the current quality profile then a warning is logged but no exception is thrown.