Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Users/jcfiorenzano23/go 117 experiment #1359

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jcfiorenzano
Copy link
Contributor

This PR introduces a new experimental detector for go. The main difference of this detector with respect to the usual one is that only relies on the information coming in the go.mod file to parse the components and go.mod after 1.17 introduces all types of dependencies, not only direct ones. This is already supported by the default go detector but only if fallback is enabled as the default behavior is to parse the result coming from the go list command.

This detector also adds the characteristic that also uses the go graph command to create the graph of dependencies between the components. This feature is only available in the default detector when parsing the information coming from the CLI.

To simplify the sharing of code between both detectors, the PR also refactored the default detector and extract the different parsers to its own file:

  • GoModParser
  • GoSumParser
  • GoCLIParser

@jcfiorenzano jcfiorenzano requested a review from a team as a code owner February 13, 2025 19:52
Copy link

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 76.70251% with 130 lines in your changes missing coverage. Please review.

Project coverage is 89.2%. Comparing base (a209393) to head (0b28def).

Files with missing lines Patch % Lines
...ntDetection.Detectors/go/Go117ComponentDetector.cs 69.1% 36 Missing and 6 partials ⚠️
...ion.Detectors/go/Utils/GoDependencyGraphUtility.cs 31.3% 32 Missing and 3 partials ⚠️
...onentDetection.Detectors/go/Parsers/GoCLIParser.cs 79.8% 18 Missing and 3 partials ⚠️
...entDetection.Detectors/go/Utils/GoDetectorUtils.cs 37.9% 15 Missing and 3 partials ⚠️
...onentDetection.Detectors/go/Parsers/GoModParser.cs 80.0% 8 Missing and 2 partials ⚠️
...tDetection.Detectors/go/Parsers/GoParserFactory.cs 85.7% 1 Missing and 1 partial ⚠️
...onentDetection.Detectors/go/GoComponentDetector.cs 97.6% 1 Missing ⚠️
...ion.Detectors.Tests/Go117ComponentDetectorTests.cs 98.9% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1359     +/-   ##
=======================================
- Coverage   89.3%   89.2%   -0.2%     
=======================================
  Files        384     393      +9     
  Lines      30156   30452    +296     
  Branches    1841    1853     +12     
=======================================
+ Hits       26952   27171    +219     
- Misses      2812    2879     +67     
- Partials     392     402     +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant