Skip to content

Commit 8c0d5fb

Browse files
committed
Require type for oneOf mutual exclusion
1 parent 2c1d661 commit 8c0d5fb

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

jsonschema/golangci.jsonschema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3846,7 +3846,8 @@
38463846
{
38473847
"properties": {
38483848
"type": {"enum": ["module"] }
3849-
}
3849+
},
3850+
"required": ["type"]
38503851
},
38513852
{
38523853
"required": ["path"]

jsonschema/golangci.next.jsonschema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3846,7 +3846,8 @@
38463846
{
38473847
"properties": {
38483848
"type": {"enum": ["module"] }
3849-
}
3849+
},
3850+
"required": ["type"]
38503851
},
38513852
{
38523853
"required": ["path"]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
linters-settings:
2+
custom:
3+
foo:
4+
type: "goplugin"
5+
path: "bin/linter/myplugin.so"
6+
description: I am a Go plugin system-based custom linter.
7+
settings:
8+
message: hello
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
linters-settings:
2+
custom:
3+
foo:
4+
type: "module"
5+
description: I am a module-based custom linter.
6+
settings:
7+
message: hello
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
linters-settings:
2+
custom:
3+
foo:
4+
path: "bin/linter/myplugin.so"
5+
description: >
6+
I didn't specify the type, so I am a Go plugin system-based custom linter.
7+
As such, I need to be specified the path.
8+
settings:
9+
message: hello

0 commit comments

Comments
 (0)