Closed Mooninaut closed 9 years ago
This is a great find. But I think we are probably better off checking in lintIndicator itself so that plugins arent concerned with the fact that en empty array and not retuning has a different behavior.
We can probably do the change right here https://github.com/MiguelCastillo/Brackets-InteractiveLinter/blob/master/lintIndicator.js#L61
Basically check change the check to
if (messages && messages.length) {
setStatus(INDICATOR_STATUS.WARNING);
$statusBarIndicator.attr('title', StringUtils.format(INDICATOR_TOOLTIPS.WARNING, messages.length));
}
else {
setStatus(INDICATOR_STATUS.OK);
$statusBarIndicator.attr('title', INDICATOR_TOOLTIPS.OK);
}
I'll be out for a few hours, I'll test it as soon as I get back to my computer. Thanks!
The HTMLHint and CSSLint main functions return a 0-length array when there are no problems. This causes the status icon to show the yellow "warning" sign, but the tooltip to indicate that there are 0 problems.
I added checks for this condition to both plugins.