Lints files in tmp or not at all
kornelski opened this issue · 7 comments
The following file saved in a subdir of my home directory on OS X:
const FOO: &'static [u8] = include_bytes!("foo");
shows a lint error that /var/folders/…/SublimeLinter3-user/foo
can't be found. The file foo
exists in my project's directory, but not in tmp.
Files that have mod
declarations can't find the modules either.
If I enable use-crate-root
:
"linters": {
"rust": {
"use-crate-root": true
…
"paths": {
"linux": [],
"osx": ["/Users/me/.cargo/bin","/usr/bin","/usr/local/bin"],
then I get no lint errors at all. Enabling use-cargo
also seems to completely disable/break linting as well.
I see no errors in the Sublime's console.
Could you make the linter lint the files in their directory, rather than tmp? Could you print problems with cargo/paths/config to sublime console or show them as lint errors, so that I can diagnose why it's not working for me?
Thank you
I've found there's a debug mode, and in Sublime console I see:
SublimeLinter: rust output:
error: no such subcommandDid you mean
clean
?
Is this still an issue? It sounds like this was fixed in cargo.
Cargo has improved the error message. Now Sublime log shows more informative error:
SublimeLinter: rust output:
error: no such subcommand:check
I've ran cargo install cargo-check
and now it runs the check, but doesn't display errors in sublime UI, other than in the console. I have rustc 1.13.0-nightly (f1f40f850 2016-09-09), so maybe it has a new error format that isn't supported yet?
Weird. Are you sure use-cargo-check
is not enabled?
Yeah, the new error format is not supported yet. See #26. I'll probably move to the JSON output that is supported now.
I've had use-cargo-check
enabled. I've missed the documentation bit that it requires another package, sorry.