Skip to content

CI: Add lint job, consolidate yamllint#68

Merged
jeffwidman merged 1 commit intomainfrom
ci-add-go-lint-checks
Mar 13, 2026
Merged

CI: Add lint job, consolidate yamllint#68
jeffwidman merged 1 commit intomainfrom
ci-add-go-lint-checks

Conversation

@jeffwidman
Copy link
Member

@jeffwidman jeffwidman commented Mar 13, 2026

Add a dedicated lint job to ci.yml running on ubuntu-latest:

  • yamllint — moved from standalone yamllint.yml workflow
  • go mod tidy -diff — fails if go.mod/go.sum are out of sync
  • gofmt check — fails if any non-vendor Go files are unformatted, showing the diff
  • go build ./... — for clearer compile error messages
  • go vet ./... — catches suspicious but compilable code (reuses build cache)

These checks are platform-independent so they run once on Ubuntu.

Also deletes the standalone yamllint.yml workflow since it is now consolidated here.

@jeffwidman jeffwidman requested a review from a team as a code owner March 13, 2026 01:01
Copilot AI review requested due to automatic review settings March 13, 2026 01:01
@jeffwidman jeffwidman force-pushed the ci-add-go-lint-checks branch from 8d7722a to f738868 Compare March 13, 2026 01:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional Go hygiene checks to the build-codeql CI job to catch dependency drift, formatting issues, and suspicious-but-compilable code earlier in PRs.

Changes:

  • Add go mod tidy -diff to fail CI when go.mod/go.sum are out of sync.
  • Add a gofmt validation step that prints diffs for unformatted files (excluding vendor/).
  • Add go vet ./... after go build to catch issues with build cache already warmed.

@jeffwidman jeffwidman marked this pull request as draft March 13, 2026 01:05
@jeffwidman jeffwidman force-pushed the ci-add-go-lint-checks branch from 13b7d31 to 81dee31 Compare March 13, 2026 01:16
Add a dedicated lint job to ci.yml running on ubuntu-latest:
- yamllint (moved from standalone yamllint.yml workflow)
- go mod tidy -diff
- gofmt check (excluding vendor/) with diff output on failure
- go build ./... (for clearer compile errors)
- go vet ./... (reuses build cache)

These checks are platform-independent so they don't need to run
in the build-codeql matrix across all three OSes.
@jeffwidman jeffwidman force-pushed the ci-add-go-lint-checks branch from 81dee31 to bc86e97 Compare March 13, 2026 01:17
@jeffwidman jeffwidman marked this pull request as ready for review March 13, 2026 01:17
@jeffwidman jeffwidman changed the title CI: Add go mod tidy, gofmt, and go vet checks to build-codeql CI: Add lint job, consolidate yamllint Mar 13, 2026

lint:
name: Lint
runs-on: ubuntu-latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered ubuntu-slim, but since this has go build (required for go vet) I decided to stick with ubuntu-latest...

Not a big deal either way.

@jeffwidman jeffwidman merged commit 28bb8c4 into main Mar 13, 2026
176 of 182 checks passed
@jeffwidman jeffwidman deleted the ci-add-go-lint-checks branch March 13, 2026 17:08
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.

3 participants