|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +version: "2" |
| 19 | +linters: |
| 20 | + exclusions: |
| 21 | + paths: |
| 22 | + - answer-data |
| 23 | + - ui |
| 24 | + - i18n |
| 25 | + enable: |
| 26 | + - asasalint # checks for pass []any as any in variadic func(...any) |
| 27 | + - asciicheck # checks that your code does not contain non-ASCII identifiers |
| 28 | + - bidichk # checks for dangerous unicode character sequences |
| 29 | + - bodyclose # checks whether HTTP response body is closed successfully |
| 30 | + - canonicalheader # checks whether net/http.Header uses canonical header |
| 31 | + - copyloopvar # detects places where loop variables are copied (Go 1.22+) |
| 32 | + - gocritic # provides diagnostics that check for bugs, performance and style issues |
| 33 | + - misspell # finds commonly misspelled English words in comments and strings |
| 34 | + - modernize # detects code that can be modernized to use newer Go features |
| 35 | + - testifylint # checks usage of github.com/stretchr/testify |
| 36 | + - unconvert # removes unnecessary type conversions |
| 37 | + - unparam # reports unused function parameters |
| 38 | + - whitespace # detects leading and trailing whitespace |
| 39 | + |
| 40 | +formatters: |
| 41 | + enable: |
| 42 | + - gofmt |
| 43 | + - goimports |
| 44 | + settings: |
| 45 | + gofmt: |
| 46 | + simplify: true |
| 47 | + rewrite-rules: |
| 48 | + - pattern: 'interface{}' |
| 49 | + replacement: 'any' |
0 commit comments