Commit Graph

47 Commits

Author SHA1 Message Date
Felix Maurer 80dcd648d3
rust-analyzer for non-Cargo projects (#4118)
* rust-analyzer in non-cargo projects

rust-analyzer can also be used in non-cargo projects. This requires a
rust-project.json file in the project root [1].

Make the rust-analyzer linter search for a rust-project.json file if no
Cargo.toml file could be found.

[1]: https://rust-analyzer.github.io/manual.html#non-cargo-based-projects

* Document rust-analyzer without cargo

* Test rust-analyzer with non-cargo projects

Change the other rust tests to match the new directory structure of the
test files.
2022-03-23 10:56:29 +09:00
Horacio Sanson 5b1044e2ad
Fix 4086 - use stable command options for rustc (#4087) 2022-02-20 00:01:06 +09:00
David Houston ea643b97ab
Add cspell Linter (#3981)
* 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-11-19 07:41:05 +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
Ben Linsay ddfc43e774 pass lsp intialization_options to rust-analyzer
fixes #3350
2020-11-18 22:22:16 -05:00
Ben Boeckel 506a8532d0 rust/cargo: add support for a custom target directory
This can avoid having to wait for ALE or ALE being blocked on other
cargo actions within the same crate.
2020-08-13 10:22:33 -04:00
Jon Gjengset 58404b5b83
rust-analyzer server binary changed name 2020-04-09 08:57:02 -04:00
Jon Gjengset 9c797961fa
Make more names match up 2019-10-18 12:01:31 -04:00
Jon Gjengset f5c289dce6
Add support for rust-analyzer
Fixes #2832
2019-10-16 11:34:16 -04:00
Jean Mertz 53b0e6c37d
support all cargo options for build/clippy 2019-06-25 11:22:36 +02:00
Jean Mertz e52388b8b1
support clippy options with -- 2019-06-24 19:47:49 +02:00
robertking df806c511c change default value of ale_rust_rls_toolchain and update documentation 2019-04-11 23:05:59 +08:00
w0rp 3bebcb5d48
#2132 - Replace command_chain and chain_with with ale#command#Run 2019-04-07 14:58:06 +01:00
Nathan Henrie e5746d9a83 Add lsp_config support for rls (#2332)
* Add lsp_config for rls
* Add working config example and test
2019-03-05 09:09:29 +00:00
w0rp 883978ece9
#2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
Linda_pp f57ad883f2 Add support for `cargo clippy` (#2001)
* Add support for `cargo clippy`
* Add tests for cargo-clippy support
* Add an example to doc for how to configure ale_rust_cargo_use_clippy
2018-10-22 09:21:48 +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 a88a6d5285
Merge pull request #1806 from jimenezrick/fix-rustc-linter
Fix #1684: Use the correct flag name in rustc linter
2018-08-12 09:41:36 +01:00
Ricardo Catalinas Jiménez db003a4361 Fix #1684: Use the correct flag name in rustc linter
The rust compiler renamed the option '-Z no-trans' to '-Z no-codegen'.

https://github.com/rust-lang/rust-enhanced/issues/281
2018-08-10 21:50:52 +01:00
w0rp 217284360d
Simplify the code for most linters and tests with closures 2018-08-02 23:44:12 +01:00
w0rp 9ddf1b6a05
Make the language option for LSP linters optional 2018-07-04 13:12:58 +01:00
Dan Aloni d9e139ae23 Rust Cargo linter: Improve workspace support (#1679)
* Rust Cargo linter: Improve workspace support

When using Cargo workspaces [1], there is a 'Cargo.toml' directory in a
top level directory, listing all the crates in the project. If we are
currently editing one of the crates, 'cargo build' should execute in
that directory for that crate's separate `Cargo.toml`, otherwise Cargo
may spend more time possibly rebuilding the entire workspace, and maybe
failing on one of the other crates, instead of succeeding on the current.

[1] https://doc.rust-lang.org/book/second-edition/ch14-03-cargo-workspaces.html
2018-06-27 22:36:02 +01:00
Michał Budzyński e272207114 Allow linting rust tests and examples with cargo 2018-06-04 11:08:49 +02:00
w0rp 6ab3fdc4d0
Close #1521 - Allow the language to be set with simple strings for LSP linters 2018-04-27 22:52:11 +01:00
eyenseo 6c93cded64 Fix rust rls linter toolchain argument
This removes the argument if the specified toolchain is empty.
As far as I can tell there is no +nighly (or similar) option [1] leading to
the termination of the server. But since people needed this option and
have yet to complain about it it stays the default for now.

[1] https://github.com/rust-lang-nursery/rls/blob/master/src/main.rs#L87
2018-04-12 20:42:38 +02:00
Ivan Petkov 2ef45ab745
Teach ALE about cargo features and add some configuration options
* When working on rust/cargo projects of varying sizes, it may be useful
to either build all possible features (i.e. lint all possible
conditionally compiled code), or even turn off other features for a
quicker edit-lint cycle (e.g. for large projects with large build times)
* Added a g:ale_rust_cargo_default_feature_behavior flag for instructing
cargo to not build any features at all (via `--no-default-features`),
building default features (via no extra flags), or building all possible
features (via `--all-features`)
* Also added a g:ale_rust_cargo_include_features flag for including
arbitrary features to be checked by cargo. When coupled with
g:ale_rust_cargo_default_feature_behavior this allows for full
customization of what features are checked and which ones are ignored
2018-01-11 19:24:44 -08:00
w0rp 73f61514c9 Fix #1031 - Make the rust flags configurable 2017-12-19 18:10:29 +00:00
w0rp 63ecc8341d Fix #1202 - Do not use --all-targets by default, because it doesn't work some of the time. 2017-12-07 18:47:01 +00:00
w0rp c07b3b9bfc Fix #1166 - Add an option for the rls toolchain 2017-11-26 18:47:30 +00:00
w0rp d425b8a18a Simplfy semver handling and share the semver version cache across everything 2017-11-09 23:42:54 +00:00
w0rp 7b5108d934 Fix #626 - Automatically use `cargo check` and `cargo check --all-targets` for cargo versions that are new enough 2017-11-05 18:37:44 +00:00
w0rp 0702cb59b7 Fix #1045 - Handle both output streams for Cargo 2017-10-26 10:03:10 +01:00
w0rp d5ae3201a4 Ban !=# and !=? from the codebase 2017-08-11 00:31:42 +01:00
w0rp 09d50ebe31 Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to `rls` 2017-08-02 23:21:30 +01:00
w0rp 2c252c0f12 #517 - Get the Rust language server working in a basic way 2017-07-30 23:34:58 +01:00
w0rp e237add9fd Move path functions to their own file 2017-04-17 23:29:02 +01:00
w0rp e97dada261 #427 Implement buffer variable overrides for all linter options 2017-04-16 01:24:08 +01:00
w0rp 8e71f233da Use the lint_file option so the Cargo linter will only be run against files on disk 2017-03-29 00:34:03 +01:00
Idan Arye 2f40953e03 Make cargo linter lighter: (#408)
- Use `cargo check` instead of `cargo build` when
  `g:ale_rust_cargo_use_check` is truish.
- Use `--frozen` to avoid locking the project.
2017-03-27 12:37:00 +01:00
w0rp c3ebe7bd9e Cover the Rust handler with some tests 2017-02-07 21:17:10 +00:00
w0rp c0ac393297 #256 Attempt to fix Rust linter issues again 2017-02-07 15:19:37 +00:00
w0rp da8408501c #256 Attempt to fix Rust linter issues 2017-02-07 15:15:22 +00:00
notkild 0143eb6a53 Fix rust linting with cargo when multiple targets are present 2017-02-06 09:21:06 +01:00
w0rp d7ed49f849 Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues. 2017-01-22 14:54:57 +00:00
w0rp ea438be5c1 REVERT "Fix some naming conventions and use abort for all Rust functions, and disable the rust linters for now, re #256"
This reverts commit f412b4f96f.

Conflicts:
	doc/ale.txt
2017-01-19 20:21:54 +00:00
w0rp f412b4f96f Fix some naming conventions and use abort for all Rust functions, and disable the rust linters for now, re #256 2017-01-13 09:23:03 +00:00
EinfachToll 9c5f092b4f Add support for Rust using rustc and cargo (#230)
* Add rustc checker for rust files

* Add documentation for rustc

* Use a nice helper function

* Add cargo as linter

* Complete the doc for rust linters

* Put l: in front of every local variable

* Apply the requested stylistic changes
2017-01-12 09:33:55 +00:00