~mna/zzterm

3fa8ef0a193ca1be8e38784671c49f99e9036e61 — Martin Angers 3 years ago a24b1fe
Update golangci linters
2 files changed, 65 insertions(+), 34 deletions(-)

D .golangci.toml
A .golangci.yml
D .golangci.toml => .golangci.toml +0 -34
@@ 1,34 0,0 @@
[linters]
  disable-all = true
  enable = [
    "deadcode",
    "errcheck",
    "gochecknoinits",
    "gochecknoglobals",
    "gofmt",
    "golint",
    "gosec",
    "gosimple",
    "govet",
    "ineffassign",
    "misspell",
    "nakedret",
    "prealloc",
    "staticcheck",
    "structcheck",
    "typecheck",
    "unconvert",
    "unparam",
    "varcheck",
  ]

[issues]
  # regexps of issue texts to exclude
  # NOTE: using this instead of [[issues.exclude-rules]] as vim/ALE respects those
  # exclusions, but does not respect the specific exclude-rules(?).
  exclude = [
    "`Benchmark.+` is a global variable",
    "`defaultEsc` is a global variable",
    "`keyNames` is a global variable",
  ]


A .golangci.yml => .golangci.yml +65 -0
@@ 0,0 1,65 @@
linters:
  disable-all: true
  enable:
    - deadcode
    - depguard
    - errcheck
    - gci
    - gochecknoinits
    - goconst
    - gofmt
    - gosec
    - gosimple
    - govet
    - importas
    - ineffassign
    - misspell
    - nakedret
    - prealloc
    - revive
    - staticcheck
    - structcheck
    - typecheck
    - unconvert
    - unparam
    - unused
    - varcheck

linters-settings:
  gosec:
    excludes:

  revive:
    ignoreGeneratedHeader: false
    severity: "warning"
    confidence: 0.8
    errorCode: 0
    warningCode: 0

    rules:
      - name: blank-imports
      - name: context-as-argument
      - name: context-keys-type
      - name: dot-imports
      - name: error-return
      - name: error-strings
      - name: error-naming
      - name: exported
      - name: increment-decrement
      - name: var-naming
      - name: var-declaration
      - name: package-comments
      - name: range
      - name: receiver-naming
      - name: time-naming
      - name: unexported-return
      - name: indent-error-flow
      - name: errorf
      - name: empty-block
      - name: superfluous-else
      - name: unused-parameter
      - name: unreachable-code
      - name: redefines-builtin-id

issues:
  exclude-rules: