Skip to content

Commit 56f24e4

Browse files
committed
feat: add configuration version field
1 parent 310150d commit 56f24e4

File tree

141 files changed

+287
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+287
-1
lines changed

.golangci.next.reference.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# This file is not a configuration example,
55
# it contains the exhaustive configuration with explanations of the options.
66

7+
version: "2"
8+
79
linters:
810
# Disable all linters.
911
# Default: false

jsonschema/golangci.next.jsonschema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,12 @@
481481
},
482482
"type": "object",
483483
"additionalProperties": false,
484+
"required": ["version"],
484485
"properties": {
486+
"version": {
487+
"type": "string",
488+
"default": "2"
489+
},
485490
"run": {
486491
"description": "Options for analysis running,",
487492
"type": "object",

pkg/config/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ type Config struct {
2020
cfgDir string // Path to the directory containing golangci-lint config file.
2121
basePath string // Path the root directory related to [Run.RelativePathMode].
2222

23+
Version string `mapstructure:"version"`
24+
2325
Run Run `mapstructure:"run"`
2426

2527
Output Output `mapstructure:"output"`
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
copyloopvar:
35
check-alias: true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
cyclop:
35
max-complexity: 15

pkg/golinters/decorder/testdata/decorder_custom.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
decorder:
35
dec-order:

pkg/golinters/depguard/testdata/depguard.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
depguard:
35
rules:

pkg/golinters/depguard/testdata/depguard_additional_guards.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
depguard:
35
rules:

pkg/golinters/depguard/testdata/depguard_ignore_file_rules.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
depguard:
35
rules:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: "2"
2+
13
linters-settings:
24
dupl:
35
threshold: 20

0 commit comments

Comments
 (0)