Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Sep 4, 2022
2 parents 9fa23cc + cca5512 commit 381b934
Show file tree
Hide file tree
Showing 19 changed files with 2,421 additions and 1,314 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Go

on:
push:
branches: [ master ]
branches: [ master develop ]
pull_request:
branches: [ master ]

Expand All @@ -12,25 +12,19 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
go-version: '1.18-beta1'

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v .

- name: Test
run: go test -v .
run: go test -race -v .

- name: Lint
uses: golangci/[email protected]
84 changes: 84 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# v1.47.2
# Please don't remove the first line. It uses in CI to determine the golangci version
run:
deadline: 5m

issues:
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0

# We want to try and improve the comments in the k6 codebase, so individual
# non-golint items from the default exclusion list will gradually be addded
# to the exclude-rules below
exclude-use-default: false

exclude-rules:
# Exclude duplicate code and function length and complexity checking in test
# files (due to common repeats and long functions in test code)
- path: _(test|gen)\.go
linters:
- cyclop
- dupl
- gocognit
- funlen
- lll
- linters:
- paralleltest # false positive: https://github.com/kunwardeep/paralleltest/issues/8.
text: "does not use range value in test Run"

linters-settings:
nolintlint:
# Disable to ensure that nolint directives don't have a leading space. Default is true.
allow-leading-space: false
exhaustive:
default-signifies-exhaustive: true
govet:
check-shadowing: true
cyclop:
max-complexity: 25
maligned:
suggest-new: true
dupl:
threshold: 150
goconst:
min-len: 10
min-occurrences: 4
funlen:
lines: 80
statements: 60

linters:
enable-all: true
disable:
- nlreturn
- gci
- gochecknoinits
- godot
- godox
- gomodguard
- testpackage
- wsl
- gomnd
- goerr113 # most of the errors here are meant for humans
- goheader
- exhaustivestruct
- thelper
- gocyclo # replaced by cyclop since it also calculates the package complexity
- maligned # replaced by govet 'fieldalignment'
- interfacer # deprecated
- scopelint # deprecated, replaced by exportloopref
- wrapcheck # a little bit too much for k6, maybe after https://github.com/tomarrell/wrapcheck/issues/2 is fixed
- golint # this linter is deprecated
- varnamelen
- ireturn
- tagliatelle
- exhaustruct
- execinquery
- maintidx
- grouper
- decorder
- nonamedreturns
- nosnakecase
fast: false
Loading

0 comments on commit 381b934

Please sign in to comment.