version: "2"
linters:
  default: none
  enable:
    - bodyclose
    - errcheck
    - goheader
    - govet
    - ineffassign
    - misspell
    - revive
    - staticcheck
    - whitespace
  settings:
    goheader:
      template-path: copyright.tmpl
    misspell:
      locale: US,UK
    staticcheck:
      checks:
        - ST1019
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    paths:
      - third_party$
      - builtin$
      - examples$
      - .*_test\.go
      - .*test\.go
      - testing
      - src/jobservice/mgt/mock_manager.go
formatters:
  enable:
    - gofmt
    - goimports
  settings:
    gofmt:
      simplify: false
    goimports:
      local-prefixes:
        - github.com/goharbor/harbor
  exclusions:
    generated: lax
    paths:
      - third_party$
      - builtin$
      - examples$
      - .*_test\.go
      - .*test\.go
      - testing
      - src/jobservice/mgt/mock_manager.go
