SonarQube Runner
  1. SonarQube Runner
  2. SONARUNNER-49

Make the Sonar Runner support a new "-version" option

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The use of this option should lead to display something like this :

      Runner configuration file: /XXXXX/sonar-runner-2.0/conf/sonar-runner.properties
      Runner version: 2.0
      Java version: 1.6.0_37, vendor: Apple Inc.
      OS name: "Mac OS X", version: "10.7.5", arch: "x86_64"
      Default locale: "fr_FR", source code encoding: "MacRoman" (analysis is platform dependent)
      Total time: 0.095s
      Final Memory: 0M/81M
      

      When calling "sonar-runner -h" this new option should be displayed.

        Activity

        Hide
        Julien HENRY added a comment - - edited

        To be consistent with other commands the syntax is "-v" or "--version".

        Show
        Julien HENRY added a comment - - edited To be consistent with other commands the syntax is "-v" or "--version".
        Hide
        Fabrice Bellingard added a comment - - edited

        Could you remove the following lines when "-v" or "--version". is passed?

        ...
        Project configuration file: XXXXXXXXXXXXXXXXXXXX
        ...
        Work directory: XXXXXXXXXXXXXXXXXXXX/.sonar
        ...
        

        They are interesting only when Sonar Runner is launched to perform an analysis.

        Show
        Fabrice Bellingard added a comment - - edited Could you remove the following lines when "-v" or "--version". is passed? ... Project configuration file: XXXXXXXXXXXXXXXXXXXX ... Work directory: XXXXXXXXXXXXXXXXXXXX/.sonar ... They are interesting only when Sonar Runner is launched to perform an analysis.
        Hide
        Julien HENRY added a comment -

        I took this opportunity to refactor the code and not parse configuration files when using --version.
        As a result some additional lines are no more displayed like encoding, global configuration path and timings/memory stats. It looks like:

        $ sonar-runner -v
        Runner version: 2.1-SNAPSHOT
        Java version: 1.6.0_34, vendor: Sun Microsystems Inc.
        OS name: "Linux", version: "3.6.11-1.fc17.x86_64", arch: "amd64"
        
        Show
        Julien HENRY added a comment - I took this opportunity to refactor the code and not parse configuration files when using --version. As a result some additional lines are no more displayed like encoding, global configuration path and timings/memory stats. It looks like: $ sonar-runner -v Runner version: 2.1-SNAPSHOT Java version: 1.6.0_34, vendor: Sun Microsystems Inc. OS name: "Linux" , version: "3.6.11-1.fc17.x86_64" , arch: "amd64"
        Hide
        Fabrice Bellingard added a comment -

        Manually tested

        Show
        Fabrice Bellingard added a comment - Manually tested
        Hide
        Julien HENRY added a comment -

        ITs will be added later

        Show
        Julien HENRY added a comment - ITs will be added later

          People

          • Assignee:
            Julien HENRY
            Reporter:
            Fabrice Bellingard
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: