Skip to content

Ignore local package references when parsing go.mod at Go117 #1421

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

Merged
merged 5 commits into from
Jun 5, 2025

Conversation

AMaini503
Copy link
Contributor

Ignoring local package references is at parity with go CLI.

Changes

  • GetAllReplacePathDirectivesAsync: This method makes a pass over the go.mod file to collect all replace directives that point to a local path.
  • TryRegisterDependencyFromModLine now skips a dependency if it is supposed to be pointing to a local path. It also logs it for investigation later.
  • Add UT to test replace directives which point to local path and replace directives that point to a version,

@AMaini503 AMaini503 requested a review from a team as a code owner June 5, 2025 07:49
@AMaini503 AMaini503 requested a review from grvillic June 5, 2025 07:49
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 96.62921% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.7%. Comparing base (98619eb) to head (af53a53).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...onentDetection.Detectors/go/Parsers/GoModParser.cs 94.5% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1421   +/-   ##
=====================================
  Coverage   89.7%   89.7%           
=====================================
  Files        407     407           
  Lines      32294   32380   +86     
  Branches    1990    2000   +10     
=====================================
+ Hits       28991   29074   +83     
- Misses      2879    2881    +2     
- Partials     424     425    +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@grvillic grvillic merged commit c2f96db into main Jun 5, 2025
24 of 25 checks passed
@grvillic grvillic deleted the user/aamaini/2287154 branch June 5, 2025 16:13
Copy link

github-actions bot commented Jun 5, 2025

👋 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 🙂

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.

2 participants