Proposal: split & containerize hack/validate

My proposal is to split into a new repo, and containerize it so that the scripts can be reused across all the relevant repos.

$ docker run -v ~/gopath:/go moby/validator:latest


Discussed on slack

  • Rather, deprecate hack/validate
  • Use gometalinter
  • Use vndr --check (unimplemented yet)

So, my next proposal is to

  • Close
  • Remove moby/moby/hack/validate (directory), and create moby/moby/ (single script file).
    – go-get gometalinter and vndr if not installed
    – run gometalinter with our own custom config
    – check manually modified files by running git status ..., rather than relying on vndr should not depend on another file, and should be ready for curl | bash.

Moby-related projects should contain curl | bash in their CI configuration file (e.g. .travis.yml)

cc @dnephin @vieux

I don’t think a single is going to work for all repos. Each repo is going to have slightly different validations, and different gometalinter thresholds.

At the very least the gometalinter.json has to be in the repo itself not bundled with the other validation.

Things like checking generated code, and config files are very specific to a repo.

I think an image or package that handles all the vendor validation sounds good. It can be a self contained unit that is used the same way in every repo.

I don’t really agree that vndr is the wrong place for this check. If LK4D4 doesn’t want to support it that’s fine. Maybe we can fork and add the check, or create a go tool that imports vndr and does both?

gometalinter is already a well defined tool, we just add a config from the repo.
With a vendor checking tool we should be set for most repos. We can add other custom stuff as necessary in the repo that uses it.

I think is is ok to close this “issue”.
(No “close this issue” button?) (EDIT: I found the “solve” button)