From c047ed6005656fab687ac5af1a250848e42e7788 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 13 Mar 2024 00:19:26 +0100 Subject: [PATCH] docs: publish JSON schema on golangci-lint.run (#4488) --- Makefile | 4 +++ docs/package.json | 2 +- docs/static/.gitignore | 1 + jsonschema/golangci.next.jsonschema.json | 40 +----------------------- 4 files changed, 7 insertions(+), 40 deletions(-) create mode 100644 docs/static/.gitignore diff --git a/Makefile b/Makefile index f7d3e13c..b9672708 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,10 @@ go.mod: FORCE go mod verify go.sum: go.mod +website_copy_jsonschema: + cp -r ./jsonschema ./docs/static +.PHONY: website_copy_jsonschema + website_expand_templates: go run ./scripts/website/expand_templates/ .PHONY: website_expand_templates diff --git a/docs/package.json b/docs/package.json index 5c6fa5eb..e062f622 100644 --- a/docs/package.json +++ b/docs/package.json @@ -51,7 +51,7 @@ "gatsby-plugin-netlify": "^5.1.0" }, "scripts": { - "build": "make -C .. website_expand_templates && gatsby build", + "build": "make -C .. website_expand_templates website_copy_jsonschema && gatsby build", "start": "gatsby develop", "serve": "gatsby serve", "clean": "gatsby clean" diff --git a/docs/static/.gitignore b/docs/static/.gitignore new file mode 100644 index 00000000..ef830321 --- /dev/null +++ b/docs/static/.gitignore @@ -0,0 +1 @@ +/jsonschema/ diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json index 45dece6d..e2a30045 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -1308,6 +1308,7 @@ }, "goheader": { "type": "object", + "additionalProperties": false, "allOf": [ { "properties": { @@ -1393,45 +1394,6 @@ "type": "object", "additionalProperties": false, "properties": { - "settings": { - "type": "object", - "properties": { - "mnd": { - "type": "object", - "properties": { - "ignored-files": { - "description": "Comma-separated list of file patterns to exclude from the analysis.", - "examples": ["magic1_.*.go"], - "type": "string" - }, - "ignored-functions": { - "description": "Comma-separated list of function patterns to exclude from the analysis.", - "examples": ["math.*,http.StatusText,make"], - "type": "string" - }, - "ignored-numbers": { - "description": "Comma-separated list of numbers to exclude from the analysis.", - "examples": ["1000,1234_567_890,3.14159264"], - "type": "string" - }, - "checks": { - "description": "The list of enabled checks.", - "type": "array", - "items": { - "enum": [ - "argument", - "case", - "condition", - "operation", - "return", - "assign" - ] - } - } - } - } - } - }, "ignored-files": { "description": "List of file patterns to exclude from analysis.", "examples": [["magic1_.*.go"]],