AlexNabokikh/tfsort

View on GitHub
.golangci.yaml

Summary

Maintainability
Test Coverage
run:
  # number of concurrent linters
  concurrency: 4
  # exit code when issues were found
  issues-exit-code: 1
  tests: true

issues:
  exclude-dirs:
    - vendor$

output:
  formats:
    - format: colored-line-number
      path: stdout
  print-issued-lines: true
  print-linter-name: true
  uniq-by-line: true
  sort-results: true

linters-settings:
  errcheck:
    # Check type assertions
    check-type-assertions: false
    # Check assignments on blank identifiers
    check-blank: false
  lll:
    line-length: 150
    tab-width: 4

  govet:
    # Check for shadowed variables
    enable:
      - shadow

  gofmt:
    simplify: true

  gosec:
    # Exclude files that were generated by the protocol buffer compiler
    exclude-generated: false
    severity: medium
    confidence: medium
    excludes:
      # Poor file permissions used when writing to a new file
      - G306

  misspell:
    locale: US

  staticcheck:
    checks: ["all", "-SA1019"]

  stylecheck:
    checks:
      ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"]
    # https://staticcheck.io/docs/options#dot_import_whitelist
    dot-import-whitelist:
      - fmt
    # https://staticcheck.io/docs/options#initialisms
    initialisms:
      [
        "ACL",
        "API",
        "ASCII",
        "CPU",
        "CSS",
        "DNS",
        "EOF",
        "GUID",
        "HTML",
        "HTTP",
        "HTTPS",
        "ID",
        "IP",
        "JSON",
        "QPS",
        "RAM",
        "RPC",
        "SLA",
        "SMTP",
        "SQL",
        "SSH",
        "TCP",
        "TLS",
        "TTL",
        "UDP",
        "UI",
        "GID",
        "UID",
        "UUID",
        "URI",
        "URL",
        "UTF8",
        "VM",
        "XML",
        "XMPP",
        "XSRF",
        "XSS",
      ]
    # https://staticcheck.io/docs/options#http_status_code_whitelist
    http-status-code-whitelist: ["200", "400", "404", "500"]

  whitespace:
    # Enforces newlines (or comments) after every multi-line if statement
    multi-if: true
    # Enforces newlines (or comments) after every multi-line function signature
    multi-func: true

linters:
  enable-all: true
  disable:
    - copyloopvar
    - depguard
    - dupl
    - err113
    - execinquery
    - exhaustruct
    - forbidigo
    - funlen
    - gochecknoinits
    - goconst
    - godot
    - gofumpt
    - gomnd
    - intrange
    - mnd
    - paralleltest
    - rowserrcheck
    - sqlclosecheck
    - tagliatelle
    - tparallel
    - varnamelen
    - wastedassign
    - wrapcheck