File tree 2 files changed +5
-22
lines changed
crates/rust-analyzer/tests/slow-tests
2 files changed +5
-22
lines changed 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
-
68
+ # https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json
69
69
- name : Install Rust Problem Matcher
70
70
if : matrix.os == 'ubuntu-latest'
71
71
run : echo "::add-matcher::.github/rust.json"
@@ -111,6 +111,10 @@ jobs:
111
111
if : matrix.os == 'windows-latest'
112
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
113
113
114
+ - name : rustfmt
115
+ if : matrix.os == 'ubuntu-latest'
116
+ run : cargo fmt -- --check
117
+
114
118
# Weird targets to catch non-portable code
115
119
rust-cross :
116
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