From b0ba31f88e09c033630ac15ae07143af7f658072 Mon Sep 17 00:00:00 2001 From: Veselin Ivanov Date: Sun, 2 Apr 2023 11:09:58 +0200 Subject: [PATCH] remove `--enable-all` from golangci-lint options (#4488) * remove --enable-all from default golangci-lint options * update golangci-lint options documentation * update tests to use empty golangci-lint options --- ale_linters/go/golangci_lint.vim | 2 +- doc/ale-go.txt | 2 +- test/linter/test_golangci_lint.vader | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ale_linters/go/golangci_lint.vim b/ale_linters/go/golangci_lint.vim index 80431b99..78087b5e 100644 --- a/ale_linters/go/golangci_lint.vim +++ b/ale_linters/go/golangci_lint.vim @@ -1,7 +1,7 @@ " Author: Sascha Grunert " Description: Adds support of golangci-lint -call ale#Set('go_golangci_lint_options', '--enable-all') +call ale#Set('go_golangci_lint_options', '') call ale#Set('go_golangci_lint_executable', 'golangci-lint') call ale#Set('go_golangci_lint_package', 0) diff --git a/doc/ale-go.txt b/doc/ale-go.txt index 133096d8..28a06dfd 100644 --- a/doc/ale-go.txt +++ b/doc/ale-go.txt @@ -120,7 +120,7 @@ g:ale_go_golangci_lint_executable *g:ale_go_golangci_lint_executable* g:ale_go_golangci_lint_options *g:ale_go_golangci_lint_options* *b:ale_go_golangci_lint_options* Type: |String| - Default: `'--enable-all'` + Default: `''` This variable can be changed to alter the command-line arguments to the golangci-lint invocation. diff --git a/test/linter/test_golangci_lint.vader b/test/linter/test_golangci_lint.vader index ee754bba..c4dfb79b 100644 --- a/test/linter/test_golangci_lint.vader +++ b/test/linter/test_golangci_lint.vader @@ -16,7 +16,7 @@ Execute(The golangci-lint defaults should be correct): AssertLinter 'golangci-lint', \ ale#Escape('golangci-lint') \ . ' run ' . ale#Escape(expand('%' . ':t')) - \ . ' --enable-all' + \ . ' ' Execute(The golangci-lint callback should use a configured executable): let b:ale_go_golangci_lint_executable = 'something else' @@ -24,7 +24,7 @@ Execute(The golangci-lint callback should use a configured executable): AssertLinter 'something else', \ ale#Escape('something else') \ . ' run ' . ale#Escape(expand('%' . ':t')) - \ . ' --enable-all' + \ . ' ' Execute(The golangci-lint callback should use configured options): let b:ale_go_golangci_lint_options = '--foobar' @@ -41,10 +41,10 @@ Execute(The golangci-lint callback should support environment variables): \ ale#Env('GO111MODULE', 'on') \ . ale#Escape('golangci-lint') \ . ' run ' . ale#Escape(expand('%' . ':t')) - \ . ' --enable-all' + \ . ' ' Execute(The golangci-lint `lint_package` option should use the correct command): let b:ale_go_golangci_lint_package = 1 AssertLinter 'golangci-lint', - \ ale#Escape('golangci-lint') . ' run --enable-all' + \ ale#Escape('golangci-lint') . ' run '