Skip to content

Commit

Permalink
add a golint step
Browse files Browse the repository at this point in the history
ref #22
  • Loading branch information
deogracia committed Oct 21, 2020
1 parent 64f25d2 commit 61495c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ OUTPUT="./output"
SRC=$(shell find . -name "*.go")

.PHONY: all clean ci build build_vanilla build_bsd test check_fmt fmt vet security security_w
.PHONY: lint go_checks

all: clean install_deps security test build
all: clean install_deps go_checks security test build

# ci*: run tests & build ouput based on runing OS
ci: clean install_deps security test build_vanilla
ci_windows: clean install_deps security_w test build_vanilla
ci: clean install_deps go_checks security test build_vanilla
ci_windows: clean install_deps go_checks security_w test build_vanilla

output:
$(info ***************** Create "output" directory ***********************************)
Expand All @@ -20,14 +21,21 @@ clean:

security:
$(info ***************** Security ***********************************)
@gosec ./...
gosec ./...
@echo "[OK] Go security check is done!"

security_w:
$(info ***************** Security ***********************************)
@gosec "./..."
gosec "./..."
@echo "[OK] Go security check is done!"

lint:
$(info ***************** Lint ***********************************)
golint -set_exit_status ./...
@echo "[OK] Go linting is done!"

go_checks: check_fmt vet lint

build: output
make -f build.make all

Expand All @@ -43,7 +51,7 @@ test: check_fmt vet

install_deps:
$(info ***************** Install dependancies ***********************************)
@go get ./...
go get ./...
@echo "[OK] Go dependancies is get!"

check_fmt:
Expand All @@ -57,7 +65,7 @@ fmt:

vet:
$(info ***************** Run go vet ***********************************)
@go vet ./...
go vet ./...
@echo "[OK] Go vet is done!"

# vi:syntax=make
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jntpdn --port 80 --file /where/my/file/is

### Development & build's dependancies

* [golint](https://github.com/golang/lint)
* [goreleaser](https://github.com/goreleaser/goreleaser)
* [gosec](https://github.com/securego/gosec)
* [gox](https://github.com/mitchellh/gox)
Expand Down

0 comments on commit 61495c3

Please sign in to comment.