Skip to content

hack/tests/sanity-check.sh: ignore go.mod changes caused by go vet #2073

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ go:
# so we can use it to create a bunch of common build step
# YAML anchors which we use in our build jobs.
x_base_steps:
# before_install for jobs that require dep
- &dep_before_install
before_install:
- travis_retry make tidy

# before_install for jobs that require go builds and do not run for doc-only changes
- &go_before_install
before_install:
Expand Down Expand Up @@ -151,7 +146,6 @@ jobs:
name: Unit, Sanity, and Markdown Tests
# Currently, prow/api-ci tests all PRs that target master; use travis for post merge testing and non-master PRs
if: type != pull_request OR branch != master
<<: *dep_before_install
script: make test/sanity test/unit test/markdown
after_success: echo 'Tests Passed'
after_failure: echo 'Failure in unit, sanity, or markdown test'
Expand Down
10 changes: 9 additions & 1 deletion hack/tests/sanity-check.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/usr/bin/env bash
set -ex

# Make sure repo is in clean state before running go vet
git diff --exit-code

go mod tidy
go vet ./...
go fmt ./...

# Ignore changes to go.mod caused by running go vet
git checkout go.mod

./hack/check_license.sh
./hack/check_error_log_msg_format.sh

# Make sure repo is in clean state
# Make sure repo is still in a clean state.
git diff --exit-code