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

Commit

Permalink
Merge pull request #79 from vzamanillo/v2-linter-api-support
Browse files Browse the repository at this point in the history
Support v2 Linter API
  • Loading branch information
Arcanemagus authored Jan 29, 2019
2 parents acf1b46 + 7695ace commit e4c3094
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions lib/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports =
grammarScopes: ['source.cpp']
scope: 'file'
# cpplint only lints file(s).
lintOnFly: false
lintsOnChange: false
lint: (textEditor) =>
filePath = textEditor.getPath()
parameters = @parameters.slice()
Expand Down Expand Up @@ -72,10 +72,11 @@ module.exports =
range = helpers.generateRange(textEditor, line)

toReturn.push({
type: 'Warning'
text: message
filePath: filePath
range: range
severity: 'warning'
excerpt: message
location:
file: filePath
position: range
})
return toReturn

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"providedServices": {
"linter": {
"versions": {
"1.0.0": "provideLinter"
"2.0.0": "provideLinter"
}
}
},
Expand All @@ -27,6 +27,6 @@
"atom-package-deps": "^5.0.0"
},
"package-deps": [
"linter"
"linter:2.0.0"
]
}

0 comments on commit e4c3094

Please sign in to comment.