Details

    • Number of attachments :
      0

      Description

      From: http://sonarqube.15.x6.nabble.com/sonar-dev-Call-for-beta-users-Net-ReSharper-plugin-tp5018620p5019007.html

      I've made some first tests on your plugin, and here's my first feedback:

      • I installed the plugin, and directly launched a first analysis on 1 one my projects: the ReSharper plugin did not run. I could see in the log that the plugin would not execute because its mode was set to "skip". What's weird is that I had not set any property at all (except the path to the JetBrains command line tools folder). In order to make it work, I had to set "sonar.resharper.mode=reuseReports": in this case, the command line tool got executed (whereas "reuseReports" is not meant for that), and I could get the results in SonarQube
      • I had a quick look at your code and I don't know what can be wrong here. I did not investigate further though.

        Activity

        Hide
        John Wright added a comment -

        Regarding the execution mode, I found a couple of interesting things:

        The plugin had a default value for 'sonar.resharper.mode' of SKIP, so if a user didn't include any entry in the sonar-project.properties file, it would skip execution. I have changed this to follow the pattern of the other dotnet ecosystem plugins where the default value is "" (run the tool during sonar-runner execution).

        The other thing I found is this:
        The reason 'reuseReports' ran the tool during execution for you is because I use the dotnet ecosystem constant AbstractDotNetSensor.MODE_REUSE_REPORT, which is the singular 'reuseReport'. What I discovered was that if the user provides an invalid value for execution mode (not one of these: "", "reuseReport", "skip"), the code would just attempt to run the tool. So if you set the value to "notReal", you would see the same behavior you saw with the plural "reuseReports".

        What I also discovered was that this same behavior can be found in the other dotnet plugins, such as FxCop.

        I'm changing the dotnet-resharper plugin to throw an exception (thus stop analysis) in the case of an unsupported run mode. You may want to consider the same changes to the other dotnet plugins. (If you agree, I can submit a pull request with the changes).

        Show
        John Wright added a comment - Regarding the execution mode, I found a couple of interesting things: The plugin had a default value for 'sonar.resharper.mode' of SKIP, so if a user didn't include any entry in the sonar-project.properties file, it would skip execution. I have changed this to follow the pattern of the other dotnet ecosystem plugins where the default value is "" (run the tool during sonar-runner execution). The other thing I found is this: The reason 'reuseReports' ran the tool during execution for you is because I use the dotnet ecosystem constant AbstractDotNetSensor.MODE_REUSE_REPORT, which is the singular 'reuseReport'. What I discovered was that if the user provides an invalid value for execution mode (not one of these: "", "reuseReport", "skip"), the code would just attempt to run the tool. So if you set the value to "notReal", you would see the same behavior you saw with the plural "reuseReports". What I also discovered was that this same behavior can be found in the other dotnet plugins, such as FxCop. I'm changing the dotnet-resharper plugin to throw an exception (thus stop analysis) in the case of an unsupported run mode. You may want to consider the same changes to the other dotnet plugins. (If you agree, I can submit a pull request with the changes).
        Show
        John Wright added a comment - https://github.com/SonarCommunity/sonar-dotnet-resharper/commit/ca406d954ec5a32d523b77c1ff4645e603dbc20a

          People

          • Assignee:
            John Wright
            Reporter:
            John Wright
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: