8 releases
0.0.9 | Oct 14, 2021 |
---|---|
0.0.8 | Mar 22, 2021 |
0.0.7 | Feb 16, 2021 |
0.0.5 | Jan 28, 2021 |
0.0.2 | Sep 14, 2020 |
#114 in Cargo plugins
150 downloads per month
77KB
2K
SLoC
cargo-limit
Cargo with less noise:
- errors have highest priority
- they never appear in the middle of warnings
- warnings are skipped by default until errors are fixed
- all dependencies' warnings are skipped by default
- all messages come in reversed order by default
- to avoid extra scrolling
- messages are grouped by filenames
- number of messages can be limited
- after encountering first error the rest of build time is limited by default
- files can be automatically opened in your text editor on affected lines
This tool is especially useful in combination with cargo-watch.
Installation
From crates.io
cargo install cargo-limit
From git
cargo install --force --git https://github.com/alopatindev/cargo-limit
Usage
Run any of these in your project directory:
cargo lbench
cargo lbuild
cargo lcheck
cargo lclippy
cargo ldoc
cargo lfix
cargo lrun
cargo lrustc
cargo lrustdoc
cargo ltest
Also llcheck
, llrun
, etc.
Neovim and other text editors/IDEs integration
See here.
Environment variables
CARGO_MSG_LIMIT
- limit compiler messages number
0
means no limit, which is default
CARGO_TIME_LIMIT
cargo
execution time limit in seconds after encountering first compiling error1
is default0
means no limit
CARGO_ASC
- show compiler messages in ascending order
false
is default
CARGO_FORCE_WARN
- show warnings even if errors still exist
false
is default
CARGO_DEPS_WARN
- show path dependencies' warnings
false
is default
CARGO_EDITOR
- opens affected files in external app
- empty (
""
) means don't run external app "_cargo-limit-open-in-nvim"
is default
Why "limit"?
Initially it was just a workaround for this issue.
License
MIT/Apache-2.0
Dependencies
~2–3MB
~62K SLoC