Skip to content

Commit

Permalink
Fix duplicate labels - test skip lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjohnsontv committed Dec 2, 2024
1 parent 0e993bf commit d2c4667
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
16 changes: 8 additions & 8 deletions packages/config/config/devices/0x031e/lzw36.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
10 changes: 9 additions & 1 deletion packages/config/maintenance/lintConfigFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d2c4667

Please sign in to comment.