1
0

Upgrade to Linter API v2

This commit is contained in:
Jip J. Dekker 2017-03-18 23:13:08 +01:00
parent 85a79d1e5a
commit 44468f0833
4 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,6 @@
## 0.6.0 - Linter v2
- Upgrade to Linter API v2
## 0.5.0 - Column matching
- The linter now indicates the right column if indicated by `mzn2fzn`

View File

@ -37,7 +37,7 @@ module.exports = AtomLanguageMZN =
return {
name: 'MiniZinc',
grammarScopes: ['source.mzn'],
scope: 'file', # or 'project'
lintOnFly: true,
scope: 'file',
lintsOnChange: true,
lint: @provider.lint
}

View File

@ -61,10 +61,12 @@ class LinterMZN
endcol = output[2].match(/\^(\s|$)/).index + 1
message = {
type: 'Error',
text: output[1..].join('\n').replace(/MiniZinc: /, ""),
range: [[line-1,startcol], [line-1,endcol]],
filePath: filePath,
severity: 'error',
excerpt: output[1..].join('\n').replace(/MiniZinc: /, ""),
location:{
file: filePath,
position: [[line-1,startcol], [line-1,endcol]],
}
}
return message

View File

@ -18,7 +18,7 @@
"providedServices": {
"linter": {
"versions": {
"1.0.0": "provideLinter"
"2.0.0": "provideLinter"
}
}
}