File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,14 @@ function! go#config#Metalinter() abort
244
244
return get (g: , " go_metalinter" , " gometalinter" )
245
245
endfunction
246
246
247
+ function ! go#config#MetalinterConfigEnabled () abort
248
+ return get (g: , " go_metalinter_config_enabled" , 0 )
249
+ endfunction
250
+
251
+ function ! go#config#MetalinterGrepNew () abort
252
+ return get (g: , " go_metalinter_grep_new" , 0 )
253
+ endfunction
254
+
247
255
function ! go#config#MetalinterCommand () abort
248
256
return get (g: , " go_metalinter_command" , " " )
249
257
endfunction
Original file line number Diff line number Diff line change @@ -255,7 +255,14 @@ function! s:golangcilintcmd(bin_path)
255
255
let cmd = [a: bin_path ]
256
256
let cmd += [" run" ]
257
257
let cmd += [" --print-issued-lines=false" ]
258
- let cmd += [" --disable-all" ]
258
+
259
+ if go#config#MetalinterConfigEnabled () == 0
260
+ let cmd += [" --no-config" ]
261
+ let cmd += [" --disable-all" ]
262
+ if go#config#MetalinterGrepNew () == 1
263
+ let cmd += [" --new-from-rev=HEAD~" ]
264
+ endif
265
+
259
266
return cmd
260
267
endfunction
261
268
You can’t perform that action at this time.
0 commit comments