forked from viamrobotics/rdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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
33 changed files
with
759 additions
and
344 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 |
---|---|---|
@@ -0,0 +1,188 @@ | ||
service: | ||
# When updating this, also update bin/linters.sh accordingly | ||
golangci-lint-version: 1.18.x # use the fixed version to not introduce new linters unexpectedly | ||
run: | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
deadline: 600s | ||
# which dirs to skip: they won't be analyzed; | ||
# can use regexp here: generated.*, regexp is applied on full path; | ||
# default value is empty list, but next dirs are always skipped independently | ||
# from this option's value: | ||
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ | ||
skip-dirs: | ||
- genfiles$ | ||
- vendor$ | ||
- test$ | ||
|
||
# which files to skip: they will be analyzed, but issues from them | ||
# won't be reported. Default value is empty list, but there is | ||
# no need to include all autogenerated files, we confidently recognize | ||
# autogenerated files. If it's not please let us know. | ||
skip-files: | ||
|
||
tests: true | ||
|
||
linters: | ||
enable-all: false | ||
enable: | ||
- staticcheck | ||
- vet | ||
- vetshadow | ||
- goimports | ||
- golint | ||
- structcheck | ||
- unconvert | ||
- goconst | ||
- interfacer | ||
- misspell | ||
- ineffassign | ||
- varcheck | ||
- deadcode | ||
- gofmt | ||
- unconvert | ||
- ineffassign | ||
- interfacer | ||
disable: | ||
fast: false | ||
|
||
linters-settings: | ||
errcheck: | ||
# # report about not checking of errors in type assetions: `a := b.(MyStruct)`; | ||
# # default is false: such cases aren't reported by default. | ||
check-type-assertions: false | ||
|
||
# # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; | ||
# # default is false: such cases aren't reported by default. | ||
check-blank: true | ||
govet: | ||
# report about shadowed variables | ||
check-shadowing: false | ||
golint: | ||
# minimal confidence for issues, default is 0.8 | ||
min-confidence: 0.3 | ||
gofmt: | ||
# simplify code: gofmt with `-s` option, true by default | ||
simplify: true | ||
goimports: | ||
# put imports beginning with prefix after 3rd-party packages; | ||
# it's a comma-separated list of prefixes | ||
|
||
maligned: | ||
# print struct with more effective memory layout or not, false by default | ||
suggest-new: true | ||
misspell: | ||
# Correct spellings using locale preferences for US or UK. | ||
# Default is to use a neutral variety of English. | ||
# Setting locale to US will correct the British spelling of 'colour' to 'color'. | ||
# locale: US | ||
lll: | ||
# max line length, lines longer will be reported. Default is 120. | ||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option | ||
line-length: 140 | ||
# tab width in spaces. Default to 1. | ||
tab-width: 1 | ||
unused: | ||
# treat code as a program (not a library) and report unused exported identifiers; default is false. | ||
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors: | ||
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations | ||
# with golangci-lint call it on a directory with the changed file. | ||
check-exported: false | ||
unparam: | ||
# call graph construction algorithm (cha, rta). In general, use cha for libraries, | ||
# and rta for programs with main packages. Default is cha. | ||
algo: cha | ||
|
||
# Inspect exported functions, default is false. Set to true if no external program/library imports your code. | ||
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: | ||
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations | ||
# with golangci-lint call it on a directory with the changed file. | ||
check-exported: false | ||
gocritic: | ||
enabled-checks: | ||
- appendCombine | ||
- argOrder | ||
- assignOp | ||
- badCond | ||
- boolExprSimplify | ||
- builtinShadow | ||
- captLocal | ||
- caseOrder | ||
- codegenComment | ||
- commentedOutCode | ||
- commentedOutImport | ||
- defaultCaseOrder | ||
- deprecatedComment | ||
- docStub | ||
- dupArg | ||
- dupBranchBody | ||
- dupCase | ||
- dupSubExpr | ||
- elseif | ||
- emptyFallthrough | ||
- equalFold | ||
- flagDeref | ||
- flagName | ||
- hexLiteral | ||
- indexAlloc | ||
- initClause | ||
- methodExprCall | ||
- nilValReturn | ||
- octalLiteral | ||
- offBy1 | ||
- rangeExprCopy | ||
- regexpMust | ||
- sloppyLen | ||
- stringXbytes | ||
- switchTrue | ||
- typeAssertChain | ||
- typeSwitchVar | ||
- typeUnparen | ||
- underef | ||
- unlambda | ||
- unnecessaryBlock | ||
- unslice | ||
- valSwap | ||
- weakCond | ||
- yodaStyleExpr | ||
|
||
# Unused | ||
# - appendAssign | ||
# - commentFormatting | ||
# - emptyStringTest | ||
# - exitAfterDefer | ||
# - ifElseChain | ||
# - hugeParam | ||
# - importShadow | ||
# - nestingReduce | ||
# - paramTypeCombine | ||
# - ptrToRefParam | ||
# - rangeValCopy | ||
# - singleCaseSwitch | ||
# - sloppyReassign | ||
# - unlabelStmt | ||
# - unnamedResult | ||
# - wrapperFunc | ||
|
||
issues: | ||
exclude: | ||
- composites | ||
|
||
exclude-rules: | ||
# Exclude some linters from running on test files. | ||
- path: _test\.go$|^tests/|^samples/ | ||
linters: | ||
- goconst | ||
- interfacer | ||
- errcheck | ||
|
||
# Independently from option `exclude` we use default exclude patterns, | ||
# it can be disabled by this option. To list all | ||
# excluded by default patterns execute `golangci-lint run --help`. | ||
# Default value for this option is true. | ||
exclude-use-default: true | ||
|
||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50. | ||
max-per-linter: 0 | ||
|
||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3. | ||
max-same-issues: 0 |
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
Oops, something went wrong.