1
0

Add config linting script that checks for bool casing (#6203)

* commit '409c62b27':
  Add config linting script that checks for bool casing (#6203)
This commit is contained in:
Andrew Morgan
2020-03-16 15:26:24 +00:00
14 changed files with 49 additions and 30 deletions

9
scripts-dev/config-lint.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/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 -E "s/: +True/: true/g; s/: +False/: false/g;" docs/sample_config.yaml
# Check if anything changed
git diff --exit-code docs/sample_config.yaml

View File

@@ -10,3 +10,4 @@ set -e
isort -y -rc synapse tests scripts-dev scripts
flake8 synapse tests
python3 -m black synapse tests scripts-dev scripts
./scripts-dev/config-lint.sh