Skip to content

User/aamaini/go sort requests#1432

Merged
AMaini503 merged 6 commits into
mainfrom
user/aamaini/go-sort-requests
Jun 11, 2025
Merged

User/aamaini/go sort requests#1432
AMaini503 merged 6 commits into
mainfrom
user/aamaini/go-sort-requests

Conversation

@AMaini503
Copy link
Copy Markdown
Contributor

Previous Go detector used to ignore child directories of already processed directories because go list in parents already accounted for children.
To keep parity with this behavior, Go Detector preprocesses go.mod, go.sum files in order of increasing depth and keeps track of already processed directories.

  • OnPrepareDetectionAsync sorts all process requests in order of depth, fullname making it fully deterministic and stable sort.
  • OnFileFoundAsync now tracks processed project roots if go.mod was successfully parsed and go version in it was >= 1.17
  • Add UTs to verify detector skips child nested directories.

@AMaini503 AMaini503 requested a review from a team as a code owner June 11, 2025 04:01
@AMaini503 AMaini503 requested a review from melotic June 11, 2025 04:01
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.6%. Comparing base (a40ed24) to head (fc46c8f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff           @@
##            main   #1432    +/-   ##
======================================
  Coverage   89.5%   89.6%            
======================================
  Files        404     404            
  Lines      31977   32169   +192     
  Branches    1994    2003     +9     
======================================
+ Hits       28627   28829   +202     
+ Misses      2935    2928     -7     
+ Partials     415     412     -3     

☔ 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.

Comment thread src/Microsoft.ComponentDetection.Detectors/go/GoComponentDetector.cs Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 11, 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 🙂

@AMaini503 AMaini503 merged commit 5289cf1 into main Jun 11, 2025
25 of 26 checks passed
@AMaini503 AMaini503 deleted the user/aamaini/go-sort-requests branch June 11, 2025 08:32
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