diff --git a/tools/settings.py b/tools/settings.py index 8a682e85e9a48..2cca03c97da82 100644 --- a/tools/settings.py +++ b/tools/settings.py @@ -5,6 +5,7 @@ import copy import difflib +import itertools import re from typing import Any @@ -326,6 +327,12 @@ def read_js_settings(filename, attrs): if strict_override: self.attrs['STRICT'] = strict_override + # Internal consistency check that we don't have unknown / misspelled settings + # in the above sets. + for s in itertools.chain(DEPRECATED_SETTINGS, EXPERIMENTAL_SETTINGS, JS_ONLY_SETTINGS, + PORTS_SETTINGS, MEM_SIZE_SETTINGS, INTERNAL_SETTINGS): + assert s in self.attrs, f'non-existent setting: {s}' + def infer_types(self): for key, value in self.attrs.items(): self.types[key] = type(value)