Created
September 2, 2022 17:48
-
-
Save Boomatang/46eafafaa8ea31e20d69dd83230f6626 to your computer and use it in GitHub Desktop.
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
# cached : test true; all linters; | |
# real 0m3.790s | |
# user 0m7.850s | |
# sys 0m0.987s | |
# | |
# not cached : test true; all linters; | |
# real 1m21.400s | |
# user 9m15.791s | |
# sys 0m23.129s | |
# | |
# command to run | |
# GOLANGCI_LINT_CACHE=/tmp/cog golangci-lint run ./... | jq > /tmp/resultsb.json && bat /tmp/resultsb.json | |
# | |
# | |
run: | |
concurrency: 8 | |
timeout: 5m | |
tests: false # when true adds about 50% more issues | |
output: | |
format: json | |
linters: | |
disable-all: true | |
enable: | |
# still to be looked at | |
# - asasalint | |
# - asciicheck | |
# - bidichk | |
# - containedctx | |
# - depguard | |
# - dogsled | |
# - durationcheck | |
# - errchkjson | |
# - errname | |
# - errorlint | |
# - execinquery | |
# - exhaustive | |
# - exhaustruct | |
# - forbidigo | |
# - funlen | |
# - gochecknoinits | |
# - goconst | |
# - gocritic | |
# - gocyclo | |
# - godot | |
# - godox | |
# - gofmt | |
# - gofumpt | |
# - goheader | |
# - goimports | |
# - gomnd | |
# - gomoddirectives | |
# - gomodguard | |
# - goprintffuncname | |
# - gosec | |
# - lll | |
# - logrlint | |
# - makezero | |
# - misspell | |
# - nakedret | |
# - nolintlint | |
# - nonamedreturns | |
# - paralleltest | |
# - revive | |
# - thelper | |
# - wsl | |
# Linter that I don't think would be much use to us | |
# - wrapcheck # 1000 issue | |
# - whitespace # 300 issue has auto fix | |
# - varnamelen # 375 checks length of variable names | |
# - usestdlibvars # 31 I like this linter | |
# - unparam # 46 | |
# - unconvert # 12 but none of the issue seem to be that big of an issue or is false positve | |
# - tparallel # current config excludes test files | |
# - decorder # no issue found | |
# - forcetypeassert # 40 issues. Not sure what issue it sloves | |
# - gci # not sure if there is a configuration issue | |
# - goerr113 # 631 | |
# - grouper | |
# - ireturn # 85 | |
# - nestif # 44 seems to wrap gocognit | |
# - nlreturn # 1563 styling issue | |
# - stylecheck # 520 | |
# - predeclared # 0 | |
# - tagliatelle # 50 viladates json and yaml styles. We would be better finding validators for the file types first | |
# - tenv # 3 run.test needs to be set to true | |
# - testpackage # 77 this would be a nice to have | |
# The linters below are unstandard linters that I thick we could benfit from. | |
# - bodyclose # 38 | |
# - contextcheck # 19 should learn why this should be done | |
# - cyclop # 130 par would need to be looked at as the reconcilers have very high numbers | |
# - dupl # 18 could have lots of false postives | |
# - exportloopref # 0 issue also found by gosec | |
# - gochecknoglobals # 440 globals can lead to unexpected states | |
# - gocognit # 44 works out values differently to cyclop but has same issue as reconcilers | |
# - importas # needs configurting of linters-settings # 27 or 9 with one configuratio, value depend on the alais | |
# - interfacebloat # 3 this is an interesting degsin pattern | |
# - maintidx # 21 like cyclop and gocognit | |
# - nilerr # 43 this could help with logging of error | |
# - nilnil # 20 | |
# - noctx # 68 | |
# - nosprintfhostport # 4 | |
# - prealloc # 15 might be possible to get some preformance here | |
# - promlinter # 1 | |
# - reassign # 0 This real good that we have zero | |
# On by default | |
- errcheck # 7 | |
# - gosimple # 89 | |
# - govet # 0 | |
# - ineffassign # 56 this one is showing up localations with bad error check which could be causing bugs. | |
# - staticcheck # 101 will need some configuration but is seeing possible bugs | |
# - typecheck # 0 | |
# - unused # 41 | |
# enable-all: true # 18351 including test folders | |
# disable: | |
# - exhaustivestruct | |
# - varcheck | |
# - interfacer | |
# - golint | |
# - deadcode | |
# - nosnakecase | |
# - scopelint | |
# - ifshort | |
# - structcheck | |
# - maligned | |
# - rowserrcheck | |
# - sqlclosecheck | |
# - structcheck | |
# - wastedassign | |
issues: | |
max-issues-per-linter: 0 | |
max-same-issues: 0 | |
linters-settings: | |
importas: | |
no-unaliased: true | |
# no-extra-aliases: true # 2625 reports alias not listed below but also imports that are not aliased | |
alias: | |
- pkg: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1 | |
alias: monitoringv1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment