Skip to content

Commit

Permalink
Merge branch 'master' into appsec-user-agent-header
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceJJones authored Feb 23, 2024
2 parents f047ef3 + 4bf640c commit a871e2f
Show file tree
Hide file tree
Showing 135 changed files with 8,278 additions and 9,360 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/bats-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
GIST_BADGES_ID:
required: true

env:
PREFIX_TEST_NAMES_WITH_FILE: true

jobs:
build:
strategy:
Expand All @@ -36,7 +33,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: "Install bats dependencies"
env:
Expand All @@ -50,7 +47,7 @@ jobs:
- name: "Run hub tests"
run: |
./test/bin/generate-hub-tests
./test/run-tests test/dyn-bats/${{ matrix.test-file }}
./test/run-tests ./test/dyn-bats/${{ matrix.test-file }} --formatter $(pwd)/test/lib/color-formatter
- name: "Collect hub coverage"
run: ./test/bin/collect-hub-coverage >> $GITHUB_ENV
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/bats-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
required: true
type: string

env:
PREFIX_TEST_NAMES_WITH_FILE: true

jobs:
build:
name: "Functional tests"
Expand Down Expand Up @@ -39,7 +36,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: "Install bats dependencies"
env:
Expand All @@ -58,7 +55,7 @@ jobs:
MYSQL_USER: root

- name: "Run tests"
run: make bats-test
run: ./test/run-tests ./test/bats --formatter $(pwd)/test/lib/color-formatter
env:
DB_BACKEND: mysql
MYSQL_HOST: 127.0.0.1
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/bats-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: (sub) Bats / Postgres
on:
workflow_call:

env:
PREFIX_TEST_NAMES_WITH_FILE: true

jobs:
build:
name: "Functional tests"
Expand Down Expand Up @@ -48,7 +45,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: "Install bats dependencies"
env:
Expand All @@ -67,7 +64,7 @@ jobs:
PGUSER: postgres

- name: "Run tests (DB_BACKEND: pgx)"
run: make bats-test
run: ./test/run-tests ./test/bats --formatter $(pwd)/test/lib/color-formatter
env:
DB_BACKEND: pgx
PGHOST: 127.0.0.1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/bats-sqlite-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_call:

env:
PREFIX_TEST_NAMES_WITH_FILE: true
TEST_COVERAGE: true

jobs:
Expand All @@ -29,7 +28,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: "Install bats dependencies"
env:
Expand All @@ -42,7 +41,7 @@ jobs:
make clean bats-build bats-fixture BUILD_STATIC=1
- name: "Run tests"
run: make bats-test
run: ./test/run-tests ./test/bats --formatter $(pwd)/test/lib/color-formatter

- name: "Collect coverage data"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows-build-msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: Build
run: make windows_installer BUILD_RE2_WASM=1
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ jobs:
# required to pick up tags for BUILD_VERSION
fetch-depth: 0

- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.7"
cache-dependency-path: "**/go.sum"

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -71,14 +77,8 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
cache-dependency-path: "**/go.sum"

- run: |
make clean build BUILD_RE2_WASM=1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/go-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: Create localstack streams
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-tarball-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.21.6"
go-version: "1.21.7"

- name: Build the binaries
run: |
Expand Down
16 changes: 12 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ run:
linters-settings:
cyclop:
# lower this after refactoring
max-complexity: 70
max-complexity: 53

gci:
sections:
Expand All @@ -26,7 +26,7 @@ linters-settings:

gocyclo:
# lower this after refactoring
min-complexity: 70
min-complexity: 49

funlen:
# Checks the number of lines in a function.
Expand All @@ -46,7 +46,7 @@ linters-settings:

maintidx:
# raise this after refactoring
under: 9
under: 11

misspell:
locale: US
Expand All @@ -73,6 +73,10 @@ linters-settings:
- pkg: "github.com/pkg/errors"
desc: "errors.Wrap() is deprecated in favor of fmt.Errorf()"

wsl:
# Allow blocks to end with comments
allow-trailing-comment: true

linters:
enable-all: true
disable:
Expand Down Expand Up @@ -105,6 +109,7 @@ linters:
# - durationcheck # check for two durations multiplied together
# - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
# - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
# - execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
# - exportloopref # checks for pointers to enclosing loop variables
# - funlen # Tool for detection of long functions
# - ginkgolinter # enforces standards of using ginkgo and gomega
Expand Down Expand Up @@ -203,7 +208,6 @@ linters:
#
# Too strict / too many false positives (for now?)
#
- execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
- exhaustruct # Checks if all structure fields are initialized
- forbidigo # Forbids identifiers
- gochecknoglobals # check that no global variables exist
Expand Down Expand Up @@ -263,6 +267,10 @@ issues:
- perfsprint
text: "fmt.Sprintf can be replaced .*"

- linters:
- perfsprint
text: "fmt.Errorf can be replaced with errors.New"

#
# Will fix, easy but some neurons required
#
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# vim: set ft=dockerfile:
FROM golang:1.21.6-alpine3.18 AS build
FROM golang:1.21.7-alpine3.18 AS build

ARG BUILD_VERSION

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# vim: set ft=dockerfile:
FROM golang:1.21.6-bookworm AS build
FROM golang:1.21.7-bookworm AS build

ARG BUILD_VERSION

Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ stages:
- task: GoTool@0
displayName: "Install Go"
inputs:
version: '1.21.6'
version: '1.21.7'

- pwsh: |
choco install -y make
Expand Down
Loading

0 comments on commit a871e2f

Please sign in to comment.