From 4c1cadcc3066e5bea39e46ee62354cf13ded13a3 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 8 Mar 2021 19:44:06 +0000 Subject: [PATCH 1/2] Prevent the config-lint script erroring out on any sample_config changes --- scripts-dev/config-lint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts-dev/config-lint.sh b/scripts-dev/config-lint.sh index 189ca66535e6..9132160463a6 100755 --- a/scripts-dev/config-lint.sh +++ b/scripts-dev/config-lint.sh @@ -2,9 +2,14 @@ # Find linting errors in Synapse's default config file. # Exits with 0 if there are no problems, or another code otherwise. +# cd to the root of the repository +cd `dirname $0`/.. + +# Restore backup of sample config upon script exit +trap "mv docs/sample_config.yaml.bak docs/sample_config.yaml" EXIT + # Fix non-lowercase true/false values sed -i.bak -E "s/: +True/: true/g; s/: +False/: false/g;" docs/sample_config.yaml -rm docs/sample_config.yaml.bak # Check if anything changed -git diff --exit-code docs/sample_config.yaml +diff docs/sample_config.yaml docs/sample_config.yaml.bak From 00bfb579c104c5e5590006316c14c20275cb200a Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 8 Mar 2021 19:59:54 +0000 Subject: [PATCH 2/2] Changelog --- changelog.d/9562.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/9562.misc diff --git a/changelog.d/9562.misc b/changelog.d/9562.misc new file mode 100644 index 000000000000..2f0133bff0b2 --- /dev/null +++ b/changelog.d/9562.misc @@ -0,0 +1 @@ +Fix spurious errors reported by the `config-lint.sh` script. \ No newline at end of file