From c2b227de1cc8f3db609895dd01570049e3bc0505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp?= Date: Sat, 13 Jan 2024 11:12:33 +0000 Subject: [PATCH 1/3] Recommend npx to run validator --- docs/usage/config-validation.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/usage/config-validation.md b/docs/usage/config-validation.md index f6b6f36a362f11..d8a607122a55c9 100644 --- a/docs/usage/config-validation.md +++ b/docs/usage/config-validation.md @@ -18,9 +18,7 @@ When you run `renovate-config-validator` with no arguments it will check: For example: ```console -$ npm install --global renovate -added 750 packages, and audited 751 packages in 51s -$ renovate-config-validator +$ npx --yes --package renovate -- renovate-config-validator INFO: Validating renovate.json INFO: Config validated successfully ``` @@ -28,7 +26,20 @@ $ renovate-config-validator ### Strict mode By default, the validator program fails with a non-zero exit code if there are any validation warnings or errors. -You can pass the `--strict` flag to make it fail if a scanned config needs migration. +You can pass the `--strict` flag to make it fail if a scanned config needs migration: +```console +$ npx --yes --package renovate -- renovate-config-validator --strict + INFO: Validating renovate.json + WARN: Config migration necessary + "oldConfig": { + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ "config:base" ] + }, + "newConfig": { + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ "config:recommended" ] + }, +``` ### Pass file to check as CLI arguments @@ -37,9 +48,7 @@ This can be handy to check a config file with a non-default name, like when you' For example: ```console -$ npm install --global renovate -added 750 packages, and audited 751 packages in 51s -$ renovate-config-validator first_config.json +$ npx --yes --package renovate -- renovate-config-validator first_config.json INFO: Validating first_config_.json INFO: Config validated successfully ``` From e4b5c49e0dfade05dce58bb44d462bc941056b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp?= Date: Mon, 15 Jan 2024 19:58:13 +0000 Subject: [PATCH 2/3] Fix lint/prettier Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> --- docs/usage/config-validation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage/config-validation.md b/docs/usage/config-validation.md index d8a607122a55c9..4d6b18335a95a8 100644 --- a/docs/usage/config-validation.md +++ b/docs/usage/config-validation.md @@ -27,6 +27,7 @@ $ npx --yes --package renovate -- renovate-config-validator By default, the validator program fails with a non-zero exit code if there are any validation warnings or errors. You can pass the `--strict` flag to make it fail if a scanned config needs migration: + ```console $ npx --yes --package renovate -- renovate-config-validator --strict INFO: Validating renovate.json From d89832b9164228e869e192d703059149e039688a Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Sun, 18 Feb 2024 16:52:49 +0100 Subject: [PATCH 3/3] Update docs/usage/config-validation.md Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> --- docs/usage/config-validation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/config-validation.md b/docs/usage/config-validation.md index 4d6b18335a95a8..fc18c2a30051f6 100644 --- a/docs/usage/config-validation.md +++ b/docs/usage/config-validation.md @@ -28,7 +28,7 @@ $ npx --yes --package renovate -- renovate-config-validator By default, the validator program fails with a non-zero exit code if there are any validation warnings or errors. You can pass the `--strict` flag to make it fail if a scanned config needs migration: -```console +```console title="Strict mode validation" $ npx --yes --package renovate -- renovate-config-validator --strict INFO: Validating renovate.json WARN: Config migration necessary