Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/coverage/testcoverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ local-prefix: "github.com/org/project"
threshold:
# (optional; default 0)
# The minimum coverage that each file should have
file: 80
file: 50

# (optional; default 0)
# The minimum coverage that each package should have
package: 80
package: 50

# (optional; default 0)
# The minimum total coverage project should have
total: 80
total: 50

override:
- threshold: 70
Expand Down
86 changes: 61 additions & 25 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ linters:
- containedctx
- contextcheck
- copyloopvar
# - cyclop
- cyclop
- decorder
# - depguard
- depguard
- dogsled
- dupl
- dupword
Expand All @@ -24,23 +24,24 @@ linters:
- errname
- errorlint
- exhaustive
# - exhaustruct
- exhaustruct
- exptostd
- fatcontext
# - forbidigo
# - forcetypeassert
- forbidigo
- forcetypeassert
- funcorder
- funlen
- ginkgolinter
- gocheckcompilerdirectives
# - gochecknoglobals
# - gochecknoinits
- gochecknoglobals
- gochecknoinits
- gochecksumtype
- gocognit
- goconst
- gocritic
- gocyclo
# - godot
# - godox
- godot
- godox
- goheader
- gomoddirectives
- gomodguard
Expand All @@ -56,26 +57,26 @@ linters:
- interfacebloat
- intrange
- ireturn
# - lll
- lll
- loggercheck
- maintidx
- makezero
- mirror
- misspell
# - mnd
- mnd
- musttag
- nakedret
- nestif
- nilerr
- nilnesserr
- nilnil
# - nlreturn
- nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
# - paralleltest
# - perfsprint
- paralleltest
- perfsprint
- prealloc
- predeclared
- promlinter
Expand All @@ -90,22 +91,25 @@ linters:
- staticcheck
- tagalign
- tagliatelle
# - testableexamples
- testableexamples
- testifylint
# - testpackage
# - thelper
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- unused
# - usestdlibvars
# - usetesting
# - varnamelen
- usestdlibvars
- usetesting
- varnamelen
- wastedassign
- whitespace
# - wrapcheck
# - wsl
- wrapcheck
- wsl
- zerologlint
disable:
- gochecknoglobals
- gochecknoinits
exclusions:
generated: lax
presets:
Expand All @@ -117,17 +121,49 @@ linters:
- third_party$
- builtin$
- examples$

settings:
depguard:
rules:
prevent_unmaintained_packages:
list-mode: lax # allow unless explicitely denied
allow:
- github.com/stretchr/testify/*
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
exhaustruct:
exclude:
- '.+/cobra\.Command$'
- '.+/http\.Server$'
- '.+/httpserver\.BasicHTTPServer$'
- '.+/httpServer\.populateStaticTemplate$'
- '.+/httpServer\.populateStaticTemplate$'
- '.+/httpserver\.TemplateVariables$'
- '.+/observer\.NullObserver$'
- '.+/senzingrestservice\.BasicSenzingRestService$'
- '.+/xtermservice\.XtermServiceImpl$'
ireturn:
allow:
- anon
- empty
- error
- stdlib
mnd:
ignored-functions:
- '^logger\.Log$'
formatters:
enable:
- gci
- gofmt
# - gofumpt
- gofumpt
- goimports
# - golines
- golines
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
settings:
golines:
max-len: 120
2 changes: 2 additions & 0 deletions .github/linters/bearer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rule:
skip-rule: []
22 changes: 22 additions & 0 deletions .github/workflows/bearer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: bearer

on:
push:
branches-ignore: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
rule_check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Bearer
uses: bearer/bearer-action@v2
with:
config-file: .github/linters/bearer.yml
2 changes: 1 addition & 1 deletion .github/workflows/go-proxy-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

slack-notification:
needs: [go-proxy-pull]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.go-proxy-pull.outputs.status ) }}
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.go-proxy-pull.outputs.status) }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v2
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/go-test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go ${{ matrix.go }}
uses: actions/setup-go@v5
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
golangci:
name: lint
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.24"]

steps:
- name: Checkout repository
Expand Down Expand Up @@ -50,7 +53,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: ${{ matrix.go }}

- name: Perform linting
uses: golangci/golangci-lint-action@v8
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/govulncheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: govulncheck

on:
push:
branches-ignore: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
govulncheck:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.24"]
senzingsdk-version: [staging-v4]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Install Senzing SDK
uses: senzing-factory/github-action-install-senzing-sdk@v3
with:
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }}
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }}

- uses: golang/govulncheck-action@v1
with:
go-version-input: ${{ matrix.go }}
19 changes: 19 additions & 0 deletions .github/workflows/spellcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: spellcheck

on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: streetsidesoftware/cspell-action@v7
with:
config: .vscode/cspell.json
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ go.work
.DS_STORE

# Visual Studio code
.vscode
.vscode/*
!.vscode/cspell.json
*.code-workspace
.history

Expand Down
79 changes: 79 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"version": "0.2",
"language": "en",
"words": [
"andrewslotin",
"aquilax",
"buildx",
"CCLA",
"CFLAGS",
"cmdhelping",
"CODEOWNER",
"CONFIGPATH",
"covermode",
"coverpkg",
"coverprofile",
"dockerhub",
"dockter",
"DYLD",
"examplepackage",
"godoc",
"golangci",
"gomod",
"GOPATH",
"goroutines",
"gosec",
"gotest",
"gotestfmt",
"gotesttools",
"govulncheck",
"grpcing",
"Hostnames",
"ICLA",
"LDFLAGS",
"OSARCH",
"OSTYPE",
"pkill",
"pydevproject",
"RESOURCEPATH",
"rootfs",
"Senzing",
"SENZINGSDK",
"stackoverflow",
"stretchr",
"SUPPORTPATH",
"szapi",
"Szconfig",
"szconfigmanager",
"szconfigmgr",
"Szdiagnostic",
"Szengine",
"szerror",
"szerrors",
"szerrortypes",
"szhelpers",
"szinterface",
"Szproduct",
"SZSDK",
"taskkill",
"testcoverage",
"testdata",
"testrecords",
"truthset",
"unmarshalling",
"USERPROFILE",
"wraperror"
],
"ignorePaths": [
".dockerignore",
".git/*",
".github/linters/.golangci.yaml",
".gitignore",
".history/*",
"**/*.go",
"**/*.mod",
"**/*.sum",
"bearer.ignore",
"Makefile"
]
}
Loading
Loading