Better Rust/Cargo support for Flycheck
Emacs Lisp
Latest commit f8ae845 Oct 19, 2016 @fmdkdd fmdkdd Demote errors in `flycheck-rust-setup`
As discussed in [1], raising errors in `flycheck-rust-setup` in
combination with `global-flycheck-mode` will leave Emacs in an unusable
state.

The previous commit added a guard for catching errors when the cargo
executable wasn't found, but other errors could still happen (wrong
argument types, or through `json-read`).

To make sure no errors are raised, this commit wraps the body of
`flycheck-rust-setup` in `with-demoted-errors`.

[1]: #40 (comment)
Permalink
Failed to load latest commit information.
.gitignore
COPYING Initial commit Aug 13, 2014
Cask Initial commit Aug 13, 2014
README.md Add note about running cargo build Jun 9, 2015
flycheck-rust.el Demote errors in `flycheck-rust-setup` Oct 19, 2016

README.md

flycheck-rust — Flycheck for Rust

License GPL 3

Configure Flycheck for Rust.

  • Setup Flycheck to follow the Cargo project layout.

Installation

As usual, from MELPA or MELPA Stable.

In your Cask file:

(source gnu)
(source melpa)

(depends-on "flycheck-rust")

In your init.el:

(add-hook 'flycheck-mode-hook #'flycheck-rust-setup)

Usage

Just use Flycheck as usual in your Rust/Cargo projects.

Note: You must run cargo build initially to install all dependencies. If you add new dependencies to Cargo.toml you need to run cargo build again. Otherwise you will see spurious errors about missing crates.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

See COPYING for details.