component-detection icon indicating copy to clipboard operation
component-detection copied to clipboard

refactor(go): split `go.mod` and `go.sum` parsing

Open melotic opened this issue 2 years ago • 2 comments

Splits the parsing for go.mod files and go.sum files into two seperate helper classes.

This helps to declutter the go detector, which has 3 jobs to do. Now the go detector's main code is for go cli scanning, the happy path.

melotic avatar Aug 29 '23 21:08 melotic

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

github-actions[bot] avatar Aug 29 '23 22:08 github-actions[bot]

Codecov Report

Merging #753 (09a28ce) into main (e4c43e3) will decrease coverage by 0.02%. The diff coverage is 76.63%.

@@            Coverage Diff             @@
##             main     #753      +/-   ##
==========================================
- Coverage   69.29%   69.27%   -0.02%     
==========================================
  Files         227      229       +2     
  Lines        9756     9759       +3     
==========================================
+ Hits         6760     6761       +1     
- Misses       2996     2998       +2     
Files Changed Coverage Δ
...ComponentDetection.Detectors/go/GoModFileParser.cs 66.66% <66.66%> (ø)
...onentDetection.Detectors/go/GoComponentDetector.cs 88.73% <100.00%> (+3.69%) :arrow_up:
...ComponentDetection.Detectors/go/GoSumFileParser.cs 100.00% <100.00%> (ø)

codecov-commenter avatar Aug 29 '23 22:08 codecov-commenter