Commit Graph

99 Commits

Author SHA1 Message Date
Lukas Wirth
39e86e78c3 Bump Cargo.lock 2023-03-25 15:12:39 +01:00
Laurențiu Nicola
209cf7dc61 Watch both stdout and stderr in flycheck 2023-03-09 16:58:25 +02:00
Lukas Wirth
47a567b833 Deduplicate source roots that have overlapping include paths 2023-02-28 12:08:23 +01:00
bors
fa874627f0 Auto merge of #13969 - Veykril:workspace.dependencies, r=Veykril
Use workspace.dependencies to declare local dependencies
2023-01-17 10:29:27 +00:00
Lukas Wirth
bed4db3c62 Use workspace.dependencies to declare local dependencies 2023-01-17 10:52:26 +01:00
Lukas Wirth
e4858fe480 Specify authors, edition and license via workspace.package 2023-01-16 16:44:00 +01:00
Lukas Wirth
679df2adf1 Specify rust-version via workspace.package 2023-01-16 16:33:01 +01:00
Niels Sascha Reedijk
8aa1d2d789 Update command-group from 1.0.8 to 2.0.1
With #13552 the depencency of on the command-group crate was introduced, which also
introduced a dependency on nix. That version of nix does not build on Haiku. This
change introduces a newer version of command-group, which also updates nix from
0.22.3 to 0.26.1, which is compatible on Haiku.
2023-01-15 08:20:25 +00:00
Ian Chamberlain
65cf7abbe2
Use experimental capability to enable color codes 2023-01-09 11:50:35 -05:00
Ian Chamberlain
40207906f4
Default to use colored ANSI diagnostics 2023-01-09 11:46:29 -05:00
Daniel Eades
77051679d7 use inline format args 2023-01-02 14:52:32 +00:00
Yuri Astrakhan
d3dbf9c194 Moar linting: needless_borrow, let_unit_value, ...
* There are a few needless borrows that don't seem to be needed. I even did a quick assembly comparison and posted a q to stackoveflow on it. See [here](https://stackoverflow.com/questions/74910196/advantages-of-pass-by-ref-val-with-impl-intoiteratoritem-impl-asrefstr)
* removed several `let _ = ...` when they don't look necessary (even a few ones that were not suggested by clippy (?))
* there were a few `then(|| ctor{})` that clippy suggested to replace with `then_some(ctor{})` -- seems reasonable?
* some unneeded assignment+return - keep the code a bit leaner
* a few `writeln!` instead of `write!`, or even consolidate write!
* a nice optimization to use `ch.is_ascii_digit` instead of `ch.is_digit(10)`
2022-12-25 05:07:47 -05:00
Yuri Astrakhan
e16c76e3c3 Inline all format arguments where possible
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.

The change was automatically created with, so there are far less change
of an accidental typo.

```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Lukas Wirth
c8b6fef70f Properly implement Drop for JodGroupChild 2022-11-24 21:30:15 +01:00
Alexis (Poliorcetics) Bourget
0d4737adb6 feat: Support passing multiple targets to cargo (for Rust 1.64.0+) 2022-11-11 14:36:07 +01:00
Lukas Wirth
ffd7bf8bf9 Bump Cargo rust-version fields to latest stable 2022-11-07 12:59:51 +01:00
Laurențiu Nicola
cff7ab1308 Fix typos 2022-11-07 12:54:12 +02:00
Lukas Wirth
1dcc25a70a internal: Use a process group for flycheck 2022-11-05 16:28:04 +01:00
Lukas Wirth
fbae83acd0 fix: Fix standard flycheck command not being executed in the workspace it is being invoked for 2022-10-24 16:07:42 +02:00
Lukas Wirth
0f8904ec9c Implement invocation location config 2022-10-22 23:33:03 +02:00
Lukas Wirth
46732369f4 Remove simplistic interpolation for manifest-path 2022-10-19 23:53:00 +02:00
Lukas Wirth
7db50294a3 {manifest-path} interpolation 2022-10-19 23:21:34 +02:00
Lukas Wirth
4a287d2525 Implement invocation strategy config for checkOnSave
Note that due to how cargo works, none of the modes currently work for r-a
2022-10-19 23:21:34 +02:00
Laurențiu Nicola
bb6990c4c9 Bump tracing 2022-10-15 12:52:34 +03:00
Laurențiu Nicola
cbce0cda08 Bump anyhow, arbitrary, itertools, semver, serde 2022-10-15 12:52:34 +03:00
Lukas Wirth
5916803555 Prioritize restart messages in flycheck 2022-10-03 14:03:54 +02:00
Daniel Paoliello
c407cc554e Add cargo.extraEnv setting 2022-09-13 11:29:14 -07:00
Lukas Wirth
2abb78d06d Pop an error notification when flycheck can't be restarted 2022-08-22 17:42:33 +02:00
Lukas Wirth
45b7b6a60a Implement lsp extension for cancelling running flychecks 2022-08-19 08:54:53 +02:00
Dezhi Wu
23747419ca fix: a bunch of typos
This PR will fix some typos detected by [typos].

There are also some other typos in the function names, variable names, and file
names, which I leave as they are. I'm more certain that typos in comments
should be fixed.

[typos]: https://github.com/crate-ci/typos
2022-08-17 21:44:58 +08:00
bors
0fe3bcfd35 Auto merge of #12808 - Veykril:check-workspace, r=Veykril
feat: Only flycheck workspace that belongs to saved file

Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038

There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
2022-08-04 12:57:04 +00:00
Amos Wenger
23d25a3094 Enable extra warnings required by rust-lang/rust 2022-07-20 15:00:17 +02:00
Lukas Wirth
25391e6d44 Only clear diagnostics of workspaces who have been flychecked 2022-07-20 11:49:36 +02:00
Lukas Wirth
a63b5d3c84 feat: Only flycheck workspace that belongs to saved file 2022-07-18 20:30:58 +02:00
Laurențiu Nicola
9e7ca80c82 Bump cargo_metadata 2022-07-03 10:09:35 +03:00
Laurențiu Nicola
212f84ab46 Bump crossbeam-channel 2022-07-03 09:56:58 +03:00
Lukas Wirth
ddddca8717 fix: Fix flycheck sending cancel progress with no running process 2022-06-30 22:58:57 +02:00
Lukas Wirth
59799312e2 Send a DidCancel event when restarting flychecks 2022-06-16 15:25:50 +02:00
Lukas Wirth
bc1aa93e7e Polish 2022-06-15 18:35:48 +02:00
Lukas Wirth
6438ef9aa3 internal: Bring back JodChild into flychecking for cancellation 2022-06-13 13:51:10 +02:00
Lukas Wirth
76ae5434fa internal: Bump Dependencies 2022-06-10 17:30:02 +02:00
Lukas Wirth
b23b276310 internal: Show more project building errors to the user 2022-04-14 11:31:01 +02:00
Cadu
84cf6ad091 Using error instead of output.stderr in failure mode. 2022-04-05 11:17:39 -03:00
Cadu
ca9718aa42 Made error output the contents of Cargo's stderr as well. 2022-04-04 19:15:20 -03:00
Cadu
8e5c57f050 wordsmithing. 2022-04-04 19:15:20 -03:00
Cadu
635270d4ad Better error message hinting about cargo clippy 2022-04-04 19:15:20 -03:00
Lukas Wirth
8e91bb7660 minor: Bump dependencies 2022-03-22 17:42:24 +01:00
iDawer
676744be6e Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
Lukas Wirth
3fcbcf4a0e Don't discard flycheck error messages 2021-11-27 18:57:51 +01:00
Wilfred Hughes
f6f6b3a7ad Allow the check command to terminate without output
Cargo will always output something on success:

```
$ cargo check --message-format=json
{"reason":"compiler-artifact", ... snipped ... }
{"reason":"build-finished","success":true}
```

However, rustc does not output anything on success:

```
$ rustc --error-format=json main.rs
$ echo $?
0
```

Restore the behaviour prior to #10517, where an exit code of 0 is
considered good even if nothing is written to stdout.

This enables custom overrideCommand values that use rustc rather than
cargo.
2021-11-12 11:43:20 -08:00