From 38e0e3feefad4e5974224a05cfa612c52bd8e358 Mon Sep 17 00:00:00 2001 From: Bartek thindil Jasicki Date: Fri, 11 Oct 2019 10:08:36 +0200 Subject: added adalsp test --- test/command_callback/test_adalsp_command_callbacks.vader | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/command_callback/test_adalsp_command_callbacks.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_adalsp_command_callbacks.vader b/test/command_callback/test_adalsp_command_callbacks.vader new file mode 100644 index 00000000..73cbf296 --- /dev/null +++ b/test/command_callback/test_adalsp_command_callbacks.vader @@ -0,0 +1,12 @@ +Before: + call ale#assert#SetUpLinterTest('ada', 'adalsp') + +After: + call ale#assert#TearDownLinterTest() + +Execute(It does not set Ada sources by default): + AssertLinter 'adalsp', ale#Escape('adalsp') + +Execute(Sets adalsp executable): + let g:ale_ada_adalsp_executable = '/path/to /Ada' + AssertLinter 'adalsp', ale#Escape('adalsp') . ' ' . ale#Escape('/path/to /Ada') -- cgit v1.2.3 From c74cc931404ba94ccb71a6db2f54d78ba922aaab Mon Sep 17 00:00:00 2001 From: Bartek thindil Jasicki Date: Fri, 11 Oct 2019 10:35:54 +0200 Subject: fixed test --- test/command_callback/test_adalsp_command_callbacks.vader | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_adalsp_command_callbacks.vader b/test/command_callback/test_adalsp_command_callbacks.vader index 73cbf296..e02ade30 100644 --- a/test/command_callback/test_adalsp_command_callbacks.vader +++ b/test/command_callback/test_adalsp_command_callbacks.vader @@ -4,9 +4,6 @@ Before: After: call ale#assert#TearDownLinterTest() -Execute(It does not set Ada sources by default): - AssertLinter 'adalsp', ale#Escape('adalsp') - Execute(Sets adalsp executable): - let g:ale_ada_adalsp_executable = '/path/to /Ada' - AssertLinter 'adalsp', ale#Escape('adalsp') . ' ' . ale#Escape('/path/to /Ada') + let g:ale_ada_lsp_executable = '/path/to /Ada' + AssertLinter 'adalsp', ale#Escape('/path/to /Ada') -- cgit v1.2.3 From 321a3892a73b39bab4b1833b1473a6e0b46dc9fd Mon Sep 17 00:00:00 2001 From: Bartek thindil Jasicki Date: Fri, 11 Oct 2019 10:41:19 +0200 Subject: fixed test again (this time for sure) --- test/command_callback/test_adalsp_command_callbacks.vader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_adalsp_command_callbacks.vader b/test/command_callback/test_adalsp_command_callbacks.vader index e02ade30..92c6dfb0 100644 --- a/test/command_callback/test_adalsp_command_callbacks.vader +++ b/test/command_callback/test_adalsp_command_callbacks.vader @@ -6,4 +6,4 @@ After: Execute(Sets adalsp executable): let g:ale_ada_lsp_executable = '/path/to /Ada' - AssertLinter 'adalsp', ale#Escape('/path/to /Ada') + AssertLinter ale#Escape('/path/to /Ada'), ale#Escape('/path/to /Ada') -- cgit v1.2.3 From c30869617f6c829378d1931dc5ddf102924f5650 Mon Sep 17 00:00:00 2001 From: Bartek thindil Jasicki Date: Fri, 11 Oct 2019 10:48:50 +0200 Subject: another fix for test --- test/command_callback/test_adalsp_command_callbacks.vader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_adalsp_command_callbacks.vader b/test/command_callback/test_adalsp_command_callbacks.vader index 92c6dfb0..e635acb3 100644 --- a/test/command_callback/test_adalsp_command_callbacks.vader +++ b/test/command_callback/test_adalsp_command_callbacks.vader @@ -6,4 +6,4 @@ After: Execute(Sets adalsp executable): let g:ale_ada_lsp_executable = '/path/to /Ada' - AssertLinter ale#Escape('/path/to /Ada'), ale#Escape('/path/to /Ada') + AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada') -- cgit v1.2.3 From 2f181658e6e40798c74e2f58067ab3aeffab8224 Mon Sep 17 00:00:00 2001 From: Bartek thindil Jasicki Date: Fri, 18 Oct 2019 18:26:08 +0200 Subject: rename command variable to *_adals_* instead of *_lsp_* and whole name to adals instead of adalsp --- test/command_callback/test_adals_command_callbacks.vader | 9 +++++++++ test/command_callback/test_adalsp_command_callbacks.vader | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 test/command_callback/test_adals_command_callbacks.vader delete mode 100644 test/command_callback/test_adalsp_command_callbacks.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_adals_command_callbacks.vader b/test/command_callback/test_adals_command_callbacks.vader new file mode 100644 index 00000000..0b1f6006 --- /dev/null +++ b/test/command_callback/test_adals_command_callbacks.vader @@ -0,0 +1,9 @@ +Before: + call ale#assert#SetUpLinterTest('ada', 'adals') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Sets adals executable): + let g:ale_ada_adals_executable = '/path/to /Ada' + AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada') diff --git a/test/command_callback/test_adalsp_command_callbacks.vader b/test/command_callback/test_adalsp_command_callbacks.vader deleted file mode 100644 index e635acb3..00000000 --- a/test/command_callback/test_adalsp_command_callbacks.vader +++ /dev/null @@ -1,9 +0,0 @@ -Before: - call ale#assert#SetUpLinterTest('ada', 'adalsp') - -After: - call ale#assert#TearDownLinterTest() - -Execute(Sets adalsp executable): - let g:ale_ada_lsp_executable = '/path/to /Ada' - AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada') -- cgit v1.2.3 From b454e4314301ad5bdf159f849dc6f30bb377d8f2 Mon Sep 17 00:00:00 2001 From: Bartek Jasicki Date: Tue, 5 Nov 2019 18:00:16 +0100 Subject: Update test/command_callback/test_adals_command_callbacks.vader Co-Authored-By: timlag1305 --- test/command_callback/test_adals_command_callbacks.vader | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/command_callback') diff --git a/test/command_callback/test_adals_command_callbacks.vader b/test/command_callback/test_adals_command_callbacks.vader index 0b1f6006..5a04594e 100644 --- a/test/command_callback/test_adals_command_callbacks.vader +++ b/test/command_callback/test_adals_command_callbacks.vader @@ -7,3 +7,11 @@ After: Execute(Sets adals executable): let g:ale_ada_adals_executable = '/path/to /Ada' AssertLinter '/path/to /Ada', ale#Escape('/path/to /Ada') + +Execute(Sets adals encoding): + let b:ale_ada_adals_encoding = 'iso-8859-1' + AssertLSPConfig {'ada.defaultCharset': 'iso-8859-1', 'ada.projectFile': 'default.gpr'} + +Execute(Sets adals project): + let g:ale_ada_adals_project = 'myproject.gpr' + AssertLSPConfig {'ada.defaultCharset': 'utf-8', 'ada.projectFile': 'myproject.gpr'} -- cgit v1.2.3 From 49718e0ec6eb4b9068049048c9373167c19257c9 Mon Sep 17 00:00:00 2001 From: Dmitri Vereshchagin Date: Sun, 1 Sep 2019 17:36:40 +0300 Subject: Add Elvis handler for Erlang [Elvis][1] is an Erlang style reviewer. [1]: https://github.com/inaka/elvis --- .../test_erlang_elvis_command_callback.vader | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/command_callback/test_erlang_elvis_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_erlang_elvis_command_callback.vader b/test/command_callback/test_erlang_elvis_command_callback.vader new file mode 100644 index 00000000..4aab49d6 --- /dev/null +++ b/test/command_callback/test_erlang_elvis_command_callback.vader @@ -0,0 +1,16 @@ +Before: + let b:file = fnamemodify(bufname(''), ':.') + call ale#assert#SetUpLinterTest('erlang', 'elvis') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Default command should be correct): + AssertLinter 'elvis', + \ ale#Escape('elvis') . ' rock --output-format=parsable ' . ale#Escape(b:file) + +Execute(Executable should be configurable): + let b:ale_erlang_elvis_executable = '/path/to/elvis' + + AssertLinter '/path/to/elvis', + \ ale#Escape('/path/to/elvis') . ' rock --output-format=parsable ' . ale#Escape(b:file) -- cgit v1.2.3 From fec6b63494b4f491279c7a01c0d61e515b8d0f46 Mon Sep 17 00:00:00 2001 From: Arnold Chand Date: Tue, 15 Sep 2020 19:14:12 -0400 Subject: feat: add intelephense support for php --- .../with-composer/composer.json | 0 .../test_php_intelephense_command_callback.vader | 23 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/command_callback/php-intelephense-project/with-composer/composer.json create mode 100644 test/command_callback/test_php_intelephense_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/php-intelephense-project/with-composer/composer.json b/test/command_callback/php-intelephense-project/with-composer/composer.json new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/test_php_intelephense_command_callback.vader b/test/command_callback/test_php_intelephense_command_callback.vader new file mode 100644 index 00000000..283fd615 --- /dev/null +++ b/test/command_callback/test_php_intelephense_command_callback.vader @@ -0,0 +1,23 @@ +Before: + call ale#assert#SetUpLinterTest('php', 'intelephense') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'intelephense', + \ ale#Escape('intelephense') . ' --stdio' + +Execute(The project path should be correct for .git directories): + call ale#test#SetFilename('php-intelephense-project/with-git/test.php') + silent! call mkdir('php-langserver-project/with-git/.git', 'p') + AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-git') + +Execute(The project path should be correct for composer.json file): + call ale#test#SetFilename('php-intelephense-project/with-composer/test.php') + AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-composer') + +Execute(The project should save to a temp dir): + call ale#test#SetFilename('php-intelephense-project/with-composer/test.php') + let g:ale_php_intelephense_config = { 'storagePath': '/tmp/intelephense' } + AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-composer') -- cgit v1.2.3 From 8a855e3e6442a3b1384a07098d166c114a3e01f3 Mon Sep 17 00:00:00 2001 From: Arnold Chand Date: Thu, 17 Sep 2020 09:35:06 -0400 Subject: fix: tests --- test/command_callback/test_php_intelephense_command_callback.vader | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_php_intelephense_command_callback.vader b/test/command_callback/test_php_intelephense_command_callback.vader index 283fd615..164ca26e 100644 --- a/test/command_callback/test_php_intelephense_command_callback.vader +++ b/test/command_callback/test_php_intelephense_command_callback.vader @@ -10,14 +10,17 @@ Execute(The default executable path should be correct): Execute(The project path should be correct for .git directories): call ale#test#SetFilename('php-intelephense-project/with-git/test.php') - silent! call mkdir('php-langserver-project/with-git/.git', 'p') + silent! call mkdir('php-intelephense-project/with-git/.git') + AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-git') Execute(The project path should be correct for composer.json file): call ale#test#SetFilename('php-intelephense-project/with-composer/test.php') + AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-composer') -Execute(The project should save to a temp dir): +Execute(The project cache should be saved in a temp dir): call ale#test#SetFilename('php-intelephense-project/with-composer/test.php') let g:ale_php_intelephense_config = { 'storagePath': '/tmp/intelephense' } + AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-composer') -- cgit v1.2.3 From f8351c1b22d02f194235388779ad47028d5e7a25 Mon Sep 17 00:00:00 2001 From: Arnold Chand Date: Thu, 17 Sep 2020 09:58:45 -0400 Subject: fix: test: mkdir should create if it doesn't exist --- test/command_callback/test_php_intelephense_command_callback.vader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_php_intelephense_command_callback.vader b/test/command_callback/test_php_intelephense_command_callback.vader index 164ca26e..dd6adb3d 100644 --- a/test/command_callback/test_php_intelephense_command_callback.vader +++ b/test/command_callback/test_php_intelephense_command_callback.vader @@ -10,7 +10,7 @@ Execute(The default executable path should be correct): Execute(The project path should be correct for .git directories): call ale#test#SetFilename('php-intelephense-project/with-git/test.php') - silent! call mkdir('php-intelephense-project/with-git/.git') + silent! call mkdir('php-intelephense-project/with-git/.git', 'p') AssertLSPProject ale#path#Simplify(g:dir . '/php-intelephense-project/with-git') -- cgit v1.2.3 From cafe8621e2e94c8eff37a430fdccb0b87788620a Mon Sep 17 00:00:00 2001 From: Will Leinweber Date: Tue, 20 Oct 2020 21:54:45 -0700 Subject: Add Ruby sorbet option to enable watchman --- test/command_callback/test_sorbet_command_callback.vader | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/command_callback') diff --git a/test/command_callback/test_sorbet_command_callback.vader b/test/command_callback/test_sorbet_command_callback.vader index b46e90a4..fe758635 100644 --- a/test/command_callback/test_sorbet_command_callback.vader +++ b/test/command_callback/test_sorbet_command_callback.vader @@ -5,6 +5,7 @@ Before: let g:ale_ruby_sorbet_executable = 'srb' let g:ale_ruby_sorbet_options = '' + let g:ale_ruby_sorbet_enable_watchman = 0 After: call ale#assert#TearDownLinterTest() @@ -13,6 +14,12 @@ Execute(Executable should default to srb): AssertLinter 'srb', ale#Escape('srb') \ . ' tc --lsp --disable-watchman' +Execute(Able to enable watchman): + let g:ale_ruby_sorbet_enable_watchman = 1 + + AssertLinter 'srb', ale#Escape('srb') + \ . ' tc --lsp' + Execute(Should be able to set a custom executable): let g:ale_ruby_sorbet_executable = 'bin/srb' -- cgit v1.2.3 From 513e6ee972ea4ee57b28b8b8c10e0b89bb674f25 Mon Sep 17 00:00:00 2001 From: Lyz Date: Fri, 23 Oct 2020 18:53:38 +0200 Subject: feat: add autoimport fixer --- .../python_paths/with_virtualenv/env/Scripts/autoimport.exe | 0 test/command_callback/python_paths/with_virtualenv/env/bin/autoimport | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100755 test/command_callback/python_paths/with_virtualenv/env/Scripts/autoimport.exe create mode 100755 test/command_callback/python_paths/with_virtualenv/env/bin/autoimport (limited to 'test/command_callback') diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/autoimport.exe b/test/command_callback/python_paths/with_virtualenv/env/Scripts/autoimport.exe new file mode 100755 index 00000000..e69de29b diff --git a/test/command_callback/python_paths/with_virtualenv/env/bin/autoimport b/test/command_callback/python_paths/with_virtualenv/env/bin/autoimport new file mode 100755 index 00000000..e69de29b -- cgit v1.2.3 From ddfc43e774fd38e4051ba9fd3619ca9f0da6639f Mon Sep 17 00:00:00 2001 From: Ben Linsay Date: Wed, 18 Nov 2020 20:39:07 -0500 Subject: pass lsp intialization_options to rust-analyzer fixes #3350 --- test/command_callback/test_rust_analyzer_callbacks.vader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_rust_analyzer_callbacks.vader b/test/command_callback/test_rust_analyzer_callbacks.vader index 95866076..efab1378 100644 --- a/test/command_callback/test_rust_analyzer_callbacks.vader +++ b/test/command_callback/test_rust_analyzer_callbacks.vader @@ -16,5 +16,5 @@ Execute(The project root should be detected correctly): Execute(Should accept configuration settings): AssertLSPConfig {} - let b:ale_rust_analyzer_config = {'rust': {'clippy_preference': 'on'}} - AssertLSPConfig {'rust': {'clippy_preference': 'on'}} + let b:ale_rust_analyzer_config = {'diagnostics': {'disabled': ['unresolved-import']}} + AssertLSPOptions {'diagnostics': {'disabled': ['unresolved-import']}} -- cgit v1.2.3 From 9692c0c64c83bb8f67962cf35e7dc3f1757aa8cc Mon Sep 17 00:00:00 2001 From: Eric Zhao <21zhaoe@protonmail.com> Date: Sat, 21 Nov 2020 15:56:38 -0500 Subject: Add support for R languageserver (#3370) --- test/command_callback/r_paths/.Rprofile | 0 .../test_r_languageserver_callbacks.vader | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/command_callback/r_paths/.Rprofile create mode 100644 test/command_callback/test_r_languageserver_callbacks.vader (limited to 'test/command_callback') diff --git a/test/command_callback/r_paths/.Rprofile b/test/command_callback/r_paths/.Rprofile new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/test_r_languageserver_callbacks.vader b/test/command_callback/test_r_languageserver_callbacks.vader new file mode 100644 index 00000000..7829165c --- /dev/null +++ b/test/command_callback/test_r_languageserver_callbacks.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('r', 'languageserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'Rscript', 'Rscript --vanilla -e ' . ale#Escape('languageserver::run()') + +Execute(The project root should be detected correctly): + AssertLSPProject '.' + + call ale#test#SetFilename('r_paths/dummy/test.R') + + AssertLSPProject ale#path#Simplify(g:dir . '/r_paths') + +Execute(Should accept configuration settings): + AssertLSPConfig {} + + let b:ale_r_languageserver_options = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} + + AssertLSPConfig {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} -- cgit v1.2.3 From 681a6e371d02cce9c2414c19f5deeae61aa321fa Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 21 Nov 2020 20:58:34 +0000 Subject: Use _config for LSP config options --- test/command_callback/test_r_languageserver_callbacks.vader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_r_languageserver_callbacks.vader b/test/command_callback/test_r_languageserver_callbacks.vader index 7829165c..9a4a1f87 100644 --- a/test/command_callback/test_r_languageserver_callbacks.vader +++ b/test/command_callback/test_r_languageserver_callbacks.vader @@ -17,6 +17,6 @@ Execute(The project root should be detected correctly): Execute(Should accept configuration settings): AssertLSPConfig {} - let b:ale_r_languageserver_options = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} + let b:ale_r_languageserver_config = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} AssertLSPConfig {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}} -- cgit v1.2.3 From 7e9d4fbfc820ae4198b07b204295fc3acd391209 Mon Sep 17 00:00:00 2001 From: Gonzalo Quero Date: Mon, 23 Nov 2020 10:21:09 +0000 Subject: refactor: Move test to the right file --- test/command_callback/test_elixir_credo.vader | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/command_callback') diff --git a/test/command_callback/test_elixir_credo.vader b/test/command_callback/test_elixir_credo.vader index 3eb88846..b14444c6 100644 --- a/test/command_callback/test_elixir_credo.vader +++ b/test/command_callback/test_elixir_credo.vader @@ -38,3 +38,10 @@ Execute(Builds credo command with suggest mode when set to 0): AssertLinter 'mix', \ ale#path#CdString(ale#path#Simplify(g:dir . '/elixir_paths/mix_project')) \ . 'mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s' + +Execute(Builds credo command with a custom config file): + let g:ale_elixir_credo_config_file = '/home/user/custom_credo.exs' + + AssertLinter 'mix', + \ ale#path#CdString(ale#path#Simplify(g:dir . '/elixir_paths/mix_project')) + \ . 'mix help credo && mix credo suggest --config-file /home/user/custom_credo.exs --format=flycheck --read-from-stdin %s' -- cgit v1.2.3 From c69d696e1b63c7797e8696f923856d131f02f5e9 Mon Sep 17 00:00:00 2001 From: Lyz Date: Tue, 24 Nov 2020 23:56:30 +0100 Subject: feat: add yamlfix fixer --- .../command_callback/python_paths/with_virtualenv/env/Scripts/yamlfix.exe | 0 test/command_callback/python_paths/with_virtualenv/env/bin/yamlfix | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/command_callback/python_paths/with_virtualenv/env/Scripts/yamlfix.exe create mode 100755 test/command_callback/python_paths/with_virtualenv/env/bin/yamlfix (limited to 'test/command_callback') diff --git a/test/command_callback/python_paths/with_virtualenv/env/Scripts/yamlfix.exe b/test/command_callback/python_paths/with_virtualenv/env/Scripts/yamlfix.exe new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/python_paths/with_virtualenv/env/bin/yamlfix b/test/command_callback/python_paths/with_virtualenv/env/bin/yamlfix new file mode 100755 index 00000000..e69de29b -- cgit v1.2.3 From fa2186d95e30faa9c7e00400100ceca67ad45872 Mon Sep 17 00:00:00 2001 From: Andrea Conti Date: Sat, 12 Dec 2020 00:16:09 +0100 Subject: Update Julia language server run command --- test/command_callback/test_julia_languageserver_callbacks.vader | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 3bc46e3d..75b858e5 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -11,16 +11,16 @@ After: Execute(The default executable path should be correct): AssertLinter 'julia', \ ale#Escape('julia') . - \' --startup-file=no --history-file=no -e ' . - \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, false); server.runlinter = true; run(server);') + \'--project=@. --startup-file=no --history-file=no -e ' . + \ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);') Execute(The executable should be configurable): let g:ale_julia_executable = 'julia-new' AssertLinter 'julia-new', \ ale#Escape('julia-new') . - \' --startup-file=no --history-file=no -e ' . - \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, false); server.runlinter = true; run(server);') + \'--project=@. --startup-file=no --history-file=no -e ' . + \ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);') Execute(The project root should be detected correctly): AssertLSPProject '' -- cgit v1.2.3 From 6043eeb25ad9019aa1322912de1081fa8a0fa299 Mon Sep 17 00:00:00 2001 From: Andrea Conti Date: Sat, 12 Dec 2020 00:41:05 +0100 Subject: Fix test space bug --- test/command_callback/test_julia_languageserver_callbacks.vader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 75b858e5..96df81f1 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -11,7 +11,7 @@ After: Execute(The default executable path should be correct): AssertLinter 'julia', \ ale#Escape('julia') . - \'--project=@. --startup-file=no --history-file=no -e ' . + \' --project=@. --startup-file=no --history-file=no -e ' . \ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);') Execute(The executable should be configurable): @@ -19,7 +19,7 @@ Execute(The executable should be configurable): AssertLinter 'julia-new', \ ale#Escape('julia-new') . - \'--project=@. --startup-file=no --history-file=no -e ' . + \' --project=@. --startup-file=no --history-file=no -e ' . \ ale#Escape('using LanguageServer; using Pkg; import StaticLint; import SymbolServer; server = LanguageServer.LanguageServerInstance(isdefined(Base, :stdin) ? stdin : STDIN, isdefined(Base, :stdout) ? stdout : STDOUT, dirname(Pkg.Types.Context().env.project_file)); server.runlinter = true; run(server);') Execute(The project root should be detected correctly): -- cgit v1.2.3 From 8375ee2766c4d69462b8c883ddf76d58a86891e4 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 29 Oct 2020 18:27:27 +0100 Subject: Add linter for Inko This adds a linter for Inko (https://inko-lang.org/). The linter makes use of Inko's own compiler, and a newly introduced --check flag to only check for errors; instead of also compiling source code. --- test/command_callback/inko_paths/test.inko | 0 .../inko_paths/tests/test/test_foo.inko | 0 test/command_callback/test_inko_inko_callbacks.vader | 20 ++++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 test/command_callback/inko_paths/test.inko create mode 100644 test/command_callback/inko_paths/tests/test/test_foo.inko create mode 100644 test/command_callback/test_inko_inko_callbacks.vader (limited to 'test/command_callback') diff --git a/test/command_callback/inko_paths/test.inko b/test/command_callback/inko_paths/test.inko new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/inko_paths/tests/test/test_foo.inko b/test/command_callback/inko_paths/tests/test/test_foo.inko new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/test_inko_inko_callbacks.vader b/test/command_callback/test_inko_inko_callbacks.vader new file mode 100644 index 00000000..93295c91 --- /dev/null +++ b/test/command_callback/test_inko_inko_callbacks.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('inko', 'inko') + call ale#test#SetFilename('inko_paths/test.inko') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'inko', ale#Escape('inko') . ' build --check --format=json %s' + +Execute(The inko callback should include tests/ for test paths): + call ale#engine#Cleanup(bufnr('')) + noautocmd e! inko_paths/tests/test/test_foo.inko + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'inko', + \ ale#Escape('inko') + \ . ' build --check --format=json --include ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/inko_paths/tests/')) + \ . ' %s' -- cgit v1.2.3 From 39f393ef077998028bce697659c3aac37f7aa090 Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Thu, 14 Jan 2021 10:06:20 -0800 Subject: Add nvim floating window support (replaces #3314) (#3470) * Add nvim floating window hover support * Add configuration for float to replace preview * preview#ShowFloating: qualify local variables * Configure floating preview usecases individually Also: * Extract floating preview to its own file. * Ignore 'stay_here' option. Moving into the floating preview window seems confusing at best. * Re-use existing floating preview window if it's still up. * Flush out floating preview documentation. * Watch cursor position changes per window Floating previews open a new window, so when that window is written to, it moves briefly there at a different position than the original window. This makes repeated positions detected when positions are tracked at a s: level. Instead, we change the variable to window scoped, which only fires a message if the cursor has changed from the last position in *that window*. * g:ale_floating_preview cleanup * floating_preview: add ALEDetail tests * Fix fecs test missing runtime call * Add ALEHover floating preview tests Co-authored-by: Jan-Grimo Sobez --- test/command_callback/test_fecs_command_callback.vader | 1 + 1 file changed, 1 insertion(+) (limited to 'test/command_callback') diff --git a/test/command_callback/test_fecs_command_callback.vader b/test/command_callback/test_fecs_command_callback.vader index f70ad084..4287d324 100644 --- a/test/command_callback/test_fecs_command_callback.vader +++ b/test/command_callback/test_fecs_command_callback.vader @@ -1,5 +1,6 @@ Before: call ale#assert#SetUpLinterTest('javascript', 'fecs') + runtime autoload/ale/handlers/fecs.vim After: call ale#assert#TearDownLinterTest() -- cgit v1.2.3 From 03eae9e085f6020a017ecbe761cccac9a5a89d77 Mon Sep 17 00:00:00 2001 From: Horacio Sanson Date: Fri, 20 Sep 2019 22:04:44 +0900 Subject: Fix 2777 - Add IBM openapi validator --- .../test_ibm_openapi_validator_command_callback.vader | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/command_callback/test_ibm_openapi_validator_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_ibm_openapi_validator_command_callback.vader b/test/command_callback/test_ibm_openapi_validator_command_callback.vader new file mode 100644 index 00000000..3484cc09 --- /dev/null +++ b/test/command_callback/test_ibm_openapi_validator_command_callback.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('openapi', 'ibm_validator') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The yaml ibm-openapi-validator command callback should return the correct default string): + AssertLinter 'lint-openapi', ale#Escape('lint-openapi') . ' %t' + +Execute(The yaml ibm-openapi-validator command callback should be configurable): + let g:ale_openapi_ibm_validator_executable = '~/.local/bin/lint-openapi' + let g:ale_openapi_ibm_validator_options = '-c ~/.config' + + AssertLinter '~/.local/bin/lint-openapi', ale#Escape('~/.local/bin/lint-openapi') + \ . ' -c ~/.config %t' -- cgit v1.2.3 From 65824feef320f56a9f645cfe1a3107ff8717372a Mon Sep 17 00:00:00 2001 From: fenuks Date: Fri, 22 Jan 2021 01:01:26 +0100 Subject: Fix clang-tidy ignoring compile_commands.json --- test/command_callback/test_clang_tidy_command_callback.vader | 1 - 1 file changed, 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_clang_tidy_command_callback.vader b/test/command_callback/test_clang_tidy_command_callback.vader index f0a07e8c..eb1220be 100644 --- a/test/command_callback/test_clang_tidy_command_callback.vader +++ b/test/command_callback/test_clang_tidy_command_callback.vader @@ -68,7 +68,6 @@ Execute(The build directory should be used for header files): \ ale#Escape('clang-tidy') \ . ' -checks=' . ale#Escape('*') . ' %s' \ . ' -p ' . ale#Escape('/foo/bar') - \ . ' -- -x c++' call ale#test#SetFilename('test.hpp') -- cgit v1.2.3 From 6bfcb9cdffb86bf1a3e6d26cd1964858ff4bc3dd Mon Sep 17 00:00:00 2001 From: Charles B Johnson Date: Wed, 8 Apr 2020 17:59:17 -0500 Subject: linters/xo: consolidate xo linters --- .../test_xo_command_callback.vader | 10 ++++++---- .../test_xots_command_callback.vader | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 test/command_callback/test_xots_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_xo_command_callback.vader b/test/command_callback/test_xo_command_callback.vader index 65cb4f8a..7a38b2b1 100644 --- a/test/command_callback/test_xo_command_callback.vader +++ b/test/command_callback/test_xo_command_callback.vader @@ -1,8 +1,10 @@ Before: - call ale#assert#SetUpLinterTest('typescript', 'xo') - call ale#test#SetFilename('testfile.ts') + call ale#assert#SetUpLinterTest('javascript', 'xo') + call ale#test#SetFilename('testfile.js') unlet! b:executable + runtime autoload/ale/handlers/xo.vim + After: call ale#assert#TearDownLinterTest() @@ -10,11 +12,11 @@ Execute(The XO executable should be called): AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s' Execute(The XO executable should be configurable): - let b:ale_typescript_xo_executable = 'foobar' + let b:ale_javascript_xo_executable = 'foobar' AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s' Execute(The XO options should be configurable): - let b:ale_typescript_xo_options = '--wat' + let b:ale_javascript_xo_options = '--wat' AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s' diff --git a/test/command_callback/test_xots_command_callback.vader b/test/command_callback/test_xots_command_callback.vader new file mode 100644 index 00000000..c614ad59 --- /dev/null +++ b/test/command_callback/test_xots_command_callback.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('typescript', 'xo') + call ale#test#SetFilename('testfile.ts') + unlet! b:executable + + runtime autoload/ale/handlers/xo.vim + +After: + call ale#assert#TearDownLinterTest() + +Execute(The XO executable should be called): + AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO executable should be configurable): + let b:ale_typescript_xo_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO options should be configurable): + let b:ale_typescript_xo_options = '--wat' + + AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s' -- cgit v1.2.3 From 5fd5fa53051c3514917974d0ba57f18eb50dd37e Mon Sep 17 00:00:00 2001 From: Charles B Johnson Date: Tue, 19 Jan 2021 23:08:10 -0600 Subject: linters/xo: fix tests --- test/command_callback/test_xo_command_callback.vader | 3 ++- test/command_callback/test_xots_command_callback.vader | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_xo_command_callback.vader b/test/command_callback/test_xo_command_callback.vader index 7a38b2b1..1aa4c3f1 100644 --- a/test/command_callback/test_xo_command_callback.vader +++ b/test/command_callback/test_xo_command_callback.vader @@ -1,8 +1,9 @@ Before: call ale#assert#SetUpLinterTest('javascript', 'xo') - call ale#test#SetFilename('testfile.js') + call ale#test#SetFilename('testfile.jsx') unlet! b:executable + set filetype=javascriptreact runtime autoload/ale/handlers/xo.vim After: diff --git a/test/command_callback/test_xots_command_callback.vader b/test/command_callback/test_xots_command_callback.vader index c614ad59..cc38ff02 100644 --- a/test/command_callback/test_xots_command_callback.vader +++ b/test/command_callback/test_xots_command_callback.vader @@ -1,8 +1,9 @@ Before: call ale#assert#SetUpLinterTest('typescript', 'xo') - call ale#test#SetFilename('testfile.ts') + call ale#test#SetFilename('testfile.tsx') unlet! b:executable + set filetype=typescriptreact runtime autoload/ale/handlers/xo.vim After: -- cgit v1.2.3 From efe65f347719a34e5d60e056f2cc3dc0356af10e Mon Sep 17 00:00:00 2001 From: Nelson Yeung Date: Wed, 20 Jan 2021 19:29:30 +0000 Subject: Add command callback tests --- .../test_dart_analysis_server_command_callback.vader | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/command_callback/test_dart_analysis_server_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_dart_analysis_server_command_callback.vader b/test/command_callback/test_dart_analysis_server_command_callback.vader new file mode 100644 index 00000000..1754109a --- /dev/null +++ b/test/command_callback/test_dart_analysis_server_command_callback.vader @@ -0,0 +1,15 @@ +Before: + call ale#assert#SetUpLinterTest('dart', 'analysis_server') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default command should be correct): + AssertLinter 'dart', ale#Escape('dart') + \ . ' ./snapshots/analysis_server.dart.snapshot --lsp' + +Execute(The executable should be configurable): + let g:ale_dart_analysis_server_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') + \ . ' ./snapshots/analysis_server.dart.snapshot --lsp' -- cgit v1.2.3 From 9b362634f7210657d94870b017e969bdcdda8de0 Mon Sep 17 00:00:00 2001 From: Mohammed Chelouti <70812484+motato1@users.noreply.github.com> Date: Tue, 29 Dec 2020 21:46:02 +0100 Subject: feat: Add Deno lsp support --- .../test_typescript_deno_lsp.vader | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 test/command_callback/test_typescript_deno_lsp.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_typescript_deno_lsp.vader b/test/command_callback/test_typescript_deno_lsp.vader new file mode 100644 index 00000000..b6e4db0e --- /dev/null +++ b/test/command_callback/test_typescript_deno_lsp.vader @@ -0,0 +1,61 @@ +Before: + let g:ale_deno_unstable = 0 + let g:ale_deno_executable = 'deno' + let g:ale_deno_project_root = '' + + runtime autoload/ale/handlers/deno.vim + call ale#assert#SetUpLinterTest('typescript', 'deno') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should set deno lsp for TypeScript projects using stable Deno API): + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../..') + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false + \} + +Execute(Should set deno lsp using unstable Deno API if enabled by user): + let g:ale_deno_unstable = 1 + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../..') + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:true + \} + +Execute(Should find project root containing tsconfig.json): + call ale#test#SetFilename('../typescript/test.ts') + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../typescript') + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false + \} + +Execute(Should use user-specified project root): + let g:ale_deno_lsp_project_root = '/' + + call ale#test#SetFilename('../typescript/test.ts') + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject '/' + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false + \} + + +Execute(Check Deno LSP command): + AssertLinter 'deno', [ + \ ale#Escape('deno') . ' lsp', + \] -- cgit v1.2.3 From e16c3b09f74dfa6c096fb50c8cd09b1974e75fb0 Mon Sep 17 00:00:00 2001 From: Mohammed Chelouti <70812484+motato1@users.noreply.github.com> Date: Mon, 11 Jan 2021 21:55:17 +0100 Subject: doc: Add documentation for Deno --- test/command_callback/test_typescript_deno_lsp.vader | 1 - 1 file changed, 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_typescript_deno_lsp.vader b/test/command_callback/test_typescript_deno_lsp.vader index b6e4db0e..01cbc851 100644 --- a/test/command_callback/test_typescript_deno_lsp.vader +++ b/test/command_callback/test_typescript_deno_lsp.vader @@ -54,7 +54,6 @@ Execute(Should use user-specified project root): \ 'unstable': v:false \} - Execute(Check Deno LSP command): AssertLinter 'deno', [ \ ale#Escape('deno') . ' lsp', -- cgit v1.2.3 From 5a47d878fbb837af4c89ab545f473f8526bd4d64 Mon Sep 17 00:00:00 2001 From: tatsuya Date: Sun, 13 Dec 2020 17:06:23 +0900 Subject: add spectral linter for yaml ci --- .../spectral_paths/node_modules/.bin/spectral | 0 test/command_callback/spectral_paths/openapi.yaml | 0 .../test_spectral_command_callback.vader | 31 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 test/command_callback/spectral_paths/node_modules/.bin/spectral create mode 100644 test/command_callback/spectral_paths/openapi.yaml create mode 100644 test/command_callback/test_spectral_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/spectral_paths/node_modules/.bin/spectral b/test/command_callback/spectral_paths/node_modules/.bin/spectral new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/spectral_paths/openapi.yaml b/test/command_callback/spectral_paths/openapi.yaml new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/test_spectral_command_callback.vader b/test/command_callback/test_spectral_command_callback.vader new file mode 100644 index 00000000..ed3795b9 --- /dev/null +++ b/test/command_callback/test_spectral_command_callback.vader @@ -0,0 +1,31 @@ +Before: + call ale#assert#SetUpLinterTest('yaml', 'spectral') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The yaml spectral command callback should return the correct default string): + AssertLinter 'spectral', ale#Escape('spectral') . ' lint --ignore-unknown-format -q -f text %t' + +Execute(The yaml spectral command callback should be configurable): + let g:ale_yaml_spectral_executable = '~/.local/bin/spectral' + + AssertLinter '~/.local/bin/spectral', + \ ale#Escape('~/.local/bin/spectral') + \ . ' lint --ignore-unknown-format -q -f text %t' + +Execute(The yaml spectral command callback should allow a global installation to be used): + let g:ale_yaml_spectral_executable = '/usr/local/bin/spectral' + let g:ale_yaml_spectral_use_global = 1 + + AssertLinter '/usr/local/bin/spectral', + \ ale#Escape('/usr/local/bin/spectral') + \ . ' lint --ignore-unknown-format -q -f text %t' + +Execute(The yaml spectral command callback should allow a local installation to be used): + call ale#test#SetFilename('spectral_paths/openapi.yaml') + + AssertLinter + \ ale#path#Simplify(g:dir . '/spectral_paths/node_modules/.bin/spectral'), + \ ale#Escape(ale#path#Simplify(g:dir . '/spectral_paths/node_modules/.bin/spectral')) + \ . ' lint --ignore-unknown-format -q -f text %t' -- cgit v1.2.3