Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-8546

Improve SensorDescriptor API to give more flexibility on configuration requirements to execute Sensors

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5-M3, 6.5
    • Component/s: Plugin API, Scanner
    • Labels:
      None

      Description

      The current way to declare conditions for a Sensor to execute are too restrictive. For example .NET sensors would like to activate when one property among a list is set.
      Proposal: use Java 8 Predicate.

      descriptor.onlyWhenConfiguration(conf -> conf.hasKey("foo") || conf.hasKey("bar"));
      

        Attachments

          Activity

            People

            • Assignee:
              julien.henry Julien Henry
              Reporter:
              julien.henry Julien Henry
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: