summary refs log tree commit diff
path: root/scripts-dev/config-lint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts-dev/config-lint.sh')
-rwxr-xr-xscripts-dev/config-lint.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts-dev/config-lint.sh b/scripts-dev/config-lint.sh
new file mode 100755
index 0000000000..189ca66535
--- /dev/null
+++ b/scripts-dev/config-lint.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Find linting errors in Synapse's default config file.
+# Exits with 0 if there are no problems, or another code otherwise.
+
+# 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