-
Notifications
You must be signed in to change notification settings - Fork 19
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
45 changed files
with
299 additions
and
244 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
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 |
---|---|---|
|
@@ -13,6 +13,6 @@ jobs: | |
with: | ||
filter-workflow-names: | | ||
Dependency sanity checker* | ||
Linters* | ||
Go* | ||
Rust* | ||
Soroban RPC* |
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
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,122 +1,123 @@ | ||
linters-settings: | ||
depguard: | ||
dupl: | ||
threshold: 100 | ||
|
||
funlen: | ||
lines: 100 | ||
statements: 50 | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 3 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
disabled-checks: | ||
- dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
- ifElseChain | ||
- octalLiteral | ||
- whyNoLint | ||
gocyclo: | ||
min-complexity: 15 | ||
goimports: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
gomnd: | ||
# don't include the "operation" and "assign" | ||
checks: | ||
- argument | ||
- case | ||
- condition | ||
- return | ||
ignored-numbers: | ||
- '0' | ||
- '1' | ||
- '2' | ||
- '3' | ||
ignored-functions: | ||
- strings.SplitN | ||
|
||
govet: | ||
check-shadowing: true | ||
settings: | ||
printf: | ||
funcs: | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf | ||
lll: | ||
line-length: 140 | ||
misspell: | ||
locale: US | ||
nolintlint: | ||
allow-unused: false # report any unused nolint directives | ||
require-explanation: false # don't require an explanation for nolint directives | ||
require-specific: false # don't require nolint directives to be specific about which linter is being skipped | ||
|
||
gci: | ||
# Section configuration to compare against. | ||
# Section names are case-insensitive and may contain parameters in (). | ||
# The default order of sections is `standard > default > custom > blank > dot > alias > localmodule`, | ||
# If `custom-order` is `true`, it follows the order of `sections` option. | ||
# Default: ["standard", "default"] | ||
sections: | ||
- standard # Standard section: captures all standard packages. | ||
- default # Default section: contains all imports that could not be matched to another section type. | ||
- prefix(github.com/stellar/) # Custom section: groups all imports with the specified Prefix. | ||
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled. | ||
skip-generated: false | ||
# Enable custom order of sections. | ||
# If `true`, make the section order the same as the order of `sections`. | ||
# Default: false | ||
custom-order: true | ||
|
||
dogsled: | ||
# Checks assignments with too many blank identifiers. | ||
# Default: 2 | ||
max-blank-identifiers: 3 | ||
|
||
cyclop: | ||
# The maximal code complexity to report. | ||
# Default: 10 | ||
max-complexity: 15 | ||
|
||
wrapcheck: | ||
# An array of strings that specify substrings of signatures to ignore. | ||
# If this set, it will override the default set of ignored signatures. | ||
# See https://github.com/tomarrell/wrapcheck#configuration for more information. | ||
# Default: [".Errorf(", "errors.New(", "errors.Unwrap(", "errors.Join(", ".Wrap(", ".Wrapf(", ".WithMessage(", ".WithMessagef(", ".WithStack("] | ||
ignoreSigs: | ||
- .Errorf( | ||
- errors.New( | ||
- errors.Unwrap( | ||
- errors.Join( | ||
- .Wrap( | ||
- .Wrapf( | ||
- .WithMessage( | ||
- .WithMessagef( | ||
- .WithStack( | ||
# An array of strings that specify regular expressions of signatures to ignore. | ||
# Default: [] | ||
ignoreSigRegexps: | ||
- \.New.*Error\( | ||
# An array of strings that specify globs of packages to ignore. | ||
# Default: [] | ||
ignorePackageGlobs: | ||
- encoding/* | ||
- github.com/pkg/* | ||
- github.com/stellar/* | ||
# An array of strings that specify regular expressions of interfaces to ignore. | ||
# Default: [] | ||
ignoreInterfaceRegexps: | ||
- ^(?i)c(?-i)ach(ing|e) | ||
|
||
testifylint: | ||
enable-all: true | ||
disable: | ||
# TODO: try to enable it | ||
- go-require | ||
|
||
forbidigo: | ||
# Forbid the following identifiers (list of regexp). | ||
# Default: ["^(fmt\\.Print(|f|ln)|print|println)$"] | ||
forbid: | ||
- p: "^(fmt\\.Print(|f|ln)|print|println)$" | ||
msg: Do not commit debug print statements (in tests use t.Log()). | ||
- p: "^.*$" | ||
pkg: "^github.com/stellar/go/support/errors$" | ||
msg: Do not use stellar/go/support/errors, use the standard 'errors' package and fmt.Errorf(). | ||
exclude-godoc-examples: false | ||
analyze-types: true | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
enable-all: true | ||
disable: | ||
- gomnd | ||
- execinquery | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- errcheck | ||
- exportloopref | ||
#- funlen | ||
- gochecknoinits | ||
- goconst | ||
#- gocritic | ||
#- gocyclo | ||
- gofmt | ||
- goimports | ||
#- gomnd | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
#- lll | ||
- misspell | ||
- nakedret | ||
- noctx | ||
- nolintlint | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
|
||
# don't enable: | ||
# - asciicheck | ||
# - scopelint | ||
# - gochecknoglobals | ||
# - gocognit | ||
# - godot | ||
# - godox | ||
# - goerr113 | ||
# - interfacer | ||
# - maligned | ||
# - nestif | ||
# - prealloc | ||
# - testpackage | ||
# - revive | ||
# - wsl | ||
- nlreturn | ||
- godox | ||
# exhaustruct: enforcing exhaustive fields is useful in some cases, but there are | ||
# too many legitimate default field values in Go | ||
- exhaustruct | ||
# err113: Enforcing errors.Is() is useful but cannot be enabled in isolation | ||
- err113 | ||
- thelper | ||
- wsl | ||
- wrapcheck | ||
- testpackage | ||
# TODO: I didn't manage to make it accept short parameter names | ||
- varnamelen | ||
# TODO: consider enabling it later on | ||
- ireturn | ||
- godot | ||
presets: [ ] | ||
fast: false | ||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- govet | ||
- gosec | ||
- path: cmd/soroban-rpc/internal/integrationtest/infrastructure/ | ||
linters: | ||
- gosec | ||
|
||
run: | ||
timeout: 5m | ||
skip-dirs: | ||
- docs | ||
- vendor | ||
timeout: 10m |
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
Oops, something went wrong.