From d2c4667422147c1d0c00abfc576f9c6dd1806b85 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Mon, 2 Dec 2024 00:28:14 -0600 Subject: [PATCH] Fix duplicate labels - test skip lint --- packages/config/config/devices/0x031e/lzw36.json | 16 ++++++++-------- .../0x031e/templates/inovelli_templates.json | 3 ++- packages/config/maintenance/lintConfigFiles.ts | 10 +++++++++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/packages/config/config/devices/0x031e/lzw36.json b/packages/config/config/devices/0x031e/lzw36.json index 845d10ad751f..5337e208e536 100644 --- a/packages/config/config/devices/0x031e/lzw36.json +++ b/packages/config/config/devices/0x031e/lzw36.json @@ -748,23 +748,23 @@ }, { "#": "25[0xff]", - "label": "Fan LED Effect Color", - "$import": "#paramInformation/24[0xff]" + "$import": "#paramInformation/24[0xff]", + "label": "Fan LED Effect Color" }, { "#": "25[0xff00]", - "label": "Fan LED Effect Brightness", - "$import": "#paramInformation/24[0xff00]" + "$import": "#paramInformation/24[0xff00]", + "label": "Fan LED Effect Brightness" }, { "#": "25[0xff0000]", - "label": "Fan LED Effect Duration", - "$import": "#paramInformation/24[0xff0000]" + "$import": "#paramInformation/24[0xff0000]", + "label": "Fan LED Effect Duration" }, { "#": "25[0x7f000000]", - "label": "Fan LED Effect Type", - "$import": "#paramInformation/24[0x7f000000]" + "$import": "#paramInformation/24[0x7f000000]", + "label": "Fan LED Effect Type" }, { "#": "26", diff --git a/packages/config/config/devices/0x031e/templates/inovelli_templates.json b/packages/config/config/devices/0x031e/templates/inovelli_templates.json index fc03de5c11b9..645eabe5e7a6 100644 --- a/packages/config/config/devices/0x031e/templates/inovelli_templates.json +++ b/packages/config/config/devices/0x031e/templates/inovelli_templates.json @@ -398,6 +398,7 @@ "maxValue": 4294967295, "defaultValue": 0, "description": "Set the LED Effect using the sum of each individual effect parameter (color + (brightness * 256) + (duration * 65536) + (effect * 16777216))", - "unsigned": true + "unsigned": true, + "lintSkip": ["duplicatedPartials"] } } diff --git a/packages/config/maintenance/lintConfigFiles.ts b/packages/config/maintenance/lintConfigFiles.ts index ff4090e43851..3066452754b9 100644 --- a/packages/config/maintenance/lintConfigFiles.ts +++ b/packages/config/maintenance/lintConfigFiles.ts @@ -1048,7 +1048,15 @@ Consider converting this parameter to unsigned using ${ // Check if there are partial parameters and non-partials with the same number const duplicatedPartials = distinct( partialParams.map(([key]) => key.parameter), - ).filter((parameter) => paramInformation.has({ parameter })); + ).filter((parameter) => { + // Check if any parameter has the lintSkip flag for duplicatedPartials + const param = paramInformation.get({ parameter }); + if (param?.lintSkip?.includes("duplicatedPartials")) { + return false; + } + return paramInformation.has({ parameter }); + }); + if (duplicatedPartials.length) { addError( file,