version: "2"

linters:
  default: standard

  enable:
    - bidichk # dangerous Unicode chars
    - bodyclose # HTTP response body is closed
    - exptostd # functions from golang.org/x/exp/ that can be replaced by std functions
    - forcetypeassert # forced type assertions
    - gosec # security problems
    - loggercheck # key value pairs for common logger libraries (including zap)
    - misspell # commonly misspelled English words
    - nosprintfhostport # misuse of Sprintf to construct a host with port in a URL
    - rowserrcheck # Rows.Err of rows is checked
    - sqlclosecheck # sql.Rows, sql.Stmt, sqlx.NamedStmt, pgx.Query are closed

  settings:
    staticcheck:
      checks:
        - all
        - '-ST1000' # ignore missing package comments
        - '-ST1003' # ignore capitalization in camel case names
