Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-checks: added golangci-lint to run-checks #14464

Merged
merged 8 commits into from
Sep 17, 2024
Prev Previous commit
Next Next commit
tests: added golagnci-lint skip in spread test
  • Loading branch information
maykathm committed Sep 6, 2024
commit 5509ae93197a724621f6184297aca24c68d32867
3 changes: 3 additions & 0 deletions tests/unit/go/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ execute: |
skip="${skip:-} SKIP_NAKEDRET=1"
fi

# To avoid checking old code, skip golangci-lint
skip="${skip:-} SKIP_GOLANG_CI_LINT=1"

Copy link
Member

Choose a reason for hiding this comment

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

If the concern is about checking old code, could we inject a variable with BASE_REF into these spread tests?

If it's just about not redoing the lint checks on every system, I'd rather adjust the comment to say as much.

FWIW, I think it's probably fine to skip golangci-lint checks in spread, as this just checks source code and should be system-agnostic. And the spread systems probably don't have the golangci-lint installed anyway.

if not os.query is-trusty; then
if [ "$VARIANT" = "static" ] ; then
tests.session -u test exec sh -c "cd /tmp/static-unit-tests/src/github.com/snapcore/snapd && \
Expand Down
Loading