6
6
7
7
# Options for analysis running.
8
8
run :
9
- # The default concurrency value is the number of available CPU.
9
+ # Number of CPUs to use when running golangci-lint.
10
+ # Default: the number of logical CPUs in the machine
10
11
concurrency : 4
11
12
12
13
# Timeout for analysis, e.g. 30s, 5m.
22
23
tests : false
23
24
24
25
# List of build tags, all linters use it.
25
- # Default: [].
26
+ # Default: []
26
27
build-tags :
27
28
- mytag
28
29
29
30
# Which dirs to skip: issues from them won't be reported.
30
31
# Can use regexp here: `generated.*`, regexp is applied on full path,
31
32
# including the path prefix if one is set.
32
- # Default value is empty list,
33
- # but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
33
+ # Default dirs are skipped independently of this option's value (see skip-dirs-use-default).
34
34
# "/" will be replaced by current OS file path separator to properly work on Windows.
35
+ # Default: []
35
36
skip-dirs :
36
37
- src/external_libs
37
38
- autogenerated_by_my_lib
42
43
skip-dirs-use-default : false
43
44
44
45
# Which files to skip: they will be analyzed, but issues from them won't be reported.
45
- # Default value is empty list,
46
- # but there is no need to include all autogenerated files,
46
+ # There is no need to include all autogenerated files,
47
47
# we confidently recognize autogenerated files.
48
- # If it's not please let us know.
48
+ # If it's not, please let us know.
49
49
# "/" will be replaced by current OS file path separator to properly work on Windows.
50
+ # Default: []
50
51
skip-files :
51
52
- " .*\\ .my\\ .go$"
52
53
- lib/bad.go
53
54
54
- # If set we pass it to "go list -mod={option}". From "go help modules":
55
+ # If set, we pass it to "go list -mod={option}". From "go help modules":
55
56
# If invoked with -mod=readonly, the go command is disallowed from the implicit
56
57
# automatic updating of go.mod described above. Instead, it fails when any changes
57
58
# to go.mod are needed. This setting is most useful to check that go.mod does
61
62
# the dependency descriptions in go.mod.
62
63
#
63
64
# Allowed values: readonly|vendor|mod
64
- # By default, it isn't set.
65
+ # Default: ""
65
66
modules-download-mode : readonly
66
67
67
68
# Allow multiple parallel golangci-lint instances running.
68
- # If false (default) - golangci-lint acquires file lock on start.
69
+ # If false, golangci-lint acquires file lock on start.
70
+ # Default: false
69
71
allow-parallel-runners : false
70
72
71
73
# Define the Go version limit.
@@ -99,11 +101,12 @@ output:
99
101
uniq-by-line : false
100
102
101
103
# Add a prefix to the output file references.
102
- # Default is no prefix.
104
+ # Default: ""
103
105
path-prefix : " "
104
106
105
107
# Sort results by: filepath, line and column.
106
- sort-results : false
108
+ # Default: false
109
+ sort-results : true
107
110
108
111
109
112
# All available settings of specific linters.
@@ -2564,6 +2567,7 @@ linters:
2564
2567
2565
2568
# Enable presets.
2566
2569
# https://golangci-lint.run/usage/linters
2570
+ # Default: []
2567
2571
presets :
2568
2572
- bugs
2569
2573
- comment
@@ -2631,7 +2635,7 @@ issues:
2631
2635
# Independently of option `exclude` we use default exclude patterns,
2632
2636
# it can be disabled by this option.
2633
2637
# To list all excluded by default patterns execute `golangci-lint run --help`.
2634
- # Default: true.
2638
+ # Default: true
2635
2639
exclude-use-default : false
2636
2640
2637
2641
# If set to true exclude and exclude-rules regular expressions become case-sensitive.
@@ -2674,16 +2678,19 @@ issues:
2674
2678
# It's not practical to fix all existing issues at the moment of integration:
2675
2679
# much better don't allow issues in new code.
2676
2680
#
2677
- # Default: false.
2681
+ # Default: false
2678
2682
new : true
2679
2683
2680
2684
# Show only new issues created after git revision `REV`.
2685
+ # Default: ""
2681
2686
new-from-rev : HEAD
2682
2687
2683
2688
# Show only new issues created in git patch with set file path.
2689
+ # Default: ""
2684
2690
new-from-patch : path/to/patch/file
2685
2691
2686
2692
# Fix found issues (if it's supported by the linter).
2693
+ # Default: false
2687
2694
fix : true
2688
2695
2689
2696
@@ -2698,7 +2705,7 @@ severity:
2698
2705
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
2699
2706
# - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance
2700
2707
#
2701
- # Default value is an empty string.
2708
+ # Default: ""
2702
2709
default-severity : error
2703
2710
2704
2711
# If set to true `severity-rules` regular expressions become case-sensitive.
0 commit comments