@@ -109,11 +109,11 @@ const parseError = async (toParse, sourceFilePath) => {
109
109
const projectPath = await elixirProjectPath ( sourceFilePath ) ;
110
110
let reResult = re . exec ( toParse ) ;
111
111
while ( reResult !== null ) {
112
- let text ;
112
+ let excerpt ;
113
113
let filePath ;
114
114
let range ;
115
115
if ( reResult [ 2 ] !== undefined ) {
116
- text = `(${ reResult [ 1 ] } ) ${ reResult [ 2 ] } ` ;
116
+ excerpt = `(${ reResult [ 1 ] } ) ${ reResult [ 2 ] } ` ;
117
117
filePath = join ( projectPath , reResult [ 3 ] ) ;
118
118
const fileEditor = findTextEditor ( filePath ) ;
119
119
if ( fileEditor ) {
@@ -126,7 +126,7 @@ const parseError = async (toParse, sourceFilePath) => {
126
126
range = new Range ( [ reResult [ 4 ] - 1 , 0 ] , [ reResult [ 4 ] - 1 , 1 ] ) ;
127
127
}
128
128
} else {
129
- text = `(${ reResult [ 1 ] } ) ${ reResult [ 7 ] } ` ;
129
+ excerpt = `(${ reResult [ 1 ] } ) ${ reResult [ 7 ] } ` ;
130
130
filePath = join ( projectPath , reResult [ 5 ] ) ;
131
131
const fileEditor = findTextEditor ( filePath ) ;
132
132
if ( fileEditor ) {
@@ -136,10 +136,9 @@ const parseError = async (toParse, sourceFilePath) => {
136
136
}
137
137
}
138
138
messages . push ( {
139
- type : 'Error' ,
140
- text,
141
- filePath,
142
- range,
139
+ severity : 'error' ,
140
+ excerpt : excerpt ,
141
+ location : { file : filePath , position : range } ,
143
142
} ) ;
144
143
reResult = re . exec ( toParse ) ;
145
144
}
@@ -170,10 +169,9 @@ const parseWarning = async (toParse, sourceFilePath) => {
170
169
range = new Range ( [ reResult [ 3 ] - 1 , 0 ] , [ reResult [ 3 ] - 1 , 1 ] ) ;
171
170
}
172
171
messages . push ( {
173
- type : 'Warning' ,
174
- text : reResult [ 1 ] ,
175
- filePath,
176
- range,
172
+ severity : 'warning' ,
173
+ excerpt : reResult [ 1 ] ,
174
+ location : { file : filePath , position : range } ,
177
175
} ) ;
178
176
} catch ( Error ) {
179
177
// eslint-disable-next-line no-console
@@ -209,10 +207,9 @@ const parseLegacyWarning = async (toParse, sourceFilePath) => {
209
207
range = new Range ( [ reResult [ 3 ] - 1 , 0 ] , [ reResult [ 3 ] - 1 , 1 ] ) ;
210
208
}
211
209
messages . push ( {
212
- type : 'Warning' ,
213
- text : reResult [ 3 ] ,
214
- filePath,
215
- range,
210
+ severity : 'warning' ,
211
+ excerpt : reResult [ 3 ] ,
212
+ location : { file : filePath , position : range } ,
216
213
} ) ;
217
214
} catch ( Error ) {
218
215
// eslint-disable-next-line no-console
@@ -339,7 +336,7 @@ export default {
339
336
return {
340
337
grammarScopes : [ 'source.elixir' ] ,
341
338
scope : 'project' ,
342
- lintOnFly : false ,
339
+ lintsOnChange : false ,
343
340
name : 'Elixir' ,
344
341
async lint ( textEditor ) {
345
342
const filePath = textEditor . getPath ( ) ;
0 commit comments