Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ale_linters/elixir/expert.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
" Author: Paul Monson <[email protected]>
" Description: Expert integration (https://github.com/elixir-lang/expert)

call ale#Set('elixir_expert_executable', 'expert')

call ale#linter#Define('elixir', {
\ 'name': 'expert',
\ 'lsp': 'stdio',
\ 'executable': {b -> ale#Var(b, 'elixir_expert_executable')},
\ 'command': '%e',
\ 'project_root': function('ale#handlers#elixir#FindMixUmbrellaRoot'),
\})
22 changes: 21 additions & 1 deletion doc/ale-elixir.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,28 @@ g:ale_elixir_lexical_release

For example, set release to: `/home/projects/lexical/_build/dev/rel/lexical`

There are currnetly no configuration options for lexical.
There are currently no configuration options for lexical.


===============================================================================
expert *ale-elixir-expert*

Expert (https://github.com/elixir-lang/expert)

*ale-options.elixir_expert_executable*
*g:ale_elixir_expert_executable*
*b:ale_elixir_expert_executable*
elixir_expert_executable
g:ale_elixir_expert_executable
Type: |String|
Default: `/usr/bin/elixir-expert`

Location of the expert executable.

For example, set release to:
`/home/projects/expert/apps/expert/burrito_out/expert_linux_amd64`

There are currently no configuration options for expert.

===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
1 change: 1 addition & 0 deletions doc/ale-supported-languages-and-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ Notes:
* `dialyxir`
* `dogma`!!
* `elixir-ls`
* `expert`
* `lexical`
* `mix`!!
* Elm
Expand Down
1 change: 1 addition & 0 deletions doc/ale.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3490,6 +3490,7 @@ documented in additional help files.
credo.................................|ale-elixir-credo|
cspell................................|ale-elixir-cspell|
lexical...............................|ale-elixir-lexical|
expert................................|ale-elixir-expert|
elm.....................................|ale-elm-options|
elm-format............................|ale-elm-elm-format|
elm-ls................................|ale-elm-elm-ls|
Expand Down
1 change: 1 addition & 0 deletions supported-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ formatting.
* [dialyxir](https://github.com/jeremyjh/dialyxir)
* [dogma](https://github.com/lpil/dogma) :floppy_disk:
* [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning: :speech_balloon:
* [expert](https://github.com/elixir-lang/expert) :warning: :speech_balloon:
* [lexical](https://github.com/lexical-lsp/lexical) :warning: :speech_balloon:
* [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk:
* Elm
Expand Down
20 changes: 20 additions & 0 deletions test/linter/test_elixir_expert.vader
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Before:
call ale#assert#SetUpLinterTest('elixir', 'expert')

After:
call ale#assert#TearDownLinterTest()

Execute(should set correct defaults):
AssertLinter 'expert', ale#Escape('expert')

Execute(The executable should be configurable):
let b:ale_elixir_expert_executable = 'foobar'

AssertLinter 'foobar', ale#Escape('foobar')

Execute(should set correct LSP values):
call ale#test#SetFilename('../test-files/elixir/umbrella_project/apps/app1/lib/app.ex')

AssertLSPLanguage 'elixir'
AssertLSPOptions {}
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/elixir/umbrella_project')