Comments (3)
Because rust_syntax_checking_include_tests
is set to true, the plugin is hard-coded to use --profile=test
which will override your --release
setting. This is a limitation of cargo, and not something we can work around.
I'm curious why you are using release mode for clippy? There shouldn't be any significant differences between that and the dev profile.
from rust-enhanced.
Ah, this is my first time "debugging" a sublime package, but I was able to print out how Rust Enhanced is invoking cargo:
$ cargo clippy --lib --release --message-format=json --profile=test
warning: the `--release` flag should not be specified with the `--profile` flag
The `--release` flag will be ignored.
This was historically accepted, but will become an error in a future release.
@ehuss you beat me to it :)
I'm curious why you are using release mode for clippy?
I change pretty often between the terminal and sublime text, running cargo clippy
and cargo run
in both.
For some projects which have a hefty build step, I'd like to re-use all the cached compilation artifacts in one profile instead of dancing between two of them.
Indeed setting rust_syntax_checking_include_tests
to false
returns the behavior to what I would expect.
Thanks for the quick response!
from rust-enhanced.
For anyone following along, I worked around this by using the following RustEnhanced.sublime-settings
:
{
"rust_syntax_checking_method": "clippy",
// Set this to false or else it will run cargo without --release
"rust_syntax_checking_include_tests": false,
"cargo_build":
{
"defaults":
{
"release": true,
},
"variants":
{
"clippy":
{
"extra_cargo_args": "--all-targets",
"extra_run_args": "-D warnings",
},
},
},
}
The --all-targets
flag will also run clippy on your tests. The -D warning
just denies warnings, not necessary for a workaround but figured I'd post my settings in full.
from rust-enhanced.
Related Issues (20)
- Running check on `build.rs` outputs failure message.
- 'Accept replacement' doesn't work when "rust_region_style" set to "none" HOT 1
- build output with no colors
- Error are not highlighted in-code HOT 4
- Is there a way to style the type annotations?
- newlines in `impl` definition break syntax highlighting HOT 2
- Control codes displayed in the output
- Possible to use non-Rust syntax highlighter in a macro (like a nested syntax)?
- Rust enhanced freezes sublime text on save
- Enum variants with only a single uppercase letter and digits have "constant" scope applied
- Field attributes do not have any attribute-related scopes
- Path-qualified macros do not have any macro-related scopes
- "FileNotFoundError: [Errno 2] No such file or directory: 'cargo'" HOT 2
- [Feature request] Hide panel every after checks
- Syntax highlighting bug - inside attributes, using macros and then brackets in strings breaks the highlighting
- Broken Home/End behavior on Windows with Unix line endings
- Feature Request: Additional format specs
- Import suggestion breaks code with `#[cfg]` HOT 1
- Diagnostics incorrectly indicate a macro invocation when there's none
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-enhanced.