Upgrade to Linter API v2
This commit is contained in:
parent
85a79d1e5a
commit
44468f0833
@ -1,3 +1,6 @@
|
|||||||
|
## 0.6.0 - Linter v2
|
||||||
|
- Upgrade to Linter API v2
|
||||||
|
|
||||||
## 0.5.0 - Column matching
|
## 0.5.0 - Column matching
|
||||||
- The linter now indicates the right column if indicated by `mzn2fzn`
|
- The linter now indicates the right column if indicated by `mzn2fzn`
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ module.exports = AtomLanguageMZN =
|
|||||||
return {
|
return {
|
||||||
name: 'MiniZinc',
|
name: 'MiniZinc',
|
||||||
grammarScopes: ['source.mzn'],
|
grammarScopes: ['source.mzn'],
|
||||||
scope: 'file', # or 'project'
|
scope: 'file',
|
||||||
lintOnFly: true,
|
lintsOnChange: true,
|
||||||
lint: @provider.lint
|
lint: @provider.lint
|
||||||
}
|
}
|
||||||
|
@ -61,10 +61,12 @@ class LinterMZN
|
|||||||
endcol = output[2].match(/\^(\s|$)/).index + 1
|
endcol = output[2].match(/\^(\s|$)/).index + 1
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
type: 'Error',
|
severity: 'error',
|
||||||
text: output[1..].join('\n').replace(/MiniZinc: /, ""),
|
excerpt: output[1..].join('\n').replace(/MiniZinc: /, ""),
|
||||||
range: [[line-1,startcol], [line-1,endcol]],
|
location:{
|
||||||
filePath: filePath,
|
file: filePath,
|
||||||
|
position: [[line-1,startcol], [line-1,endcol]],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return message
|
return message
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
"providedServices": {
|
"providedServices": {
|
||||||
"linter": {
|
"linter": {
|
||||||
"versions": {
|
"versions": {
|
||||||
"1.0.0": "provideLinter"
|
"2.0.0": "provideLinter"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user