Skip to content

Commit

Permalink
Merge pull request #28 from deogracia/issue-GH-23
Browse files Browse the repository at this point in the history
add gocyclo's step
  • Loading branch information
deogracia authored Oct 21, 2020
2 parents 29a4ae8 + 8b76fe6 commit b55a544
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
which gox
go get golang.org/x/lint/golint
which golint
go get github.com/fzipp/gocyclo/cmd/gocyclo
which gocyclo
cd $GITHUB_WORKSPACE/$checkout_dir
make ci_windows
- name: Archive artifacts
Expand Down Expand Up @@ -55,6 +57,7 @@ jobs:
go get github.com/securego/gosec/cmd/gosec
go get github.com/mitchellh/gox
go get golang.org/x/lint/golint
go get github.com/fzipp/gocyclo/cmd/gocyclo
cd $GITHUB_WORKSPACE/$checkout_dir
make ci
- name: Build BSD artefacts
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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 quality
.PHONY: lint quality gocyclo

all: clean install_deps quality security test build

Expand Down Expand Up @@ -30,11 +30,16 @@ security_w:
@echo "[OK] Go security check is done!"

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

quality: check_fmt vet lint
gocyclo:
$(info ***************** gocyclo ************************************)
gocyclo -total-short -over 10 .
@echo "[OK] gocyclo is done!"

quality: check_fmt vet lint gocyclo

build: output
make -f build.make all
Expand Down
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

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

0 comments on commit b55a544

Please sign in to comment.