Repository navigation
ci(docs): pin swag in a dedicated Go tools module - #782
Merged
Merged
Conversation
Replace 'go install ...@latest' with a dedicated tools/go.mod that declares swag as a Go tool, so the version is locked and checksum verified. Add /tools to Dependabot gomod directories. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #782 +/- ##
=======================================
Coverage 85.17% 85.17%
=======================================
Files 24 24
Lines 3448 3448
=======================================
Hits 2937 2937
Misses 369 369
Partials 142 142 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The documentation workflow installs swag with
@latest, making release documentation builds unpredictable and triggering SonarQube rulegithubactions:S8545.Declare swag v1.16.6 as a Go tool in a separate root-level
tools/module, with checked-in dependency versions and checksums. The workflow now runsgo tool -modfile=tools/go.mod swag init --dir=src/and selects its Go version from that same module, keeping tooling separate from application dependencies and avoiding toolchain mismatches.Add
/toolsto Dependabot's Go module directories so swag can receive automated version updates.Validation: generated Swagger JSON and YAML match the previous installation approach, and the application builds successfully. The release-triggered workflow has not been run.