Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 8d0d5b3

Browse files
committed
Merge pull request #38 from Arcanemagus/fake-line-num
Handle messages with no line
2 parents 4631855 + 5f68f7e commit 8d0d5b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/main.coffee

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ module.exports =
1919
if lintResult.messages.length < 1
2020
return toReturn
2121
for data in lintResult.messages
22-
line = data.line - 1
23-
col = data.col - 1
22+
if not data.rollup
23+
line = data.line - 1
24+
col = data.col - 1
25+
else
26+
helpers.rangeFromLineNumber(textEditor, 0)
2427
toReturn.push({
2528
type: data.type.charAt(0).toUpperCase() + data.type.slice(1),
2629
text: data.message,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"license": "MIT",
1414
"dependencies": {
1515
"csslint": "git+https://github.com/AtomLinter/csslint",
16-
"atom-linter": "^3.0.0"
16+
"atom-linter": "^3.1.0"
1717
},
1818
"providedServices": {
1919
"linter": {

0 commit comments

Comments
 (0)