Skip to content

Refactor lockfile package structure#86

Merged
piloulacdog merged 8 commits intomainfrom
pierrelouis.lacorte/refactor-lockfile
Nov 27, 2025
Merged

Refactor lockfile package structure#86
piloulacdog merged 8 commits intomainfrom
pierrelouis.lacorte/refactor-lockfile

Conversation

@piloulacdog
Copy link
Copy Markdown
Contributor

@piloulacdog piloulacdog commented Nov 26, 2025

Summary

Refactored the lockfile package architecture to improve code organization:

  • Split monolithic lockfile package into language-specific subpackages (java, python, javascript, ruby, golang, etc.)
  • Split types.go into dedicated type files within each subpackage

Example:

pkg/lockfile/parse-npm-lock.go     → pkg/lockfile/javascript/parse-npm-lock.go
pkg/lockfile/parse-maven-lock.go   → pkg/lockfile/java/parse-maven-lock.go
pkg/lockfile/types.go              → pkg/lockfile/{language}/types.go

This improves code maintainability and makes dependencies clearer.

🧪 Tests

Did a full run of the sbom-generator before and after the change on the 87 repositories: no change

@piloulacdog piloulacdog requested a review from a team as a code owner November 26, 2025 18:26
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 26, 2025

Go test coverage report

Total test coverage: 90.0% (4140/4599)

Test coverage has changed in the current files, with 220 lines missing coverage.
file: uncovered: current coverage: base coverage:
internal/testutility/normalize.go 6 87.2% (41/47) 91.4% (32/35)
pkg/lockfile/dart/parse-pubspec-lock.go 2 94.1% (32/34) /
pkg/lockfile/dotnet/match-nuget-csproj.go 2 91.3% (21/23) /
pkg/lockfile/dotnet/parse-nuget-csproj.go 4 96.5% (110/114) /
pkg/lockfile/elixir/parse-mix-lock.go 4 86.7% (26/30) /
pkg/lockfile/golang/go-binary.go 5 82.1% (23/28) /
pkg/lockfile/golang/parse-go-lock.go 1 98.6% (73/74) /
pkg/lockfile/internal/testutil/helpers.go 29 52.5% (32/61) /
pkg/lockfile/internal/testutil/matcher-helpers.go 1 92.3% (12/13) /
pkg/lockfile/java/match-build-gradle.go 6 91.7% (66/72) /
pkg/lockfile/java/parse-gradle-lock.go 1 97.0% (32/33) /
pkg/lockfile/java/parse-maven-lock.go 24 90.9% (241/265) /
pkg/lockfile/javascript/match-package-json.go 21 79.6% (82/103) /
pkg/lockfile/javascript/node-modules.go 1 83.3% (5/6) /
pkg/lockfile/javascript/parse-npm-lock.go 8 95.9% (187/195) /
pkg/lockfile/javascript/parse-pnpm-v9-lock.go 3 96.4% (81/84) /
pkg/lockfile/javascript/parse-yarn-lock.go 8 95.8% (184/192) /
pkg/lockfile/javascript/pnpm-legacy-lock.go 28 69.9% (65/93) /
pkg/lockfile/javascript/types.go 2 83.3% (10/12) /
pkg/lockfile/php/match-composer.go 1 95.8% (23/24) /
pkg/lockfile/python/match-pipfile.go 1 97.0% (32/33) /
pkg/lockfile/python/parse-requirements-txt.go 4 97.7% (169/173) /
pkg/lockfile/python/parse-uv-lock.go 2 95.7% (45/47) /
pkg/lockfile/renv/parse-renv-lock.go 1 93.3% (14/15) /
pkg/lockfile/ruby/match-gemfile.go 19 82.9% (92/111) /
pkg/lockfile/ruby/match-gemspec.go 14 82.7% (67/81) /
pkg/lockfile/ruby/parse-gemfile-lock.go 6 91.5% (65/71) /
pkg/lockfile/system/apk-installed.go 13 74.5% (38/51) /
pkg/lockfile/system/dpkg-status.go 3 95.8% (69/72) /

@piloulacdog piloulacdog merged commit 0d86328 into main Nov 27, 2025
10 checks passed
@piloulacdog piloulacdog deleted the pierrelouis.lacorte/refactor-lockfile branch November 27, 2025 10:47
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