fix(renovate): add renovate.json validation to lint-backend

Also catch the warning about JSON5 as an error because it will fail
the renovate run.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3619
This commit is contained in:
Earl Warren 2024-06-18 12:42:28 +02:00
parent abde31148f
commit 7e0ab55e5f
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 10 additions and 2 deletions

View file

@ -39,6 +39,7 @@ GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 # renovate: datasour
DEADCODE_PACKAGE ?= golang.org/x/tools/cmd/deadcode@v0.22.0 # renovate: datasource=go
GOMOCK_PACKAGE ?= go.uber.org/mock/mockgen@v0.4.0 # renovate: datasource=go
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.15.3 # renovate: datasource=go
RENOVATE_NPM_PACKAGE ?= renovate@37.411.0 # renovate: datasource=npm
DOCKER_IMAGE ?= gitea/gitea
DOCKER_TAG ?= latest
@ -239,6 +240,7 @@ help:
@echo " - lint-md lint markdown files"
@echo " - lint-swagger lint swagger files"
@echo " - lint-templates lint template files"
@echo " - lint-renovate lint renovate files"
@echo " - lint-yaml lint yaml files"
@echo " - lint-spell lint spelling"
@echo " - lint-spell-fix lint spelling and fix issues"
@ -398,7 +400,7 @@ lint-frontend: lint-js lint-css
lint-frontend-fix: lint-js-fix lint-css-fix
.PHONY: lint-backend
lint-backend: lint-go lint-go-vet lint-editorconfig
lint-backend: lint-go lint-go-vet lint-editorconfig lint-renovate
.PHONY: lint-backend-fix
lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
@ -435,6 +437,12 @@ lint-css-fix: node_modules
lint-swagger: node_modules
npx spectral lint -q -F hint $(SWAGGER_SPEC)
.PHONY: lint-renovate
lint-renovate: node_modules
npx --yes --package $(RENOVATE_NPM_PACKAGE) -- renovate-config-validator --strict > .lint-renovate 2>&1 || true
@if grep --quiet --extended-regexp -e '^( WARN:|ERROR:)' .lint-renovate ; then cat .lint-renovate ; rm .lint-renovate ; exit 1 ; fi
@rm .lint-renovate
.PHONY: lint-md
lint-md: node_modules
npx markdownlint docs *.md

View file

@ -56,7 +56,7 @@
{
"description": "elasticsearch CI images are published about once a month and do not use semantic versioning or short tags",
"matchDepNames": [
"elasticsearch",
"elasticsearch"
],
"extends": ["schedule:quarterly"]
},