From 6f13b3d384e25474c1fb1d5db54565d63607e497 Mon Sep 17 00:00:00 2001 From: Zach White Date: Thu, 29 Apr 2021 21:29:51 -0700 Subject: [PATCH 1/5] Require a space after single line comment start --- lib/python/qmk/c_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py index d4f39c8839ce..9f25e2dcb0fd 100644 --- a/lib/python/qmk/c_parse.py +++ b/lib/python/qmk/c_parse.py @@ -8,7 +8,7 @@ from qmk.comment_remover import comment_remover default_key_entry = {'x': -1, 'y': 0, 'w': 1} -single_comment_regex = re.compile(r' */[/*].*$') +single_comment_regex = re.compile(r' */[/*] .*$') multi_comment_regex = re.compile(r'/\*(.|\n)*?\*/', re.MULTILINE) From 2082aa71d33a4cd3b4b776d5fbc7b970b30f441d Mon Sep 17 00:00:00 2001 From: Zach White Date: Thu, 29 Apr 2021 21:30:02 -0700 Subject: [PATCH 2/5] fix boards broken by the last commit --- keyboards/labyrinth75/config.h | 2 +- keyboards/leafcutterlabs/bigknob/config.h | 4 ++-- keyboards/monstargear/xo87/rgb/config.h | 2 +- keyboards/sam/sg81m/config.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/labyrinth75/config.h b/keyboards/labyrinth75/config.h index cb95204885e8..603c9958009e 100644 --- a/keyboards/labyrinth75/config.h +++ b/keyboards/labyrinth75/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_BREATHING -#define RGB_DI_PIN B0 //D5 could also be the other pin maybe +#define RGB_DI_PIN B0 // D5 could also be the other pin maybe //#ifdef RGB_DI_PIN #define RGBLED_NUM 6 //# define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h index 1f1ac4e98d17..c8c55876f85d 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h @@ -54,6 +54,6 @@ along with this program. If not, see . #define ENCODER_RESOLUTION 4 //default/suggested /* ws2812 RGB LED */ -#define RGB_DI_PIN C7 //D3 - underglow C7 - backlight +#define RGB_DI_PIN C7 // D3 - underglow C7 - backlight #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 5 // Number of LEDs \ No newline at end of file +#define RGBLED_NUM 5 // Number of LEDs diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 0d92c274e49a..83eee83492c7 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -30,7 +30,7 @@ #define MATRIX_COLS 16 #define BACKLIGHT_PIN F5 -#define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2}// +#define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2} #define MATRIX_COL_PINS { C5,C3,C1,E1,D6,D2,B7,B3,F6,F7,F3,A5,A1,E2,C7,A6 } #define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/sam/sg81m/config.h b/keyboards/sam/sg81m/config.h index 5e1d042b6c04..0fcaa95e0a2d 100644 --- a/keyboards/sam/sg81m/config.h +++ b/keyboards/sam/sg81m/config.h @@ -44,7 +44,7 @@ #define DIODE_DIRECTION COL2ROW -#define RGB_DI_PIN E6 //reserved pin for potential underglow rgb +#define RGB_DI_PIN E6 // reserved pin for potential underglow rgb #ifdef RGB_DI_PIN #define RGBLED_NUM 10 #define RGBLIGHT_HUE_STEP 8 From bec07169d68d7380c755b01d0650738e0a37d63a Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 1 May 2021 12:21:07 -0700 Subject: [PATCH 3/5] Update lib/python/qmk/c_parse.py Co-authored-by: Erovia --- lib/python/qmk/c_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py index 9f25e2dcb0fd..991373d5693a 100644 --- a/lib/python/qmk/c_parse.py +++ b/lib/python/qmk/c_parse.py @@ -8,7 +8,7 @@ from qmk.comment_remover import comment_remover default_key_entry = {'x': -1, 'y': 0, 'w': 1} -single_comment_regex = re.compile(r' */[/*] .*$') +single_comment_regex = re.compile(r'\s+/[/*].*$') multi_comment_regex = re.compile(r'/\*(.|\n)*?\*/', re.MULTILINE) From 1f665f2a4a51e6af128995433bec0ae46c188fc2 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 1 May 2021 12:21:53 -0700 Subject: [PATCH 4/5] Revert "fix boards broken by the last commit" This reverts commit 2082aa71d33a4cd3b4b776d5fbc7b970b30f441d. --- keyboards/labyrinth75/config.h | 2 +- keyboards/leafcutterlabs/bigknob/config.h | 4 ++-- keyboards/monstargear/xo87/rgb/config.h | 2 +- keyboards/sam/sg81m/config.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/labyrinth75/config.h b/keyboards/labyrinth75/config.h index 603c9958009e..cb95204885e8 100644 --- a/keyboards/labyrinth75/config.h +++ b/keyboards/labyrinth75/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_BREATHING -#define RGB_DI_PIN B0 // D5 could also be the other pin maybe +#define RGB_DI_PIN B0 //D5 could also be the other pin maybe //#ifdef RGB_DI_PIN #define RGBLED_NUM 6 //# define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h index c8c55876f85d..1f1ac4e98d17 100644 --- a/keyboards/leafcutterlabs/bigknob/config.h +++ b/keyboards/leafcutterlabs/bigknob/config.h @@ -54,6 +54,6 @@ along with this program. If not, see . #define ENCODER_RESOLUTION 4 //default/suggested /* ws2812 RGB LED */ -#define RGB_DI_PIN C7 // D3 - underglow C7 - backlight +#define RGB_DI_PIN C7 //D3 - underglow C7 - backlight #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 5 // Number of LEDs +#define RGBLED_NUM 5 // Number of LEDs \ No newline at end of file diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 83eee83492c7..0d92c274e49a 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -30,7 +30,7 @@ #define MATRIX_COLS 16 #define BACKLIGHT_PIN F5 -#define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2} +#define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2}// #define MATRIX_COL_PINS { C5,C3,C1,E1,D6,D2,B7,B3,F6,F7,F3,A5,A1,E2,C7,A6 } #define UNUSED_PINS #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/sam/sg81m/config.h b/keyboards/sam/sg81m/config.h index 0fcaa95e0a2d..5e1d042b6c04 100644 --- a/keyboards/sam/sg81m/config.h +++ b/keyboards/sam/sg81m/config.h @@ -44,7 +44,7 @@ #define DIODE_DIRECTION COL2ROW -#define RGB_DI_PIN E6 // reserved pin for potential underglow rgb +#define RGB_DI_PIN E6 //reserved pin for potential underglow rgb #ifdef RGB_DI_PIN #define RGBLED_NUM 10 #define RGBLIGHT_HUE_STEP 8 From f1510dd9b91d47b68b287accf507e2b27dddeabc Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 1 May 2021 12:23:24 -0700 Subject: [PATCH 5/5] fix monstargear/xo87/rgb --- keyboards/monstargear/xo87/rgb/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 0d92c274e49a..83eee83492c7 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -30,7 +30,7 @@ #define MATRIX_COLS 16 #define BACKLIGHT_PIN F5 -#define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2}// +#define MATRIX_ROW_PINS { E6,E7, E3, B0, B1 ,A2} #define MATRIX_COL_PINS { C5,C3,C1,E1,D6,D2,B7,B3,F6,F7,F3,A5,A1,E2,C7,A6 } #define UNUSED_PINS #define DIODE_DIRECTION ROW2COL