Commit Graph

26 Commits

Author SHA1 Message Date
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