* Add golangci-lint as linting tool
* Disable failing staticchecks to start; GitHub issue to handle coming soon
* Run `goimports -w` to repair all source files that have improperly
formatted imports
* makefile: Add ci-lint target to run on travis
This change adds a new make target for running golangci-lint on newly
added Go files only. This target is expected to run during Packer ci builds.
* .github/contributing: Add code linting instructions
* travis: Update job configuration to run parallel builds
go changed formatting behavior between .10 and .11 One option is to
download a specific version of gofmt but rather than do that we are
removing .10 tests.
Packer only supports the latest version of go, so it's unnecessary to
test on prior version. Previously we tested on .9 and .10 because go
changed the way tar encoding worked. We wanted to support .9 so users
would have a b/c option if needed. As we move forward that's become
unnecessary.
There is no real value in continuing to build against versions of Go
which are not the latest (1.10.2 right now). This can easily be
expressed in the `.travis.yml` file as `1.x`, to mean the latest version
in the Go 1 series, which is (presumably) what is being used for
releases.
Keeping older versions around is causing spurious CI failures, and
increases the cycle time to feedback for pull requests: see
hashicorp/packer#6265 for an example of this.
- Fix updatedeps reverting to master, which causes Travis CI to produce invalid results for pull-request builds. The makefile attempts to detect this change and checkout the correct branch if it happens.
- Clean up the code style and failure messaging.
- Add / update proxy targets for common workflows: default, deps, ci, release