Closed eine closed 6 years ago
I don't know what gofmt and goimport do.
gofmt
formats the code. gomimport
updates the import lines if something is missing or removing unused ones.
Should we enable vendoring and add vendor to the cache...?
I don't believe it's needed.
Do we need to run gometalinter ./...? Is not gometaliner enough?
Yes, gometalinter ./...
is needed.
Do we need to test against
tip
?
No, but let's always use the latest Go version.
gofmt
formats the code.gomimport
updates the import lines if something is missing or removing unused ones.
Without ./...
some of the files were not being processed. It works as expected now.
No, but let's always use the latest Go version.
The latest stable one (golang:alpine
) or the beta (golang:rc-alpine
)?
Stable 😄
As commented in 1#, this PR uses docker image filebrowser/dev to run all the tests. Also, a stage is added where caddy is built, in order to ensure that plugins are properly embedded.
There are some issues I am not sure about:
gofmt
andgoimport
do. I executed gometalinter after modifying some sources and I got no output:docker run --rm -itv $(pwd):/go/src/github.com/filebrowser/caddy filebrowser/dev sh -c "cd .. && rm -rf filebrowser && cd caddy && gometalinter --exclude='rice-box.go' --deadline=300s"
vendor
to the cache as in filebrowser/filebrowser/master/build/run_gometalinter.sh, in order to reduce the execution time?gometalinter ./...
? Is notgometaliner
enough?tip
? If so, we can either:filebroser/dev:rc
image to filebrowser/filebrowser/tree/chore/devenv and use it.