Skip to content

Commit

Permalink
Format DD mappings and schemas (qmk#18924)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and elpekenin committed Dec 7, 2022
1 parent cc2fda9 commit debca11
Show file tree
Hide file tree
Showing 13 changed files with 1,289 additions and 1,319 deletions.
File renamed without changes.
24 changes: 12 additions & 12 deletions data/mappings/info_config.json → data/mappings/info_config.hjson
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file maps keys between `config.h` and `info.json`. It is used by QMK
# to correctly and consistently map back and forth between the two systems.
// This file maps keys between `config.h` and `info.json`. It is used by QMK
// to correctly and consistently map back and forth between the two systems.
{
# Format:
# <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
# value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping", "str", "raw"
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
# to_c: Default `true`. Set to `false` to exclude this mapping from config.h
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
# deprecated: Default `false`. Set to `true` to turn on warning when a value exists
# invalid: Default `false`. Set to `true` to generate errors when a value exists
# replace_with: use with a key marked deprecated or invalid to designate a replacement
// Format:
// <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
// value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping", "str", "raw"
// to_json: Default `true`. Set to `false` to exclude this mapping from info.json
// to_c: Default `true`. Set to `false` to exclude this mapping from config.h
// warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
// deprecated: Default `false`. Set to `true` to turn on warning when a value exists
// invalid: Default `false`. Set to `true` to generate errors when a value exists
// replace_with: use with a key marked deprecated or invalid to designate a replacement
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
Expand Down Expand Up @@ -118,7 +118,7 @@
"USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"},
"USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"},

# Items we want flagged in lint
// Items we want flagged in lint
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
"NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
Expand Down
24 changes: 12 additions & 12 deletions data/mappings/info_rules.json → data/mappings/info_rules.hjson
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This file maps keys between `rules.mk` and `info.json`. It is used by QMK
# to correctly and consistently map back and forth between the two systems.
// This file maps keys between `rules.mk` and `info.json`. It is used by QMK
// to correctly and consistently map back and forth between the two systems.
{
# Format:
# <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
# value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping", "str", "raw"
# to_json: Default `true`. Set to `false` to exclude this mapping from info.json
# to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk
# warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
# deprecated: Default `false`. Set to `true` to turn on warning when a value exists
# invalid: Default `false`. Set to `true` to generate errors when a value exists
# replace_with: use with a key marked deprecated or invalid to designate a replacement
// Format:
// <rules.mk key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
// value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping", "str", "raw"
// to_json: Default `true`. Set to `false` to exclude this mapping from info.json
// to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk
// warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
// deprecated: Default `false`. Set to `true` to turn on warning when a value exists
// invalid: Default `false`. Set to `true` to generate errors when a value exists
// replace_with: use with a key marked deprecated or invalid to designate a replacement
"BOARD": {"info_key": "board"},
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
"BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
Expand Down Expand Up @@ -37,7 +37,7 @@
"PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"},
"PS2_DRIVER": {"info_key": "ps2.driver"},

# Items we want flagged in lint
// Items we want flagged in lint
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
"CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
"VIAL_ENABLE": {"info_key": "_invalid.vial", "invalid": true}
Expand Down
Loading

0 comments on commit debca11

Please sign in to comment.