Commit Graph
12 Commits
Author SHA1 Message Date
Markus Koller 422c0e8ef4 elixir: Fix mix linter and support warnings (#5140)
CI / Build (push) Canceled after 0s
CI / Lint (push) Canceled after 0s
CI / Lua (push) Canceled after 0s
CI / Neovim 0.10 Linux (push) Canceled after 0s
CI / Neovim 0.12 Linux (push) Canceled after 0s
CI / Vim 8.2 Linux (push) Canceled after 0s
CI / Vim 9.2 Linux (push) Canceled after 0s
CI / Neovim 0.10 Windows (push) Canceled after 0s
CI / Neovim 0.12 Windows (push) Canceled after 0s
CI / Vim 8.2 Windows (push) Canceled after 0s
CI / Vim 9.2 Windows (push) Canceled after 0s
* elixir: Don't use temp dir for mix linter

The mix linter sets `MIX_BUILD_PATH` to a temporary directory on every
run, which is very slow and inefficient. We can just use the default
build path to speed this up.

The default directory is `_build` inside the project, this is also
automatically added to `.gitignore` by `mix new` so hopefully shouldn't
cause any unwanted clutter.

The `%s` argument is removed since `mix compile` doesn't actually
support passing a filename.

The output stream is changed to `stderr` since that's where the errors
appear.

Other options:
- `mix compile` has a `--no-compile` flag, but this misses most errors
  including basic syntax errors
- `mix format` has a `--dry-run` flag, but this only catches basic
  syntax errors and misses other errors like undefined functions

Fixes https://github.com/dense-analysis/ale/issues/3816

* elixir: Fix error parsing for mix linter and support warnings

The error parsing stopped working at some point, probably when Elixir
introduced its new error formatting in for 1.16 in 2023.
2026-10-20 17:31:33 +09:00
w0rp 9fe7b1fe6a Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they
can later be swapped out when running linters over projects is
supported, and also better support filename mapping for running linters
on other machines in future.
2021-03-01 20:11:10 +00:00
w0rp 883978ece9 #2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
w0rp cf14d0aa53 #2132 Unify temporary file management in command.vim 2019-01-26 19:33:52 +00:00
Matteo Centenaro bf1ac8e822 FIX: use mix from the project root directory (#1954)
* FIX: use mix from the project root directory
* Move find root project function to autoloaded handlers
* add tests for #ale#handlers#elixr#FindMixProjectRoot
2018-10-10 17:19:47 +01:00
w0rp d476578a40 Improve ALE project style checking
* The project style linter now runs while you type.
* Now the scripts for checking the project require blank lines.
* Many style issues have been found and fixed.
2018-09-04 16:51:18 +01:00
w0rp b8be25adb4 Remove redundant spaces. 2018-06-20 22:44:56 +01:00
Colby Dehart 864818a385 WIP cd to project path 2018-06-07 11:47:57 -05:00
Colby Dehart f0f569f14a added test for command callback 2018-06-07 10:09:08 -05:00
Colby Dehart 81739be0a0 handled temp file and env variable correctly; added tests 2018-06-02 13:03:56 -04:00
Colby Dehart d760558007 added mix build path env var to the mix compile 2018-06-01 11:56:47 -04:00
Magnus Ottenklinger 801c12a881 Add mix linter for elixir 2018-05-30 10:38:14 -04:00