commit | 353795180f69faf9cb9e60299877e496f6ba5040 | [log] [tgz] |
---|---|---|
author | Leandro Lovisolo <lovisolo@google.com> | Wed Apr 26 20:33:22 2023 +0000 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Wed Apr 26 20:51:08 2023 +0000 |
tree | fc95221148f2c356a88e44966ff26675e9641121 | |
parent | a0feb85bc8940a5f6b2f7c792134325c669d9eb2 [diff] |
//cmd/presubmit/presubmit.go: Run all checks even in the presence of errors. Currently when a check fails, the presubmit program skips all subsequent checks, and prompts "Are you sure you wish to continue? (y/N)". If we answers yes, potential errors from the skipped checks go unnoticed until the Housekeeper-OnDemand-Presubmit task fails, wasting a CL dry-run cycle. A common example is when one continues despite a long line check failure. Another issue is that presubmit check failures are reported one at a time. For example, if we fix a long line and re-run the presubmit program, another unrelated error might occur, such as a diff introduced by Gazelle. This CL aims to fix both issues by running all checks, even if one or more checks fail. This CL also move reorders the checks so that we first run those checks that might mutate files (gofmt, gazelle, etc.), followed by those that check for rules such as line length, disallowed words, etc. Finally, this CL changes the runPrettier check to rewrite files rather than just checking their format. Change-Id: Ica69b373be9946bd5cf165324ebb57781fbda42a Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/681079 Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Joe Gregorio <jcgregorio@google.com> Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
This repo contains infrastructure code for Skia.
The main source code repository is a Git repository hosted at https://skia.googlesource.com/buildbot.git. It is possible to check out this repository directly with git clone
or via go get
.
Using git clone
allows you to work in whatever directory you want. You will still need to set GOPATH in order to build some apps (recommended to put this in a cache dir). E.g.:
$ cd ${WORKDIR} $ git clone https://skia.googlesource.com/buildbot.git $ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR}) $ mkdir $GOPATH $ cd buildbot
Almost all applications are built with Bazel, and bazelisk is the recommended tool to ensure you have the right version of bazel installed:
go install github.com/bazelbuild/bazelisk@latest go install github.com/bazelbuild/buildtools/buildifier@latest go install github.com/kisielk/errcheck@latest go install golang.org/x/tools/cmd/goimports@latest go install github.com/mikefarah/yq/v4@latest go install go.chromium.org/luci/client/cmd/...@latest
sudo apt-get install jq
bazelisk build --config=mayberemote //...
bazelisk test --config=mayberemote //...
To update generated code run the following in any directory:
go generate ./...
Install Cloud SDK.
Use this command to run the presubmit tests:
./run_unittests --small