๐Ÿ“ฆ tarampampam / tinifier

๐Ÿ“„ .golangci.yml ยท 150 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.jsonschema.json
# docs: https://golangci-lint.run/usage/configuration/
version: "2"

run:
  modules-download-mode: readonly
  allow-parallel-runners: true

output:
  formats: {text: {path: stdout}}

linters:
  default: none
  enable:
    - asasalint
    - asciicheck
    - bidichk
    - bodyclose
    - contextcheck
    - copyloopvar
    - decorder
    - dogsled
    - dupl
    - dupword
    - durationcheck
    - errcheck
    - errchkjson
    - errname
    - errorlint
    - exhaustive
    - forbidigo
    - funlen
    - gochecknoglobals
    - gochecknoinits
    - gocognit
    - goconst
    - gocritic
    - gocyclo
    - godot
    - goprintffuncname
    - gosec
    - govet
    - ineffassign
    - lll
    - misspell
    - mnd
    - nakedret
    - nestif
    - nlreturn
    - nolintlint
    - prealloc
    - promlinter
    - staticcheck
    - unconvert
    - unused
    - whitespace
    - wsl
  settings:
    dupl:
      threshold: 100
    forbidigo:
      forbid:
        - pattern: ^(fmt\.Print(|f|ln)|print(|ln))(# it looks like a forgotten debugging printing call)?$
    goconst:
      min-len: 2
      min-occurrences: 3
    gocyclo:
      min-complexity: 15
    godot:
      scope: declarations
      capital: false
    govet:
      enable:
        - shadow
    lll:
      line-length: 120
    misspell:
      locale: US
      ignore-rules:
        - cancelled
    nakedret:
      max-func-lines: 100
    nolintlint:
      require-specific: true
    prealloc:
      simple: true
      range-loops: true
      for-loops: true
  exclusions:
    generated: lax
    presets:
      - comments
      - common-false-positives
      - legacy
      - std-error-handling
    rules:
      - linters:
          - dupl
          - dupword
          - funlen
          - gochecknoglobals
          - gocognit
          - goconst
          - lll
          - nlreturn
          - noctx
          - nolintlint
        path: _test\.go
    paths:
      - .github
      - .git
      - __old__
      - tmp
      - temp
      - testdata
      - internal/yaml
      - third_party$
      - builtin$
      - examples$

formatters:
  enable:
    - gci
    - gofmt
    - goimports
  settings:
    gci:
      sections:
        - standard
        - default
        - prefix(gh.tarampamp.am/tinifier)
    gofmt:
      simplify: false
      rewrite-rules:
        - pattern: interface{}
          replacement: any
  exclusions:
    generated: lax
    paths:
      - .github
      - .git
      - __old__
      - tmp
      - temp
      - testdata
      - internal/yaml
      - third_party$
      - builtin$
      - examples$