Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add DotNet and NuGet package managers including tests #1303

Conversation

neubs-bsi
Copy link
Contributor

@neubs-bsi neubs-bsi commented Feb 18, 2019

This pull request introduces two new managers (dotnet and Nuget) that handle .NET dependency management.

Added:

  • Two Managers:
    • DotNet: dotnet manager analyses files ending with ".csproj"
    • Nuget: nuget manager analyses files "package.config"
    • DotNetSupport: is responsible for mapping the dependencies on the model. The information is retrieved from the Nuget API and dependencies are crawled
  • Tests:
    • DotNetSupportTest: tests special cases for dependency resolution
      • coverage is at 96% for the classes and 88% of lines
    • NugetTest: tests a test nuget file included in funTests/assets//projects/synthetics
      • coverage is at 75% for the classes and 91% of lines
    • DotNetTest: tests a test dotnet file included in funTests/assets/projects/synthetics
      • coverage is at 75% for the classes and 91% of lines

Deficencies:

  • most dependencies provided by the nuget API do not contain a repository url and none contain source artifacts. only binary artifacts are provided. So scanning the project is probably not meaningful
  • The dependencies are a bit like NPM, they go very deep. Hence, enormous result files are created and the analysing takes a while, since everything needs to be retrieved from the API.
  • Currently when getting the component information from the Nuget API a range of versions is given for the dependencies and the most recent is chosen. This is not the best solution and should be improved to chose the version a package manager would use.

This change is Reviewable

@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch from 18b98ab to 716fc31 Compare February 18, 2019 10:28
@sschuberth sschuberth added analyzer About the analyzer tool new feature labels Feb 18, 2019
@sschuberth
Copy link
Member

Thanks @neubs-bsi for the contribution! I see at least one detekt issue being reported in CI. Please run ./gradlew detekt locally and fixup any reported issues to see if CI will pass.

@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch 5 times, most recently from f0c2e41 to 4176d93 Compare February 20, 2019 11:59
@sschuberth
Copy link
Member

Congrats @neubs-bsi, CI is passing! However, it will probably take us a few days to get started with the review.

@sschuberth sschuberth self-requested a review February 20, 2019 13:30
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch 3 times, most recently from 3f7864b to fe92e69 Compare February 26, 2019 09:49
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch 5 times, most recently from e68c876 to 899c880 Compare March 11, 2019 09:30
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch 2 times, most recently from 1a56ae0 to c3121d8 Compare March 18, 2019 09:56
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch from c3121d8 to 92bd3a4 Compare March 25, 2019 08:08
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch 2 times, most recently from 1fb66b4 to 0676ed6 Compare April 3, 2019 07:24
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch from 0676ed6 to 19eee0c Compare April 3, 2019 08:42
@sschuberth
Copy link
Member

@neubs-bsi don't worry about the failing tests, we need to update some expected results, see #1420. Once that is merged to master, please rebase your PR once more.

@sschuberth
Copy link
Member

@neubs-bsi, feel free to rebase now!

Signed-off-by: Stephanie Neubauer <Stephanie.Neubauer@bosch-si.com>
@neubs-bsi neubs-bsi force-pushed the neubs-bsi/addDotNetNugetManager branch from 19eee0c to 9eaf29d Compare April 3, 2019 14:28
@sschuberth sschuberth merged commit b523174 into oss-review-toolkit:master Apr 3, 2019
@sschuberth sschuberth changed the title DotNet: added dotnet and nuget managers including tests Add DotNet and NuGet package managers including tests Apr 4, 2019
@neubs-bsi neubs-bsi deleted the neubs-bsi/addDotNetNugetManager branch June 27, 2019 08:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
analyzer About the analyzer tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants