tangled
alpha
login
or
join now
dekker.one
/
atom-language-mzn
0
fork
atom
Atom package to provide syntax highlighting for the MiniZinc constraint modelling language
0
fork
atom
overview
issues
pulls
pipelines
Upgrade to Linter API v2
dekker.one
9 years ago
44468f08
85a79d1e
+12
-7
4 changed files
expand all
collapse all
unified
split
CHANGELOG.md
lib
init.coffee
linter-mzn.coffee
package.json
+3
CHANGELOG.md
···
1
1
+
## 0.6.0 - Linter v2
2
2
+
- Upgrade to Linter API v2
3
3
+
1
4
## 0.5.0 - Column matching
2
5
- The linter now indicates the right column if indicated by `mzn2fzn`
3
6
+2
-2
lib/init.coffee
···
37
37
return {
38
38
name: 'MiniZinc',
39
39
grammarScopes: ['source.mzn'],
40
40
-
scope: 'file', # or 'project'
41
41
-
lintOnFly: true,
40
40
+
scope: 'file',
41
41
+
lintsOnChange: true,
42
42
lint: @provider.lint
43
43
}
+6
-4
lib/linter-mzn.coffee
···
61
61
endcol = output[2].match(/\^(\s|$)/).index + 1
62
62
63
63
message = {
64
64
-
type: 'Error',
65
65
-
text: output[1..].join('\n').replace(/MiniZinc: /, ""),
66
66
-
range: [[line-1,startcol], [line-1,endcol]],
67
67
-
filePath: filePath,
64
64
+
severity: 'error',
65
65
+
excerpt: output[1..].join('\n').replace(/MiniZinc: /, ""),
66
66
+
location:{
67
67
+
file: filePath,
68
68
+
position: [[line-1,startcol], [line-1,endcol]],
69
69
+
}
68
70
}
69
71
70
72
return message
+1
-1
package.json
···
18
18
"providedServices": {
19
19
"linter": {
20
20
"versions": {
21
21
-
"1.0.0": "provideLinter"
21
21
+
"2.0.0": "provideLinter"
22
22
}
23
23
}
24
24
}