Open tuxmark5 opened 7 years ago
I'm having this issue also using the custom error matching. AtomLinter does not give tooltips because of the 0 length.
The issue is this line: https://github.com/noseglid/atom-build/blob/master/lib/linter-integration.js#L17
Couple options.
function extractRange(json) {
return [
[ (json.line || 1) - 1, (json.col || 1) - 1 ],
[ (json.line_end || json.line || 1) - 1, (json.col_end || Infinity) - 1 ]
];
}
This is as @tuxmark5 suggests, and will highlight the remainder of the line.
function extractRange(json) {
return [
[ (json.line || 1) - 1, (json.col || 1) - 1 ],
[ (json.line_end || json.line || 1) - 1, (json.col_end || ((json.col || 1) + 1)) - 1 ]
];
}
This code didn't actually work as expected, but the intention was to highlight only the first character.
I'm not sure which implementation the community or contributors desire but having 0 length ranges is not the right answer.
I can throw together a PR if someone wishes but I've no interest in becoming a maintainer unfortunately.
Build reports zero-width range when linting lines with errors. This causes linter not to underline the lines that contain errors and only a hard to see red dot. It would be nice if build could provide the range
[[row, 0], [row, Infinity]]
so the whole line with an error is easily visible.Example screenshot:![2017-06-30-010444_869x460_scrot](https://user-images.githubusercontent.com/506439/27712824-6ebc7a6a-5d31-11e7-89bd-aed043cd615e.png)