File tree 3 files changed +41
-21
lines changed
crates/rust-analyzer/tests/slow-tests
3 files changed +41
-21
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "problemMatcher" : [
3
+ {
4
+ "owner" : " rustfmt" ,
5
+ "severity" : " warning" ,
6
+ "pattern" : [
7
+ {
8
+ "regexp" : " ^(Diff in (.+)) at line (\\ d+):$" ,
9
+ "message" : 1 ,
10
+ "file" : 2 ,
11
+ "line" : 3
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "owner" : " clippy" ,
17
+ "pattern" : [
18
+ {
19
+ "regexp" : " ^(?:\\ x1b\\ [[\\ d;]+m)*(warning|warn|error)(?:\\ x1b\\ [[\\ d;]+m)*(\\ [(.*)\\ ])?(?:\\ x1b\\ [[\\ d;]+m)*:(?:\\ x1b\\ [[\\ d;]+m)* ([^\\ x1b]*)(?:\\ x1b\\ [[\\ d;]+m)*$" ,
20
+ "severity" : 1 ,
21
+ "message" : 4 ,
22
+ "code" : 3
23
+ },
24
+ {
25
+ "regexp" : " ^(?:\\ x1b\\ [[\\ d;]+m)*\\ s*(?:\\ x1b\\ [[\\ d;]+m)*\\ s*--> (?:\\ x1b\\ [[\\ d;]+m)*(.*):(\\ d*):(\\ d*)(?:\\ x1b\\ [[\\ d;]+m)*$" ,
26
+ "file" : 1 ,
27
+ "line" : 2 ,
28
+ "column" : 3
29
+ }
30
+ ]
31
+ }
32
+ ]
33
+ }
Original file line number Diff line number Diff line change 65
65
rustup update --no-self-update ${{ env.RUST_CHANNEL }}
66
66
rustup component add --toolchain ${{ env.RUST_CHANNEL }} rustfmt rust-src
67
67
rustup default ${{ env.RUST_CHANNEL }}
68
+ # https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json
69
+ - name : Install Rust Problem Matcher
70
+ if : matrix.os == 'ubuntu-latest'
71
+ run : echo "::add-matcher::.github/rust.json"
68
72
69
73
- name : Cache Dependencies
70
74
uses : Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
@@ -107,6 +111,10 @@ jobs:
107
111
if : matrix.os == 'windows-latest'
108
112
run : cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr
109
113
114
+ - name : rustfmt
115
+ if : matrix.os == 'ubuntu-latest'
116
+ run : cargo fmt -- --check
117
+
110
118
# Weird targets to catch non-portable code
111
119
rust-cross :
112
120
if : github.repository == 'rust-lang/rust-analyzer'
Original file line number Diff line number Diff line change @@ -9,27 +9,6 @@ use xshell::Shell;
9
9
#[ cfg( not( feature = "in-rust-tree" ) ) ]
10
10
use xshell:: cmd;
11
11
12
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
13
- #[ test]
14
- fn check_code_formatting ( ) {
15
- let sh = & Shell :: new ( ) . unwrap ( ) ;
16
- sh. change_dir ( sourcegen:: project_root ( ) ) ;
17
-
18
- let out = cmd ! ( sh, "rustup run stable rustfmt --version" ) . read ( ) . unwrap ( ) ;
19
- if !out. contains ( "stable" ) {
20
- panic ! (
21
- "Failed to run rustfmt from toolchain 'stable'. \
22
- Please run `rustup component add rustfmt --toolchain stable` to install it.",
23
- )
24
- }
25
-
26
- let res = cmd ! ( sh, "rustup run stable cargo fmt -- --check" ) . run ( ) ;
27
- if res. is_err ( ) {
28
- let _ = cmd ! ( sh, "rustup run stable cargo fmt" ) . run ( ) ;
29
- }
30
- res. unwrap ( )
31
- }
32
-
33
12
#[ test]
34
13
fn check_lsp_extensions_docs ( ) {
35
14
let sh = & Shell :: new ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments