Skip to content

Commit 9b52349

Browse files
authored
docs: add jsonschema (#4487)
1 parent d18acc5 commit 9b52349

File tree

4 files changed

+7023
-0
lines changed

4 files changed

+7023
-0
lines changed

.github/workflows/post-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ jobs:
6565
- name: Update reference files
6666
run: cp .golangci.next.reference.yml .golangci.reference.yml
6767

68+
- name: Update JSON schema files
69+
run: cp jsonschema/golangci.next.jsonschema.json jsonschema/golangci.jsonschema.json
70+
6871
- name: Update information
6972
run: make website_dump_info
7073

jsonschema/custom-gcl.jsonschema.json

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$ref": "#/$defs/Configuration",
4+
"$defs": {
5+
"Configuration": {
6+
"properties": {
7+
"version": {
8+
"type": "string",
9+
"description": "golangci-lint version."
10+
},
11+
"name": {
12+
"type": "string",
13+
"description": "Name of the binary."
14+
},
15+
"destination": {
16+
"type": "string",
17+
"description": "Destination is the path to a directory to store the binary."
18+
},
19+
"plugins": {
20+
"items": {
21+
"$ref": "#/$defs/Plugin"
22+
},
23+
"type": "array",
24+
"description": "Plugins information."
25+
}
26+
},
27+
"additionalProperties": false,
28+
"type": "object",
29+
"required": [
30+
"version"
31+
],
32+
"description": "Configuration represents the configuration file."
33+
},
34+
"Plugin": {
35+
"oneOf": [
36+
{
37+
"required": [
38+
"version"
39+
],
40+
"title": "version"
41+
},
42+
{
43+
"required": [
44+
"path"
45+
],
46+
"title": "path"
47+
}
48+
],
49+
"properties": {
50+
"module": {
51+
"type": "string",
52+
"description": "Module name."
53+
},
54+
"import": {
55+
"type": "string",
56+
"description": "Import to use."
57+
},
58+
"version": {
59+
"type": "string",
60+
"description": "Version of the module.\nOnly for module available through a Go proxy."
61+
},
62+
"path": {
63+
"type": "string",
64+
"description": "Path to the local module.\nOnly for local module."
65+
}
66+
},
67+
"additionalProperties": false,
68+
"type": "object",
69+
"required": [
70+
"module"
71+
],
72+
"description": "Plugin represents information about a plugin."
73+
}
74+
},
75+
"description": "mygcl configuration definition file"
76+
}

0 commit comments

Comments
 (0)