Skip to content

ci(docs): pin swag in a dedicated Go tools module - #782

Merged
tobiasehlert merged 2 commits into
mainfrom
pin-swag-go-tool
Oct 17, 2026
Merged

tobiasehlert merged 2 commits into
mainfrom
pin-swag-go-tool

Conversation

@tobiasehlert

Copy link
Copy Markdown
Member

The documentation workflow installs swag with @latest, making release documentation builds unpredictable and triggering SonarQube rule githubactions: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 runs go 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 /tools to 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.

tobiasehlert and others added 2 commits October 17, 2026 14:57
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>
@tobiasehlert tobiasehlert added dependencies Pull requests that update a dependency file github_actions Pull requests that update Github_actions code go Pull requests that update Go code labels Oct 17, 2026
@tobiasehlert tobiasehlert self-assigned this Oct 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.17%. Comparing base (4b8cade) to head (b53bf17).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tobiasehlert
tobiasehlert merged commit ee5fe5f into main Oct 17, 2026
8 checks passed
@tobiasehlert
tobiasehlert deleted the pin-swag-go-tool branch October 17, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update Github_actions code go Pull requests that update Go code

Development

Successfully merging this pull request may close these issues.

1 participant