Skip to content

Commit

Permalink
Merge pull request #67 from devops-kung-fu/dj-wip
Browse files Browse the repository at this point in the history
feat: 2.4.0 Updates
  • Loading branch information
djschleen authored May 23, 2022
2 parents e05dd7d + e03b3f0 commit 714f953
Show file tree
Hide file tree
Showing 40 changed files with 892 additions and 922 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.18'
- name: Install Dependencies
run: |
go version
go get -u golang.org/x/lint/golint
go get -u github.com/fzipp/gocyclo/cmd/gocyclo
go install golang.org/x/lint/golint@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
- name: Tests
run: |
go test -v -coverprofile=coverage.out ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.18'

- name: Get the version
id: get_version
Expand Down
30 changes: 17 additions & 13 deletions .hookz.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
version: 2.3.0
version: 2.4.0
sources:
- source: github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
- source: github.com/devops-kung-fu/lucha@latest
- source: github.com/devops-kung-fu/hinge@latest
- source: github.com/kisielk/errcheck@latest
- source: golang.org/x/lint/golint@latest
- source: github.com/fzipp/gocyclo/cmd/gocyclo@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 (Recursive)"
script: "
#!/bin/bash \n
echo -e Tidying all found go.mod occurrences\n
find . -name go.mod -print0 | xargs -0 -n1 dirname | xargs -L 1 bash -c 'cd \"$0\" && pwd && go mod tidy' \n
"
args: ["pull"]
- name: "go: Tidy mod file"
exec: go
args: ["mod", "tidy"]
- name: "go: Update all dependencies to latest"
exec: go
args: ["get", "-u", "./..."]
Expand All @@ -20,12 +24,15 @@
- name: "golint: Lint all go files"
exec: golint
args: ["./..."] #to error out, add the arg "-set_exit_status"
- name: "errcheck: Check that errors are checked"
- name: "errcheck: Ensure that errors are checked"
exec: errcheck
args: ["-ignoretests", "./..."]
- name: "gocyclo: Check cyclomatic complexities"
exec: gocyclo
args: ["-over", "7", "."]
- name: Hinge
exec: hinge
args: ["."]
- name: "go: Build (Ensure pulled modules do not break the build)"
exec: go
args: ["build", "-v"]
Expand All @@ -37,10 +44,7 @@
args: ["tool", "cover", "-func=coverage.out"]
- name: "cyclone-dx: Generate a Software Bill of Materials (SBoM)"
exec: cyclonedx-gomod
args: ["-json", "-output", "hookz-sbom.json", "-std", "-licenses"]
- name: Hinge
url: https://github.com/devops-kung-fu/hinge/releases/download/v0.1.0/hinge-0.1.0-%%PLATFORM%%-amd64
args: ["."]
args: ["app", "-json", "-output", "hookz-sbom.json"]
- name: "git: Add all changed files during the pre-commit stage"
exec: git
args: ["add", "."]
1 change: 1 addition & 0 deletions .vscode/configurationCache.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"buildTargets":[".PHONY","all","build","help","install","test","title"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}}
5 changes: 5 additions & 0 deletions .vscode/dryrun.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
make --dry-run --always-make --keep-going --print-directory
make: Entering directory `/Users/dj/code/hookz'
awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $1, $2}' Makefile
make: Leaving directory `/Users/dj/code/hookz'

287 changes: 287 additions & 0 deletions .vscode/targets.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
make all --print-data-base --no-builtin-variables --no-builtin-rules --question
# GNU Make 3.81
# Copyright (C) 2006 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# This program built for i386-apple-darwin11.3.0


# Make data base, printed on Mon May 23 08:31:31 2022

# Variables

# automatic
<D = $(patsubst %/,%,$(dir $<))
# automatic
?F = $(notdir $?)
# environment
VSCODE_LOG_NATIVE = false
# automatic
?D = $(patsubst %/,%,$(dir $?))
# environment
BASH_SILENCE_DEPRECATION_WARNING = 1
# automatic
@D = $(patsubst %/,%,$(dir $@))
# automatic
@F = $(notdir $@)
# makefile
CURDIR := /Users/dj/code/hookz
# makefile
SHELL = /bin/sh
# environment
VSCODE_NLS_CONFIG = {"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}
# environment
_ = /usr/bin/make
# makefile (from `Makefile', line 1)
MAKEFILE_LIST := Makefile
# environment
VSCODE_AMD_ENTRYPOINT = vs/workbench/api/node/extensionHostProcess
# environment
VSCODE_VERBOSE_LOGGING = true
# environment
__CFBundleIdentifier = com.microsoft.VSCode
# environment
VSCODE_IPC_HOOK_EXTHOST = /var/folders/nm/ppzx3wrs5t5b4s92j5lzr5t00000gn/T/vscode-ipc-0c2c54bd-b273-48a6-956b-20f8acf59fb0.sock
# environment
VSCODE_CWD = /
# environment
GOPROXY = https://proxy.golang.org,direct
# environment
PATH = /usr/local/opt/openjdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/go/bin:/usr/local/go/bin
# environment
GOPATH = /Users/dj/go
# environment
VSCODE_LOG_STACK = false
# environment
ELECTRON_RUN_AS_NODE = 1
# default
.FEATURES := target-specific order-only second-expansion else-if archives jobserver check-symlink
# environment
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.wMK6qHC0nn/Listeners
# automatic
%F = $(notdir $%)
# environment
VSCODE_PIPE_LOGGING = true
# environment
PWD = /Users/dj/code/hookz
# environment
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
# environment
GOMODCACHE = /Users/dj/go/pkg/mod
# environment
HOME = /Users/dj
# default
MAKEFILEPATH = $(shell /usr/bin/xcode-select -print-path 2>/dev/null || echo /Developer)/Makefiles
# environment
VSCODE_CODE_CACHE_PATH = /Users/dj/Library/Application Support/Code/CachedData/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
# environment
LOGNAME = dj
# environment
APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1
# environment
VSCODE_HANDLES_UNCAUGHT_ERRORS = true
# automatic
^D = $(patsubst %/,%,$(dir $^))
# environment
XPC_FLAGS = 0x0
# default
MAKE = $(MAKE_COMMAND)
# default
MAKECMDGOALS := all
# environment
SHLVL = 2
# default
MAKE_VERSION := 3.81
# environment
USER = dj
# environment
CR_PAT = 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
# makefile (from `Makefile', line 9)
.DEFAULT_GOAL := help
# automatic
%D = $(patsubst %/,%,$(dir $%))
# default
MAKE_COMMAND := /Library/Developer/CommandLineTools/usr/bin/make
# default
.VARIABLES :=
# environment
TMPDIR = /var/folders/nm/ppzx3wrs5t5b4s92j5lzr5t00000gn/T/
# automatic
*F = $(notdir $*)
# environment
VSCODE_IPC_HOOK = /Users/dj/Library/Application Support/Code/1.67.2-main.sock
# makefile
MAKEFLAGS = Rrqp
# environment
MFLAGS = -Rrqp
# automatic
*D = $(patsubst %/,%,$(dir $*))
# environment
XPC_SERVICE_NAME = application.com.microsoft.VSCode.16094751.16094757
# automatic
+D = $(patsubst %/,%,$(dir $+))
# automatic
+F = $(notdir $+)
# environment
TEMP = /tmp
# environment
__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0
# environment
COMMAND_MODE = unix2003
# default
MAKEFILES :=
# automatic
<F = $(notdir $<)
# environment
EDITOR = nano
# environment
LC_ALL = C
# automatic
^F = $(notdir $^)
# default
SUFFIXES :=
# default
.INCLUDE_DIRS = /usr/local/include
# environment
MAKELEVEL := 0
# environment
GPG_TTY = not a tty
# environment
LANG = C
# environment
VSCODE_PID = 2425
# variable set hash-table stats:
# Load=70/1024=7%, Rehash=0, Collisions=3/97=3%

# Pattern-specific Variable Values

# No pattern-specific variable values.

# Directories

# . (device 16777221, inode 16087795): 24 files, no impossibilities.

# 24 files, no impossibilities in 1 directories.

# Implicit Rules

# No implicit rules.

# Files

all: title build test
# Command-line target.
# Implicit rule search has been done.
# File does not exist.
# File has been updated.
# Needs to be updated (-q is set).
# variable set hash-table stats:
# Load=0/32=0%, Rehash=0, Collisions=0/2=0%

title:
# Implicit rule search has not been done.
# Implicit/static pattern stem: `'
# File does not exist.
# File has been updated.
# Needs to be updated (-q is set).
# automatic
# @ := title
# automatic
# % :=
# automatic
# * :=
# automatic
# + :=
# automatic
# | :=
# automatic
# < :=
# automatic
# ^ :=
# automatic
# ? :=
# variable set hash-table stats:
# Load=8/32=25%, Rehash=0, Collisions=1/10=10%
# commands to execute (from `Makefile', line 13):
@echo "Hookz Makefile"
@echo "--------------"


.PHONY: help
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.

# Not a target:
.SUFFIXES:
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.

# Not a target:
Makefile:
# Implicit rule search has been done.
# Last modified 2022-05-18 14:38:58
# File has been updated.
# Successfully updated.
# variable set hash-table stats:
# Load=0/32=0%, Rehash=0, Collisions=0/0=0%

test:
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.
# commands to execute (from `Makefile', line 20):
go test -v -coverprofile=coverage.out ./... && go tool cover -func=coverage.out


build:
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.
# commands to execute (from `Makefile', line 17):
go build


help:
# Phony target (prerequisite of .PHONY).
# Implicit rule search has not been done.
# File does not exist.
# File has not been updated.
# commands to execute (from `Makefile', line 7):
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)


# Not a target:
.DEFAULT:
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.

install: build
# Implicit rule search has not been done.
# Modification time never checked.
# File has not been updated.
# commands to execute (from `Makefile', line 23):
sudo chmod +x hookz
sudo mv hookz /usr/local/bin


# files hash-table stats:
# Load=10/1024=1%, Rehash=0, Collisions=0/29=0%
# VPATH Search Paths

# No `vpath' search paths.

# No general (`VPATH' variable) search path.

# # of strings in strcache: 1
# # of strcache buffers: 1
# strcache size: total = 4096 / max = 4096 / min = 4096 / avg = 4096
# strcache free: total = 4087 / max = 4087 / min = 4087 / avg = 4087

# Finished Make data base on Mon May 23 08:31:31 2022


Loading

0 comments on commit 714f953

Please sign in to comment.