-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
145 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: push-master | ||
name: push-main | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
|
||
env: | ||
PACKAGES: "./..." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
run: | ||
timeout: 10m0s | ||
linters: | ||
enable: | ||
- exhaustive | ||
- exportloopref | ||
- revive | ||
- goimports | ||
- gosec | ||
- misspell | ||
- rowserrcheck | ||
- errorlint | ||
- unconvert | ||
- sqlclosecheck | ||
- noctx | ||
- whitespace | ||
- depguard | ||
- containedctx | ||
linters-settings: | ||
exhaustive: | ||
default-signifies-exhaustive: true | ||
goimports: | ||
local-prefixes: github.com/smartcontractkit/chainlink-vrf | ||
golint: | ||
min-confidence: 1.0 | ||
gosec: | ||
excludes: | ||
- G101 | ||
- G104 | ||
# - G204 | ||
# - G304 | ||
# - G404 | ||
govet: | ||
# report about shadowed variables | ||
check-shadowing: true | ||
errorlint: | ||
# Allow formatting of errors without %w | ||
errorf: false | ||
revive: | ||
confidence: 0.8 | ||
rules: | ||
- name: blank-imports | ||
- name: context-as-argument | ||
- name: context-keys-type | ||
- name: dot-imports | ||
- name: error-return | ||
- name: error-strings | ||
- name: error-naming | ||
- name: exported | ||
- name: if-return | ||
- name: increment-decrement | ||
- name: var-naming | ||
- name: var-declaration | ||
- name: package-comments | ||
- name: range | ||
- name: receiver-naming | ||
- name: time-naming | ||
# - name: unexported-return | ||
- name: indent-error-flow | ||
- name: errorf | ||
- name: empty-block | ||
- name: superfluous-else | ||
# - name: unused-parameter | ||
- name: unreachable-code | ||
- name: redefines-builtin-id | ||
- name: waitgroup-by-value | ||
- name: unconditional-recursion | ||
- name: struct-tag | ||
# - name: string-format | ||
- name: string-of-int | ||
- name: range-val-address | ||
- name: range-val-in-closure | ||
- name: modifies-value-receiver | ||
- name: modifies-parameter | ||
- name: identical-branches | ||
- name: get-return | ||
# - name: flag-parameter | ||
- name: early-return | ||
- name: defer | ||
- name: constant-logical-expr | ||
# - name: confusing-naming | ||
# - name: confusing-results | ||
- name: bool-literal-in-expr | ||
- name: atomic | ||
depguard: | ||
rules: | ||
main: | ||
list-mode: lax | ||
deny: | ||
- pkg: "cosmossdk.io/errors" | ||
desc: Use the standard library instead | ||
- pkg: "github.com/ethereum/go-ethereum" | ||
desc: This is a chain-agnostic repo | ||
- pkg: "github.com/go-gorm/gorm" | ||
desc: Use github.com/jmoiron/sqlx directly instead | ||
- pkg: "github.com/gofrs/uuid" | ||
desc: Use github.com/google/uuid instead | ||
- pkg: "github.com/pkg/errors" | ||
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join | ||
- pkg: "github.com/satori/go.uuid" | ||
desc: Use github.com/google/uuid instead | ||
- pkg: "github.com/test-go/testify/assert" | ||
desc: Use github.com/stretchr/testify/assert instead | ||
- pkg: "github.com/test-go/testify/mock" | ||
desc: Use github.com/stretchr/testify/mock instead | ||
- pkg: "github.com/test-go/testify/require" | ||
desc: Use github.com/stretchr/testify/require instead | ||
- pkg: "go.uber.org/multierr" | ||
desc: Use the standard library instead, for example https://pkg.go.dev/errors#Join | ||
- pkg: "gopkg.in/guregu/null.v1" | ||
desc: Use gopkg.in/guregu/null.v4 instead | ||
- pkg: "gopkg.in/guregu/null.v2" | ||
desc: Use gopkg.in/guregu/null.v4 instead | ||
- pkg: "gopkg.in/guregu/null.v3" | ||
desc: Use gopkg.in/guregu/null.v4 instead | ||
issues: | ||
exclude-rules: | ||
- path: test | ||
text: "^G404:" | ||
linters: | ||
- gosec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
SHELL=/bin/bash -o pipefail | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: | ||
go build ./... | ||
|
||
.PHONY: test | ||
test: | ||
go test ./... | ||
|
||
.PHONY: lint | ||
lint: | ||
golangci-lint run ./... | ||
|
||
.PHONY: tidy | ||
tidy: | ||
go mod tidy |