Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 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
95 changes: 66 additions & 29 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,37 @@ linters:
- containedctx
- contextcheck
- copyloopvar
# - cyclop
- cyclop
- decorder
# - depguard
# - dogsled
- depguard
- dogsled
- dupl
- dupword
- durationcheck
# - err113
- err113
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
# - exhaustruct
# - exptostd
- exhaustruct
- exptostd
- fatcontext
# - forbidigo
- forbidigo
- forcetypeassert
# - funlen
- funcorder
- funlen
- ginkgolinter
- gocheckcompilerdirectives
# - gochecknoglobals
# - gochecknoinits
- gochecknoglobals
- gochecknoinits
- gochecksumtype
- gocognit
# - goconst
- goconst
- gocritic
- gocyclo
# - godot
# - godox
- godot
- godox
- goheader
- gomoddirectives
- gomodguard
Expand All @@ -55,27 +56,27 @@ linters:
- ineffassign
- interfacebloat
- intrange
# - ireturn
# - lll
- ireturn
- 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,27 @@ linters:
- staticcheck
- tagalign
- tagliatelle
# - testableexamples
- testableexamples
- testifylint
# - testpackage
# - thelper
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- unused
- usestdlibvars
# - usetesting
- usetesting
- varnamelen
- wastedassign
# - whitespace
# - wrapcheck
# - wsl
- whitespace
- wrapcheck
- wsl
- zerologlint
disable:
- gochecknoglobals
- gochecknoinits
- lll
- testableexamples
exclusions:
generated: lax
presets:
Expand All @@ -117,17 +123,48 @@ linters:
- third_party$
- builtin$
- examples$

settings:
cyclop:
max-complexity: 14
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$'
- '.+/checkself\.BasicCheckSelf$'
- '.+/checkself\.ProductLicenseResponse$'
ireturn:
allow:
- error
- senzing.SzAbstractFactory
- senzing.SzConfigManager
- senzing.SzProduct
- stdlib
mnd:
ignored-functions:
- '^logger\.Log$'
paralleltest:
ignore-missing: true
formatters:
enable:
- gci
- gofmt
# - gofumpt
- gofumpt
- goimports
# - golines
- golines
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
settings:
golines:
max-len: 120
20 changes: 20 additions & 0 deletions .github/workflows/bearer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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
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 }}
Loading
Loading