@@ -16,12 +16,12 @@ python3 get-schema-properties.py <"$1/integration/vscode/ada/schemas/als-setting
1616grep ' if Name = "[^"]\+"' " $1 /source/ada/lsp-ada_configurations.adb" | sed -e ' s/.*"\([^"]\+\)"/\1/' > impl.txt
1717# Remove the following settings from the implementation list because they are
1818# either hidden, or nested
19- exclude=" onTypeFormatting indentOnly"
19+ exclude=" onTypeFormatting indentOnly trace "
2020for exc in $exclude ; do
2121 echo " $( grep -v " $exc " < impl.txt) " > impl.txt
2222done
2323# Add the following properties because they are nested
24- add=" onTypeFormatting.indentOnly"
24+ add=" onTypeFormatting.indentOnly trace.server "
2525for a in $add ; do
2626 echo " $a " >> impl.txt
2727done
@@ -31,17 +31,18 @@ echo "$(sort <impl.txt)" >impl.txt
3131# Check that all VS Code settings are documented
3232diff -u pkg.txt doc.txt
3333
34- # The ada.trace.server setting exists only in VS Code and not in .als.json
35- # files. So remove it before the comparison.
36- #
37- # We need to use a subshell because it's not allowed to read and write the same
38- # file in one pipeline
39- # echo "$(grep -v trace.server <doc.txt)" >doc.txt
40- echo " $( grep -v trace.server < doc.txt) " > doc.txt
41-
4234# Check that all implemented settings are documented
4335diff -u impl.txt doc.txt
4436
37+ # Before comparing with the schema, we need to filter out VSCode-only settings
38+ # which are not defined in the schema and shouldn't be because we don't want to
39+ # allow such values in .als.json files.
40+ vscode_only=" trace.server showNotificationsOnErrors"
41+ for s in $vscode_only ; do
42+ echo " $( grep -v " $s " impl.txt) " > impl.txt
43+ echo " $( grep -v " $s " doc.txt) " > doc.txt
44+ done
45+
4546# Check that all implemented settings are defined in the JSON Schema
4647diff -u impl.txt schema.txt
4748
0 commit comments