-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(workflows/publish): use --new and --new-from-rev
- Loading branch information
Showing
2 changed files
with
141 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# This configuration file is based on the file used at GitLab: | ||
# https://gitlab.com/gitlab-org/language-tools/go/linters/goargs/-/blob/master/.golangci.yml | ||
run: | ||
timeout: 2m | ||
issues-exit-code: 1 | ||
modules-download-mode: vendor | ||
# tests files are also analyzed | ||
tests: true | ||
skip-dirs: | ||
- vendor | ||
|
||
output: | ||
format: colored-line-number | ||
print-issued-lines: true | ||
print-linter-name: true | ||
|
||
# Allow list of enabled linters | ||
linters: | ||
disable-all: true | ||
# only execute the fast linters | ||
fast: false | ||
enable: | ||
- bodyclose | ||
- dogsled | ||
- errcheck | ||
- execinquery | ||
- goconst | ||
- gocritic | ||
- goimports | ||
- revive | ||
- goprintffuncname | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- nonamedreturns | ||
- nosprintfhostport | ||
- staticcheck | ||
- nestif | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- whitespace | ||
- containedctx | ||
- errchkjson | ||
- contextcheck | ||
- tenv | ||
- reassign | ||
|
||
issues: | ||
# prevent some false positives by using the default list of excluded pattern | ||
exclude-use-default: true | ||
exclude-rules: | ||
# Exclude contextcheck linter on test files | ||
- path: '(.+)_test\.go' | ||
linters: | ||
- contextcheck | ||
|
||
severity: | ||
# the severity only impacts the output for some format (e.g. json) | ||
default-severity: error | ||
|
||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
# errcheck does not need to check the following functions as they are handled by errchkjson | ||
exclude-functions: | ||
- encoding/json.Marshal | ||
- encoding/json.MarshalIndent | ||
- (*encoding/json.Encoder).Encode | ||
errchkjson: | ||
check-error-free-encoding: true | ||
report-no-exported: true | ||
goimports: | ||
local-prefixes: github.com/Scalingo | ||
goconst: | ||
min-len: 3 | ||
min-occurrences: 3 | ||
gocritic: | ||
enabled-checks: | ||
- appendCombine | ||
- badCall | ||
- badCond | ||
- boolExprSimplify | ||
- codegenComment | ||
- commentFormatting | ||
- commentedOutCode | ||
- deprecatedComment | ||
- dupImport | ||
- emptyFallthrough | ||
- emptyStringTest | ||
- equalFold | ||
- evalOrder | ||
- exitAfterDefer | ||
- flagName | ||
- hexLiteral | ||
- indexAlloc | ||
- initClause | ||
- methodExprCall | ||
- nestingReduce | ||
- newDeref | ||
- nilValReturn | ||
- offBy1 | ||
- ptrToRefParam | ||
- rangeExprCopy | ||
- regexpPattern | ||
- sloppyReassign | ||
- stringXbytes | ||
- truncateCmp | ||
- typeAssertChain | ||
- typeUnparen | ||
- underef | ||
- unnecessaryBlock | ||
- valSwap | ||
- weakCond | ||
- wrapperFunc | ||
- yodaStyleExpr | ||
gocyclo: | ||
min-complexity: 10 | ||
govet: | ||
check-shadowing: false | ||
settings: | ||
printf: | ||
funcs: | ||
- (github.com/sirupsen/logrus.FieldLogger).Errorf | ||
- (github.com/sirupsen/logrus.FieldLogger).Error | ||
- (github.com/sirupsen/logrus.FieldLogger).Warnf | ||
- (github.com/sirupsen/logrus.FieldLogger).Warn | ||
- (github.com/sirupsen/logrus.FieldLogger).Infof | ||
- (github.com/sirupsen/logrus.FieldLogger).Info | ||
- (github.com/sirupsen/logrus.FieldLogger).Debugf | ||
- (github.com/sirupsen/logrus.FieldLogger).Debug | ||
- (github.com/Scalingo/go-scalingo/v6/debug).Printf | ||
- (github.com/Scalingo/go-scalingo/v6/debug).Println | ||
nestif: | ||
min-complexity: 7 |