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

Default 'sonar.sources' to '.'

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.7
    • Component/s: Scanner
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      sonar.sources is fed automatically if you analyze with Maven, Gradle, or MSBuild. Everyone else (using the vanilla SonarQube Scanner) must provide a value manually.

      But since analysis is assumed to start from the project root, then we can assume that project sources will be found by a recursive search of the current directory. In other words, let's default to sonar.sources=..

      Because we now default project name (to project key), and project version, this change allows a localhost (i.e. first trial) analysis, without the need to create a sonar-project.properties file,
      like so:

      cd my-project
      sonar-scanner -Dsonar.projectKey=foo
      

      A minimal production analysis command looks like this:

      sonar-scanner -Dsonar.projectKey=foo -Dsonar.host.url=[instance] -Dsonar.login=[analysis token]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.henry Julien Henry
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: