133 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			133 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| linters-settings:
 | |
|   # depguard: // Specific for golangci repository
 | |
|   #   list-type: blacklist
 | |
|   #   packages:
 | |
|   #     # logging is allowed only by logutils.Log, logrus
 | |
|   #     # is allowed to use only in logutils package
 | |
|   #     - github.com/sirupsen/logrus
 | |
|   #   packages-with-error-message:
 | |
|   #     - github.com/sirupsen/logrus: 'logging is allowed only by logutils.Log'
 | |
|   dupl:
 | |
|     threshold: 100
 | |
|   funlen:
 | |
|     lines: 100
 | |
|     statements: 50
 | |
|   gci:
 | |
|     sections:
 | |
|       prefix(fetchsysd)
 | |
|   goconst:
 | |
|     min-len: 2
 | |
|     min-occurrences: 2
 | |
|   gocritic:
 | |
|     enabled-tags:
 | |
|       - diagnostic
 | |
|       - experimental
 | |
|       - opinionated
 | |
|       - performance
 | |
|       - style
 | |
|     disabled-checks:
 | |
|       - dupImport # https://github.com/go-critic/go-critic/issues/845
 | |
|       - ifElseChain
 | |
|       - octalLiteral
 | |
|       # - whyNoLint
 | |
|       - wrapperFunc
 | |
|   gocyclo:
 | |
|     min-complexity: 15
 | |
|   goimports:
 | |
|     local-prefixes: localenv
 | |
|   mnd:
 | |
|     # don't include the "operation" and "assign"
 | |
|     checks:
 | |
|       - argument
 | |
|       - case
 | |
|       - condition
 | |
|       - return
 | |
|   govet:
 | |
|     shadow: true
 | |
|     # settings: // Specific for golangci repository
 | |
|     #   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: 200
 | |
|   maligned:
 | |
|     suggest-new: true
 | |
|   misspell:
 | |
|     locale: US
 | |
|   nolintlint:
 | |
|     allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
 | |
|     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
 | |
|   errcheck:
 | |
|     check-blank: true
 | |
|     exclude-functions:
 | |
|       - '(*github.com/gin-gonic/gin.Error).SetType'
 | |
|       - '(*github.com/gin-gonic/gin.Context).Error'
 | |
| 
 | |
| linters:
 | |
|   disable-all: true
 | |
|   enable:
 | |
|     - bodyclose
 | |
|     # - deadcode # deprecated (since v1.49.0)
 | |
|     # - depguard
 | |
|     - dogsled
 | |
|     - dupl
 | |
|     - errcheck
 | |
|     - copyloopvar
 | |
|     - exhaustive
 | |
|     - funlen
 | |
|     - gochecknoinits
 | |
|     - goconst
 | |
|     - gocritic
 | |
|     - gocyclo
 | |
|     - gofmt
 | |
|     - goimports
 | |
|     - mnd
 | |
|     - goprintffuncname
 | |
|     - gosec
 | |
|     - gosimple
 | |
|     - govet
 | |
|     - ineffassign
 | |
|     - lll
 | |
|     - misspell
 | |
|     - nakedret
 | |
|     - noctx
 | |
|     - nolintlint
 | |
|     # - rowserrcheck # https://github.com/golangci/golangci-lint/issues/2649
 | |
|     - staticcheck
 | |
|     # - structcheck # https://github.com/golangci/golangci-lint/issues/2649
 | |
|     - stylecheck
 | |
|     - typecheck
 | |
|     - unconvert
 | |
|     - unparam
 | |
|     - unused
 | |
|     # - varcheck # deprecated (since v1.49.0)
 | |
|     - whitespace
 | |
|     # - gochecknoglobals # too many global in ds9
 | |
| 
 | |
|   # don't enable:
 | |
|   # - asciicheck
 | |
|   # - scopelint
 | |
|   # - gocognit
 | |
|   # - godot
 | |
|   # - godox
 | |
|   # - goerr113
 | |
|   # - interfacer
 | |
|   # - maligned
 | |
|   # - nestif
 | |
|   # - prealloc
 | |
|   # - testpackage
 | |
|   # - revive
 | |
|   # - wsl
 | |
| 
 | |
| # issues:
 | |
| # Excluding configuration per-path, per-linter, per-text and per-source
 | |
| # fix: true
 | |
| 
 | |
| run:
 | |
|   timeout: 5m
 | |
|   skip-dirs: [] |