diff --git a/.hookz.yaml b/.hookz.yaml deleted file mode 100644 index 0706261..0000000 --- a/.hookz.yaml +++ /dev/null @@ -1,49 +0,0 @@ - version: 2.4.0 - sources: - - source: github.com/devops-kung-fu/hinge@latest - - source: github.com/kisielk/errcheck@latest - - source: honnef.co/go/tools/cmd/staticcheck@latest - - source: github.com/fzipp/gocyclo/cmd/gocyclo@latest - - source: golang.org/x/vuln/cmd/govulncheck@latest - hooks: - - type: pre-commit - actions: - - name: "git: Pull (Ensure there are no upstream changes that are not local)" - exec: git - args: ["pull"] - - name: "go: Tidy mod file" - exec: go - args: ["mod", "tidy"] - - name: "go: Update all dependencies to latest" - exec: go - args: ["get", "-u", "./..."] - - name: "gofmt: Run gofmt to format the code" - exec: gofmt - args: ["-s", "-w", "**/*.go"] - # - name: "staticcheck: Lint all go files" - # exec: staticcheck - # args: ["-f", "stylish", "-checks", "all", "./..."] #to error out, add the arg "-set_exit_status" - - name: "errcheck: Ensure that errors are checked" - exec: errcheck - args: ["-ignoretests", "./..."] - - name: "govulncheck: Check for vulnerabilities" - exec: govulncheck - args: ["./..."] - - name: "gocyclo: Check cyclomatic complexities" - exec: gocyclo - args: ["-over", "9", "."] - - name: Hinge - exec: hinge - args: ["."] - - name: "go: Build (Ensure pulled modules do not break the build)" - exec: go - args: ["build", "-v", "./..."] - - name: "go: Run all tests" - exec: go - args: ["test", "-v", "-coverprofile=coverage.out", "./..."] - - name: "go: Test coverage" - exec: go - args: ["tool", "cover", "-func=coverage.out"] - - name: "git: Add all changed files during the pre-commit stage" - exec: git - args: ["add", "."] \ No newline at end of file diff --git a/Makefile b/Makefile index 9ec87df..5b154e0 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,5 @@ test: ## Runs tests and coverage gcov2lcov -infile=coverage.out -outfile=coverage.lcov check: build ## Tests the pre-commit hooks if they exist - hookz reset --verbose - . .git/hooks/pre-commit - + all: title build test ## Makes all targets \ No newline at end of file