# Copyright 2023 The Authors (see AUTHORS file) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. run: # default: '1m' timeout: '5m' # default: [] build-tags: - 'all' # default: [] exclude-dirs: - 'third_party' # default: true skip-dirs-use-default: false # default: '' modules-download-mode: 'readonly' # default: false allow-parallel-runners: true linters: enable: - 'asasalint' - 'asciicheck' - 'bidichk' - 'bodyclose' - 'containedctx' - 'dupword' - 'durationcheck' - 'errcheck' - 'errchkjson' - 'errname' - 'errorlint' - 'execinquery' - 'exhaustive' - 'exportloopref' - 'forcetypeassert' - 'gci' - 'gocheckcompilerdirectives' - 'godot' - 'gofmt' - 'gofumpt' - 'goheader' - 'goimports' - 'goprintffuncname' - 'gosec' - 'gosimple' - 'govet' - 'importas' - 'ineffassign' - 'loggercheck' - 'makezero' - 'mirror' - 'misspell' - 'nilerr' - 'noctx' - 'nolintlint' - 'nosprintfhostport' - 'paralleltest' - 'prealloc' - 'predeclared' - 'protogetter' - 'rowserrcheck' - 'sloglint' - 'spancheck' - 'sqlclosecheck' - 'staticcheck' - 'stylecheck' - 'tenv' - 'thelper' - 'typecheck' - 'unconvert' - 'unused' - 'wastedassign' - 'whitespace' - 'wrapcheck' issues: # default: [] exclude: - '^G102:' # gosec: we have to bind to all ifaces in Cloud Run services # default: [] exclude-rules: # Exclude test files from certain linters - path: '_test.go' linters: - 'wrapcheck' # default: 50 max-issues-per-linter: 0 # default: 3 max-same-issues: 0 gci: sections: - 'standard' - 'default' - 'blank' - 'dot' skip-generated: true custom-order: true gofumpt: # default: false extra-rules: true sloglint: # default: false context-only: true # default: false static-msg: false # default: '' (snake, kebab, camel, pascal) key-naming-case: 'snake' # default: false args-on-sep-lines: true severity: # default: '' default-severity: 'error'