diff options
Diffstat (limited to 'lib/python/qmk/info.py')
| -rw-r--r-- | lib/python/qmk/info.py | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 340969f415..ccec46ce21 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py | |||
| @@ -463,10 +463,17 @@ def _extract_config_h(info_data, config_c): | |||
| 463 | key_type = info_dict.get('value_type', 'raw') | 463 | key_type = info_dict.get('value_type', 'raw') |
| 464 | 464 | ||
| 465 | try: | 465 | try: |
| 466 | replace_with = info_dict.get('replace_with') | ||
| 466 | if config_key in config_c and info_dict.get('invalid', False): | 467 | if config_key in config_c and info_dict.get('invalid', False): |
| 467 | _log_error(info_data, '%s in config.h is no longer a valid option' % config_key) | 468 | if replace_with: |
| 469 | _log_error(info_data, '%s in config.h is no longer a valid option and should be replaced with %s' % (config_key, replace_with)) | ||
| 470 | else: | ||
| 471 | _log_error(info_data, '%s in config.h is no longer a valid option and should be removed' % config_key) | ||
| 468 | elif config_key in config_c and info_dict.get('deprecated', False): | 472 | elif config_key in config_c and info_dict.get('deprecated', False): |
| 469 | _log_warning(info_data, '%s in config.h is deprecated and will be removed at a later date' % config_key) | 473 | if replace_with: |
| 474 | _log_warning(info_data, '%s in config.h is deprecated in favor of %s and will be removed at a later date' % (config_key, replace_with)) | ||
| 475 | else: | ||
| 476 | _log_warning(info_data, '%s in config.h is deprecated and will be removed at a later date' % config_key) | ||
| 470 | 477 | ||
| 471 | if config_key in config_c and info_dict.get('to_json', True): | 478 | if config_key in config_c and info_dict.get('to_json', True): |
| 472 | if dotty_info.get(info_key) and info_dict.get('warn_duplicate', True): | 479 | if dotty_info.get(info_key) and info_dict.get('warn_duplicate', True): |
| @@ -527,10 +534,17 @@ def _extract_rules_mk(info_data, rules): | |||
| 527 | key_type = info_dict.get('value_type', 'raw') | 534 | key_type = info_dict.get('value_type', 'raw') |
| 528 | 535 | ||
| 529 | try: | 536 | try: |
| 537 | replace_with = info_dict.get('replace_with') | ||
| 530 | if rules_key in rules and info_dict.get('invalid', False): | 538 | if rules_key in rules and info_dict.get('invalid', False): |
| 531 | _log_error(info_data, '%s in rules.mk is no longer a valid option' % rules_key) | 539 | if replace_with: |
| 540 | _log_error(info_data, '%s in rules.mk is no longer a valid option and should be replaced with %s' % (rules_key, replace_with)) | ||
| 541 | else: | ||
| 542 | _log_error(info_data, '%s in rules.mk is no longer a valid option and should be removed' % rules_key) | ||
| 532 | elif rules_key in rules and info_dict.get('deprecated', False): | 543 | elif rules_key in rules and info_dict.get('deprecated', False): |
| 533 | _log_warning(info_data, '%s in rules.mk is deprecated and will be removed at a later date' % rules_key) | 544 | if replace_with: |
| 545 | _log_warning(info_data, '%s in rules.mk is deprecated in favor of %s and will be removed at a later date' % (rules_key, replace_with)) | ||
| 546 | else: | ||
| 547 | _log_warning(info_data, '%s in rules.mk is deprecated and will be removed at a later date' % rules_key) | ||
| 534 | 548 | ||
| 535 | if rules_key in rules and info_dict.get('to_json', True): | 549 | if rules_key in rules and info_dict.get('to_json', True): |
| 536 | if dotty_info.get(info_key) and info_dict.get('warn_duplicate', True): | 550 | if dotty_info.get(info_key) and info_dict.get('warn_duplicate', True): |
