run:
  deadline: 5m
  timeout: 5m
  skip-dirs-use-default: true
  #skip the protobuf generated files
  skip-dirs:
    - pb
    - proto
  skip-files:
    - pql/pql.peg.go
linters:
  enable:
    # Recommended to be enabled by default (https://golangci-lint.run).
    # - errcheck (lots to fix)
    - gosimple
    - govet
    - ineffassign
    - staticcheck
    - typecheck
    # - unused (about 20 to fix)

    # Additional linters we choose to enable.
    # - bodyclose (lots to fix, but we should)
    - errchkjson
    - errname
    - gofmt
    # - misspell (lots to fix, but we should)
    - prealloc
    # - predeclared (20 to fix)
    # - stylecheck (quite a lot to fix, but we should definitely work on this)
    - stylecheck
    # - unconvert (not at all critical, but makes for cleaner code)
  enable-all: false
  disable-all: true

output:
  # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
  format: tab
  # print lines of code with issue, default is true
  print-issued-lines: true
  # print linter name in the end of issue text, default is true
  print-linter-name: true

linters-settings:
  gofmt:
    simplify: true
  govet:
    # report about shadowed variables
    check-shadowing: true


    # settings per analyzer
    settings:
      printf: # analyzer name, run `go tool vet help` to see all analyzers
        funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
          - (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

    # enable or disable analyzers by name
    # run `go tool vet help` to see all analyzers
    enable:
      - atomicalign
    enable-all: false
    disable:
      - shadow
    disable-all: false

  stylecheck:
    # ST1000: at least one file in a package should have a package comment
    # ST1003: golang naming standards
    # ST1016: methods on the same type should have the same receiver name
    # ST1020: comment on exported function
    checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020"]

issues:
  exclude-use-default: false
  max-issues-per-linter: 0
  max-same-issues: 0
  exclude:
    - 'declaration of "(err|ctx)" shadows declaration at'
    - 'Error return value of .(.*\.Help|.*\.MarkFlagRequired|(os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked'
