GithubHelp home page GithubHelp logo

olsh / dotnet-reqube Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 10.0 139 KB

.NET Core global tool that converts ReSharper inspect code report to SonarQube format

License: MIT License

C# 99.93% JavaScript 0.07%

dotnet-reqube's People

Contributors

a13xs avatar dependabot[bot] avatar marvkaiser avatar michael-handwerker avatar olsh avatar todor avatar tpetrov-rms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dotnet-reqube's Issues

Failed to read external issues report while uploading to SonarQube

Resharper codeinspect does not generate an XML for all my projects in the solution as some of the projects have no issues. Because of that the upload to SonarQube fails because it expects an generated json in all the project folders. So I get the error failed to read external issues report.

Anyone else who experienced this and knows how to deal with this?

Severity Mapping

Hi,

I have two questions/suggestions regarding the mapping of severity as defined in "Constants.cs":
{ "ERROR", "BLOCKER" }, { "WARNING", "CRITICAL" }, { "SUGGESTION", "MAJOR" }, { "HINT", "MINOR" }, { "INFO", "INFO" }

  1. According to ReSharpers documentation, it does not use "INFO". So why is there a mapping from INFO to INFO? (https://www.jetbrains.com/help/resharper/Code_Analysis__Code_Inspections.html#severity)

  2. The mapping from WARNING to CRITICAL seems like an escalation to me. R# WARNINGs "represent serious coding inefficiencies" while a SonarQube CRITICAL item might "cause the application to crash or to corrupt stored data". In my humble opinion, MAJOR would be a better fit for WARNING, althought still not 100% exact because of the different semantics behind the two calssifications. (https://docs.sonarqube.org/7.4/user-guide/rules/)

Greetings

PS: Thanks for sharing this useful tool with the public, I really appreciate it.

Issue with latest 1.20 version

Hi,

With latest version, I got the following error with my code :

"SonarQube C# Analysis Fails to 'Not a Valid Line Offset for Pointer'"

It looks like the convertion to sonar does not compute correct end of line.

Here is resharper line :

<Issue TypeId="RedundantUsingDirective" File="src\CampaignManagement.api\Controllers\v1\BlacklistController.cs" Offset="174-215" Line="7" Message="Using directive is not required by the code and can be safely removed" />

It is converted to :

         "engineId":"R#",
         "primaryLocation":{
            "filePath":"D:\\Projects\\git\\CampainManagement.api\\src\\CampaignManagement.api\\Controllers\\v1\\BlacklistController.cs",
            "message":"Using directive is not required by the code and can be safely removed",
            "textRange":{
               "endColumn":42,
               "endLine":7,
               "startColumn":1,
               "startLine":7
            }
         },
         "ruleId":"RedundantUsingDirective",
         "severity":"MAJOR",
         "type":"CODE_SMELL"
      }```

End of column should be 41 not 42.

Release Master Branch to Nuget

Dear @olsh,

please release the master branch to Nuget in order to use this package with the latest changes (bump .NET version to 6.0).

Thanks in advance!

sonarReport.ProjectName can be not unique

_reportPathsByProject.Add(sonarReport.ProjectName, Path.GetFullPath(filePath));

Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: ElasticSearchIndexer
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at ReQube.SonarConverter.WriteReport(String filePath, ISonarReport sonarReport) in C:\projects\reqube\src\dotnet-reqube\SonarConverter.cs:line 272
   at ReQube.SonarConverter.ConvertSolution(Report report, Options options) in C:\projects\reqube\src\dotnet-reqube\SonarConverter.cs:line 198
   at ReQube.SonarConverter.Convert() in C:\projects\reqube\src\dotnet-reqube\SonarConverter.cs:line 60
   at ReQube.Program.<Run>b__1_0(Options options) in C:\projects\reqube\src\dotnet-reqube\Program.cs:line 24
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at ReQube.Program.Run(String[] args) in C:\projects\reqube\src\dotnet-reqube\Program.cs:line 23
   at ReQube.Program.Main(String[] args) in C:\projects\reqube\src\dotnet-reqube\Program.cs:line 19
PS C:\Users\PavelAgejkin\Downloads\jetbrains.com\JetBrains.ReSharper.CommandLineTools.2022.1.2> s

I have solution with two ElasticSearchIndexer projects.
One in folder Services and one in root folder.

1.0.5+ complains that solution file not exists. (centos 7)

Here is the error message:
22:17:18 INF] Reading input file ReSharperReport.xml... Unhandled exception. System.IO.FileNotFoundException: Solution file /var/jenkins/workspace/Efficiency-COOP_sonar-test_qa/cop\Cop.sln does not exist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.