Apply clang-format

This commit is contained in:
Simon Schneegans
2022-04-18 13:09:18 +02:00
parent ee320739c6
commit 3dd7c22d76

View File

@@ -14,22 +14,22 @@ try {
}; };
// Get all optional attributes and add them to the content object if given. // Get all optional attributes and add them to the content object if given.
const labelColor = core.getInput('labelColor'); const labelColor = core.getInput('labelColor');
const color = core.getInput('color'); const color = core.getInput('color');
const isError = core.getInput('isError'); const isError = core.getInput('isError');
const namedLogo = core.getInput('namedLogo'); const namedLogo = core.getInput('namedLogo');
const logoSvg = core.getInput('logoSvg'); const logoSvg = core.getInput('logoSvg');
const logoColor = core.getInput('logoColor'); const logoColor = core.getInput('logoColor');
const logoWidth = core.getInput('logoWidth'); const logoWidth = core.getInput('logoWidth');
const logoPosition = core.getInput('logoPosition'); const logoPosition = core.getInput('logoPosition');
const style = core.getInput('style'); const style = core.getInput('style');
const cacheSeconds = core.getInput('cacheSeconds'); const cacheSeconds = core.getInput('cacheSeconds');
const valColorRange = core.getInput('valColorRange'); const valColorRange = core.getInput('valColorRange');
const minColorRange = core.getInput('minColorRange'); const minColorRange = core.getInput('minColorRange');
const maxColorRange = core.getInput('maxColorRange'); const maxColorRange = core.getInput('maxColorRange');
const invertColorRange = core.getInput('invertColorRange'); const invertColorRange = core.getInput('invertColorRange');
const colorRangeSaturation = core.getInput('colorRangeSaturation'); const colorRangeSaturation = core.getInput('colorRangeSaturation');
const colorRangeLightness = core.getInput('colorRangeLightness'); const colorRangeLightness = core.getInput('colorRangeLightness');
if (labelColor != '') { if (labelColor != '') {
content.labelColor = labelColor; content.labelColor = labelColor;
@@ -48,14 +48,14 @@ try {
hue = Math.floor((max - val) / (max - min) * 120); hue = Math.floor((max - val) / (max - min) * 120);
} }
let sat = 100; let sat = 100;
if(colorRangeSaturation != '') { if (colorRangeSaturation != '') {
sat = colorRangeSaturation; sat = colorRangeSaturation;
} }
let lig = 40; let lig = 40;
if(colorRangeLightness != '') { if (colorRangeLightness != '') {
lig = colorRangeLightness; lig = colorRangeLightness;
} }
content.color = "hsl(" + hue + ", " + sat + "%, " + lig + "%)"; content.color = 'hsl(' + hue + ', ' + sat + '%, ' + lig + '%)';
} else if (color != '') { } else if (color != '') {
content.color = color; content.color = color;
} }