summaryrefslogtreecommitdiff
path: root/test/test_filetype_linter_defaults.vader
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2022-01-05 22:33:00 +0900
committerGitHub <noreply@github.com>2022-01-05 22:33:00 +0900
commit5a5029b73d9cfb277ba84c29c2f787b88469ab0f (patch)
treef45617aae694264d915df853e8e76c799b1fe68d /test/test_filetype_linter_defaults.vader
parent7b8e711877449478796306be9124c1fdd690b987 (diff)
downloadale-5a5029b73d9cfb277ba84c29c2f787b88469ab0f.zip
Fix 4004 - Disable eslint by default for json. (#4023)
* Fix 4004 - Disable eslint by default for json. This PR disables, or more correctly, excludes eslint from the list of default linters for json files. Also fixes elixir, go, json5, and jsonc files documentation and default linters to make them consistent. * Fix and improve tests
Diffstat (limited to 'test/test_filetype_linter_defaults.vader')
-rw-r--r--test/test_filetype_linter_defaults.vader65
1 files changed, 58 insertions, 7 deletions
diff --git a/test/test_filetype_linter_defaults.vader b/test/test_filetype_linter_defaults.vader
index 563a093f..7277ff00 100644
--- a/test/test_filetype_linter_defaults.vader
+++ b/test/test_filetype_linter_defaults.vader
@@ -14,6 +14,13 @@ After:
call ale#linter#Reset()
+Execute(The defaults for the apkbuild filetype should be correct):
+ AssertEqual ['apkbuild_lint', 'secfixes_check'], GetLinterNames('apkbuild')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('apkbuild')
+
Execute(The defaults for the csh filetype should be correct):
AssertEqual ['shell'], GetLinterNames('csh')
@@ -21,6 +28,13 @@ Execute(The defaults for the csh filetype should be correct):
AssertEqual [], GetLinterNames('csh')
+Execute(The defaults for the elixir filetype should be correct):
+ AssertEqual ['credo', 'dialyxir', 'dogma'], GetLinterNames('elixir')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('elixir')
+
Execute(The defaults for the go filetype should be correct):
AssertEqual ['gofmt', 'golint', 'gopls', 'govet'], GetLinterNames('go')
@@ -28,9 +42,46 @@ Execute(The defaults for the go filetype should be correct):
AssertEqual [], GetLinterNames('go')
+Execute(The defaults for the hack filetype should be correct):
+ AssertEqual ['hack'], GetLinterNames('hack')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('hack')
+
Execute(The defaults for the help filetype should be correct):
AssertEqual [], GetLinterNames('help')
+Execute(The defaults for the inko filetype should be correct):
+ AssertEqual ['inko'], GetLinterNames('inko')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('inko')
+
+Execute(The defaults for the json filetype should be correct):
+ AssertEqual ['jsonlint', 'spectral'], GetLinterNames('json')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('json')
+
+Execute(The defaults for the json5 filetype should be correct):
+ AssertEqual [], GetLinterNames('json5')
+
+Execute(The defaults for the jsonc filetype should be correct):
+ AssertEqual [], GetLinterNames('jsonc')
+
+Execute(The defaults for the perl filetype should be correct):
+ AssertEqual ['perlcritic'], GetLinterNames('perl')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('perl')
+
+Execute(The defaults for the perl6 filetype should be correct):
+ AssertEqual [], GetLinterNames('perl6')
+
Execute(The defaults for the python filetype should be correct):
AssertEqual ['flake8', 'mypy', 'pylint', 'pyright'], GetLinterNames('python')
@@ -51,6 +102,13 @@ Execute(The defaults for the spec filetype should be correct):
Execute(The defaults for the text filetype should be correct):
AssertEqual [], GetLinterNames('text')
+Execute(The defaults for the vue filetype should be correct):
+ AssertEqual ['vls', 'eslint'], GetLinterNames('vue')
+
+ let g:ale_linters_explicit = 1
+
+ AssertEqual [], GetLinterNames('vue')
+
Execute(The defaults for the zsh filetype should be correct):
AssertEqual ['shell'], GetLinterNames('zsh')
@@ -70,10 +128,3 @@ Execute(The defaults for the verilog filetype should be correct):
Execute(Default aliases for React should be defined):
AssertEqual ['javascript', 'jsx'], ale#linter#ResolveFiletype('javascriptreact')
AssertEqual ['typescript', 'tsx'], ale#linter#ResolveFiletype('typescriptreact')
-
-Execute(The defaults for the apkbuild filetype should be correct):
- AssertEqual ['apkbuild_lint', 'secfixes_check'], GetLinterNames('apkbuild')
-
- let g:ale_linters_explicit = 1
-
- AssertEqual [], GetLinterNames('apkbuild')