diff options
author | Joel Challis <git@zvecr.com> | 2024-03-12 04:28:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 15:28:02 +1100 |
commit | ae38bdd5dc720e307266ba4cedd92933069024d8 (patch) | |
tree | 3337d2cadbec85069ec1b347f7e69d5826fa4b7d /lib | |
parent | abf65049035976687dd677cb743c833fe2457c39 (diff) |
Flag LAYOUT macros still defined in .h files (#23260)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/python/qmk/info.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 13588abdb8..815b851474 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -78,7 +78,7 @@ def _find_invalid_encoder_index(info_data): return ret -def _validate_layouts(keyboard, info_data): +def _validate_layouts(keyboard, info_data): # noqa C901 """Non schema checks """ col_num = info_data.get('matrix_size', {}).get('cols', 0) @@ -92,6 +92,11 @@ def _validate_layouts(keyboard, info_data): if len(layouts) == 0 or all(not layout.get('json_layout', False) for layout in layouts.values()): _log_error(info_data, 'No LAYOUTs defined! Need at least one layout defined in info.json.') + # Make sure all layouts are DD + for layout_name, layout_data in layouts.items(): + if layout_data.get('c_macro', False): + _log_error(info_data, f'{layout_name}: Layout macro should not be defined within ".h" files.') + # Make sure all matrix values are in bounds for layout_name, layout_data in layouts.items(): for index, key_data in enumerate(layout_data['layout']): |