diff options
author | Chris Evich <cevich@redhat.com> | 2018-11-12 16:51:47 -0500 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2018-11-13 07:55:07 -0500 |
commit | 86d1196f9b30149fa937f7c6680d951c5e4ac997 (patch) | |
tree | cc3451a3059a97384a81bbb27564fb56171d479e /CONTRIBUTING.md | |
parent | d5375b59aafbf50c862bfb5ff895d4575375f1e7 (diff) | |
download | podman-86d1196f9b30149fa937f7c6680d951c5e4ac997.tar.gz podman-86d1196f9b30149fa937f7c6680d951c5e4ac997.tar.bz2 podman-86d1196f9b30149fa937f7c6680d951c5e4ac997.zip |
Standardized container image for gofmt and lint
Having a standardized image allows uniform application of format and
lint checking across multiple host platforms. This ensures all
contributors and disparate CI systems to play by a common set of basic
rules. It also makes it easier to maintain the common rules over-time.
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4e208894..8e921dcf3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -180,6 +180,27 @@ Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. +### Go Format and lint + +All code changes must pass ``make validate`` and ``make lint``, as +executed in a standard container. The container image for this +purpose is provided at: ``quay.io/libpod/gate:latest``. However, +for changes to the image itself, it may also be built locally +from the repository root, with the command: + +``` +sudo podman build -t quay.io/libpod/gate:latest -f contrib/gate/Dockerfile . +``` + +The container executes 'make' by default, on a copy of the repository. +This avoids changing or leaving build artifacts in your working directory. +Execution does not require any special permissions from the host. However, +the repository root must be bind-mounted into the container at +'/usr/src/libpod'. For example, running `make lint` is done (from +the repository root) with the command: + +``sudo podman run -it --rm -v $PWD:/usr/src/libpod:z quay.io/libpod/gate:latest lint`` + ### Integration Tests Our primary means of performing integration testing for libpod is with the |