commit | 75a8cab02822e08615065e324784512269dfe8e2 | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Sat May 11 17:17:58 2019 +0200 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Sat May 11 17:17:58 2019 +0200 |
tree | 4c94940c15f77b17aa37ff4dd53109d0a7aa3c70 | |
parent | a0e7924503d530f8ac9346ef023bd473365288ff [diff] |
gerrit: remove superfluous setRequest
This is a style verifier intended to be used with the Gerrit checks plugin.
go install github.com/bazelbuild/buildtools/buildifier curl -o google-java-format.jar https://github.com/google/google-java-format/releases/download/google-java-format-1.7/google-java-format-1.7-all-deps.jar
Obtain an HTTP password, and put it in testsite-auth
. The format is username:secret
.
Register a checker
go run ./cmd/checker -auth_file=testsite-auth --gerrit http://localhost:8080 \ --language go --repo gerrit --register
go run ./cmd/checker -auth_file=testsite-auth --gerrit http://localhost:8080 \ --list
go run ./cmd/checker -auth_file=testsite-auth --gerrit http://localhost:8080
For simplicity of deployment, gerritfmt checker is stateless. All the necessary data is encoded in the checker UUID
handle file types (symlink) and deletions
more formatters: clang-format, typescript, jsformat, ... ?
isolate each formatter to run with a separate gvisor/docker container.
tests: the only way to test this reliably is to spin up a gerrit server, and create changes against the server.
Update the list of checkers periodically.
This currently runs the formatters without sandboxing. Critical bugs (heap overflow, buffer overflow) in formatters can be escalated to obtain the OAuth2 token used for authentication.
The currently supported formatters are written in Java and Go, so this should not be an issue.
This is not an official Google product