Skip to content

Commit 5cc8588

Browse files
authored
Merge pull request nametake#23 from tMinamiii/doc/configuration-add-issues-exit-code
doc: add --issues-exit-code=1
2 parents 59d06f7 + ac948cc commit 5cc8588

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ coc-settings.json
3737
"command": "golangci-lint-langserver",
3838
"filetypes": ["go"],
3939
"initializationOptions": {
40-
"command": ["golangci-lint", "run", "--enable-all", "--disable", "lll", "--out-format", "json"]
40+
"command": ["golangci-lint", "run", "--enable-all", "--disable", "lll", "--out-format", "json", "--issues-exit-code=1"]
4141
}
4242
}
4343
}
@@ -52,7 +52,7 @@ augroup vim_lsp_golangci_lint_langserver
5252
autocmd User lsp_setup call lsp#register_server({
5353
\ 'name': 'golangci-lint-langserver',
5454
\ 'cmd': {server_info->['golangci-lint-langserver']},
55-
\ 'initialization_options': {'command': ['golangci-lint', 'run', '--enable-all', '--disable', 'lll', '--out-format', 'json']},
55+
\ 'initialization_options': {'command': ['golangci-lint', 'run', '--enable-all', '--disable', 'lll', '--out-format', 'json', '--issues-exit-code=1']},
5656
\ 'whitelist': ['go'],
5757
\ })
5858
augroup END
@@ -74,7 +74,7 @@ if not configs.golangcilsp then
7474
cmd = {'golangci-lint-langserver'},
7575
root_dir = lspconfig.util.root_pattern('.git', 'go.mod'),
7676
init_options = {
77-
command = { "golangci-lint", "run", "--enable-all", "--disable", "lll", "--out-format", "json" };
77+
command = { "golangci-lint", "run", "--enable-all", "--disable", "lll", "--out-format", "json", "--issues-exit-code=1" };
7878
}
7979
};
8080
}
@@ -90,7 +90,7 @@ lspconfig.golangci_lint_ls.setup {
9090
(with-eval-after-load 'lsp-mode
9191
(lsp-register-custom-settings
9292
'(("golangci-lint.command"
93-
["golangci-lint" "run" "--enable-all" "--disable" "lll" "--out-format" "json"])))
93+
["golangci-lint" "run" "--enable-all" "--disable" "lll" "--out-format" "json" "--issues-exit-code=1"])))
9494
9595
(lsp-register-client
9696
(make-lsp-client :new-connection (lsp-stdio-connection

0 commit comments

Comments
 (0)