mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Updated Makefile and Tavis config to include lint and vet tasks
This commit is contained in:
@@ -3,13 +3,20 @@ go:
|
||||
- 1.11.x
|
||||
services:
|
||||
- docker
|
||||
env:
|
||||
global:
|
||||
- GO111MODULE=on
|
||||
before_install:
|
||||
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
|
||||
- cd ui/v1
|
||||
- yarn install
|
||||
- ./node_modules/@angular/cli/bin/ng build --prod
|
||||
- cd ../..
|
||||
script: go test
|
||||
- go get -v golang.org/x/lint/golint
|
||||
script:
|
||||
- make lint
|
||||
- make vet
|
||||
- go test
|
||||
before_deploy:
|
||||
- docker pull bepsays/ci-goreleaser
|
||||
- go get -u github.com/gobuffalo/packr/v2/packr2
|
||||
|
||||
19
Makefile
19
Makefile
@@ -4,5 +4,22 @@ build:
|
||||
install:
|
||||
packr2 install
|
||||
|
||||
# Regenerates GraphQL files
|
||||
.PHONY: gqlgen
|
||||
gqlgen:
|
||||
go run scripts/gqlgen.go
|
||||
go run scripts/gqlgen.go
|
||||
|
||||
# Runs gofmt -w on the project's source code, modifying any files that do not match its style.
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
go list ./... | grep -v vendor | xargs go fmt
|
||||
|
||||
# Runs go vet on the project's source code.
|
||||
# https://stackoverflow.com/questions/40531874/how-to-make-go-linters-ignore-vendor
|
||||
.PHONY: vet
|
||||
vet:
|
||||
go list ./... | grep -v vendor | xargs go vet
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
go list ./... | grep -v vendor | xargs golint -set_exit_status
|
||||
Reference in New Issue
Block a user