summaryrefslogtreecommitdiff
path: root/ale_linters/elixir
AgeCommit message (Collapse)Author
2021-11-19Add cspell Linter (#3981)David Houston
* Add cspell linter Add cspell linter, with the languages it supports. Signed-off-by: David Houston <houstdav000@gmail.com> * Add cspell Global Variables Documentation Add documentation to /doc/ale.txt with cspell configuration options. Signed-off-by: David Houston <houstdav000@gmail.com> * Add cspell to docs, Minor Cleanup Add cspell for each supported language, adding some spaces and removing others when caught navigating the file. Signed-off-by: David Houston <houstdav000@gmail.com>
2021-03-01Close #2281 - Separate cwd commands from commandsw0rp
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.
2020-11-23refactor: Move test to the right fileGonzalo Quero
2020-11-23feat: Add optional configuration file for CredoGonzalo Quero
2019-09-07credo now recognizes umbrella projectsKamil Grzywacz
Use ale#handlers#elixir#FindMixUmbrellaRoot to determine project root instead of ale#handlers#elixir#FindMixProjectRoot
2019-04-07#2132 - Implement feature tests with ale#Hasw0rp
2019-03-11make options for credo configurable (#2337)Adam Trepanier
* Add credo --strict option If a user sets 'let g:ale_elixir_credo_strict=1' it will run credo with --strict instead of suggest. The default (0) is to run as suggest. * Added credo docs
2019-02-22#2132 - Replace all uses of foo_callback with foow0rp
2019-01-26#2132 Unify temporary file management in command.vimw0rp
2018-11-04elixir-ls now recognizes umbrella projectsJon Parise
Previously, elixir-ls would treat each sub-project within an umbrella as standalone, which isn't desirable from a language server perspective. Added ale#handlers#elixir#FindMixUmbrellaRoot, which locates the current project's root and then continues searching upwards for a potential umbrella project root. This literally looks just two levels up to keep things simple while keeping in line with Elixir project conventions. Use this new function to determine elixir-ls's LSP project root.
2018-10-31Add configuration dictionary support to elixir-lsJon Parise
This adds generic configuration dictionary support to the elixir-ls linter. This is useful for disabling its built-in Dialyzer support, for example, which can improve startup time. The configuration dictionary is a little verbose. I considered reducing the user configuration to only the nested settings dictionary (and having the linter implementation wrap it in the top-level `elixirLS` dictionary), but leaving it fully configurable simplifies the code and removes any assumptions about current or future ElixirLS behavior.
2018-10-11Add elixir-ls language server supportJon Parise
ElixirLS (https://github.com/JakeBecker/elixir-ls) is an LSP server for Elixir. It's distributed as a release package that can be downloaded from https://github.com/JakeBecker/elixir-ls/releases or built locally. The easiest way to start it is via Unix- and Win32-specific helper scripts, so that's the basis of this command integration. Alternatively, we could implement the contents of those platform-specific scripts in the linter's command callback in a language-neutral way, but there isn't any benefit to doing that aside from eliminating the platform check, and that could prove to be too tight of a coupling going forward.
2018-10-11Fix Credo message types (#1963)Filip Vavera
* Add more Credo message types * Add tests
2018-10-10FIX: use mix from the project root directory (#1954)Matteo Centenaro
* FIX: use mix from the project root directory * Move find root project function to autoloaded handlers * add tests for #ale#handlers#elixr#FindMixProjectRoot
2018-09-04Improve ALE project style checkingw0rp
* 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-07-23Fix autoload for phoenixsharils
When dializer isn't a dependency, mix dialyzer recompiles the whole project because it's not possible to know if this command dialyzer exist or not until recompilation is done. Then the timestamps of the project is messed up which results in broken hot-loading. In this case, mix help dialyzer would return zero which prevents compilation of the whole project since dialyzer isn't installed, it's help manual doesn't exist. When dialyzer is a dependency, mix dialyzer would just run the command. In this case, mix help dialyzer would return 1 which allows mix dialyzer to run.
2018-06-20Remove redundant spaces.w0rp
2018-06-07WIP cd to project pathColby Dehart
2018-06-07added test for command callbackColby Dehart
2018-06-02handled temp file and env variable correctly; added testsColby Dehart
2018-06-01added mix build path env var to the mix compileColby Dehart
2018-05-30Add mix linter for elixirMagnus Ottenklinger
2018-01-22Add Elixir linter for dialyxir (#1257)Fran Casas
* Add Elixir linter for dialyxir * Update doc/ale.txt with dialyxir * Keep elixir tools alphabetically ordered in README * Add a missing entry for dialyxir to the main documentation file.
2018-01-10Work around hot-reloading issuesharils
See https://github.com/phoenixframework/phoenix/issues/1165 for more detail
2017-08-08Ban use of ==# or ==? in the codebase, and prefer is# or is? insteadw0rp
2017-04-18Add a function for getting matches, and use it to simplify a lot of codew0rp
2017-04-15Make code more consistentw0rp
2017-03-30Remove 'col' from linters where it is hardcoded to 1 (#434)Adriaan Zonnenberg
* Remove 'col' from linters where it is hardcoded to 1 When 'col' is 1, the first column will get highlighted for no reason. It should be 0 (which is the default). In the scalac linter there was also a check about the outcome of `stridx`. It would set l:col to 0 if it was -1, and then it uses `'col': l:col + 1` to convert the outcome of `stridx` to the actual column number. This will make 'col' equals 1 when there is no match. We can remove the check because `-1 + 1 = 0`. * Remove outdated comments about vcol vcol was added as a default, and the loclists that follow these comments do not contain 'vcol' anymore
2017-03-27Use the same formatting as other files for the dogma linter file, and cover ↵w0rp
the Handler function with tests
2017-03-23Add the dogma checker.Blaž Hrastnik
2017-02-26Copy all loclist items returned from handlers, and set up defaults for ↵w0rp
convenience
2017-02-22Fix Credo's line-matching pattern (#360)Jon Parise
* Fix Credo's line-matching pattern In d3e7d3d5, the line matching pattern was changed to handle filenames other than `stdin`. Unfortunately, this broke the pattern's ability to reliably extract both line and column numbers because the latter is an optional match and the filename portion was very greedy. This resulted in line numbers being discarded (treated as part of the filename) and column numbers being interpreted as line numbers. This change simplifies the pattern to only anchor on the line's suffix, ignoring the filename portion entirely. Alternatively, we could use vim's `\f` ("file name characters") class, but that could still run into problems when `:`'s naturally appear in the filename. * Add a Vader test case for the Credo handler
2017-02-09Pass the buffer's filename to CredoJon Parise
By default, Credo attributes input from STDIN as though it came from a file named `stdin`. This change passes the buffer's filename, too, so that Credo can use that information when applying its configuration. This is a nice improvement because files like `mix.exs` are normally excluded from Credo-based linting. Previously, ALE would show lint warnings for those files as they were edited. Now, they are correctly honor the Credo configuration and don't produce lint output.
2017-01-30Dockerfile linting via hadolint (#282)Łukasz Jan Niemier
* Add hadolint linter for Dockerfiles * Fix path * Fix typo * Update docs
2017-01-22Add a script for custom checks to enforce using the abort flag for functions ↵w0rp
and trailing whitespace, and fix existing issues.
2016-10-21Add support for dot-seperate linters, improve linter testsBjorn Neergaard
This PR first and formost implements support for dot-seperate filetypes, a very trivial change. This closes #132 But more importantly, this PR vastly improves the test quality for `ale#linter#Get`. It enables us to reset the state of ale's internal linter cache, to facilitate better testing, as well as making use of mocked linters instead of depending on linters on disk (which may change). In addition, a dummy linter is defined to test the autoloading behavior. Header guards were removed from all linters as: * A: ale won't try and load linters if they already exist in memory * B: we can't reset state for testing if they can't be loaded again
2016-10-16Add linters for Elixir (#113)Łukasz Jan Niemier
* Add Credo linter for Elixir * Add requested changes TODO: check if all message types are covered in `if` chain. * Add information about Credo linter to README * Add information about Credo linter to doc