|
| 1 | +version: "2" |
| 2 | + |
1 | 3 | # Options for analysis running. |
2 | 4 | run: |
3 | | - # Timeout for analysis, e.g. 30s, 5m. |
4 | | - # Default: 1m |
5 | | - timeout: 10m |
6 | | - |
7 | | - # The default concurrency value is the number of available CPU. |
8 | | - concurrency: 4 |
9 | | - |
10 | | - # Which dirs to skip: issues from them won't be reported. |
11 | | - # Can use regexp here: `generated.*`, regexp is applied on full path, |
12 | | - # including the path prefix if one is set. |
13 | | - # Default value is empty list, |
14 | | - # but default dirs are skipped independently of this option's value (see skip-dirs-use-default). |
15 | | - # "/" will be replaced by current OS file path separator to properly work on Windows. |
16 | | - skip-dirs: |
17 | | - - bin |
18 | | - - docs |
19 | | - - examples |
20 | | - - hack |
21 | | - |
22 | | -# output configuration options. |
23 | | -output: |
24 | | - # Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity |
25 | | - # |
26 | | - # Multiple can be specified by separating them by comma, output can be provided |
27 | | - # for each of them by separating format name and path by colon symbol. |
28 | | - # Output path can be either `stdout`, `stderr` or path to the file to write to. |
29 | | - # Example: "checkstyle:report.xml,json:stdout,colored-line-number" |
30 | | - # |
31 | | - # Default: colored-line-number |
32 | | - format: colored-line-number |
33 | | - |
34 | | - # Print lines of code with issue. |
35 | | - # Default: true |
36 | | - print-issued-lines: true |
37 | | - |
38 | | - # Print linter name in the end of issue text. |
39 | | - # Default: true |
40 | | - print-linter-lines: true |
| 5 | + # Timeout for total work, e.g. 30s, 5m, 5m30s. |
| 6 | + # If the value is lower or equal to 0, the timeout is disabled. |
| 7 | + # Default: 0 (disabled) |
| 8 | + timeout: 5m |
41 | 9 |
|
42 | 10 | linters: |
43 | | - # Disable all linters. |
44 | | - disable-all: true |
45 | | - |
46 | | - # Enable specific linter |
47 | | - # https://golangci-lint.run/usage/linters/#enabled-by-default |
48 | | - enable: |
49 | | - # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases. |
50 | | - - errcheck |
51 | | - |
52 | | - # Linter for Go source code that specializes in simplifying code. |
53 | | - - gosimple |
54 | | - |
55 | | - # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string. |
56 | | - - govet |
57 | | - |
58 | | - # Detects when assignments to existing variables are not used. |
59 | | - - ineffassign |
60 | | - |
61 | | - # It's a set of rules from staticcheck. It's not the same thing as the staticcheck binary. |
62 | | - # The author of staticcheck doesn't support or approve the use of staticcheck as a library inside golangci-lint. |
63 | | - - staticcheck |
64 | | - |
65 | | - # Check import statements are formatted according to the 'goimport' command. Reformat imports in autofix mode. |
66 | | - - goimports |
67 | | - |
68 | | - # Checks whether HTTP response body is closed successfully. |
69 | | - - bodyclose |
70 | | - |
71 | | - # Provides diagnostics that check for bugs, performance and style issues. |
72 | | - # Extensible without recompilation through dynamic rules. |
73 | | - # Dynamic rules are written declaratively with AST patterns, filters, report message and optional suggestion. |
74 | | - - gocritic |
75 | | - |
76 | | - # Gofmt checks whether code was gofmt-ed. By default, this tool runs with -s option to check for code simplification. |
77 | | - - gofmt |
78 | | - |
79 | | - # Finds repeated strings that could be replaced by a constant. |
80 | | - - goconst |
81 | | - |
82 | | - # Finds commonly misspelled English words in comments. |
83 | | - - misspell |
84 | | - |
85 | | - # Finds naked returns in functions greater than a specified function length. |
86 | | - - nakedret |
87 | | - |
88 | | -linters-settings: |
89 | | - goimports: |
90 | | - # A comma-separated list of prefixes, which, if set, checks import paths |
91 | | - # with the given prefixes are grouped after 3rd-party packages. |
92 | | - # Default: "" |
93 | | - local-prefixes: github.com/GreptimeTeam/gtctl |
94 | | - linters-settings: |
95 | | - min-occurrences: 3 |
| 11 | + # Default set of linters. |
| 12 | + # The value can be: |
| 13 | + # - `standard`: https://golangci-lint.run/docs/linters/#enabled-by-default |
| 14 | + # - `all`: enables all linters by default. |
| 15 | + # - `none`: disables all linters by default. |
| 16 | + # - `fast`: enables only linters considered as "fast" (`golangci-lint help linters --json | jq '[ .[] | select(.fast==true) ] | map(.name)'`). |
| 17 | + # Default: standard |
| 18 | + default: standard |
| 19 | + |
| 20 | +formatters: |
| 21 | + # Enable specific formatter. |
| 22 | + # Default: [] (uses standard Go formatting) |
| 23 | + enable: [] |
0 commit comments