File tree Expand file tree Collapse file tree 2 files changed +5
-22
lines changed
crates/rust-analyzer/tests/slow-tests Expand file tree Collapse file tree 2 files changed +5
-22
lines changed Original file line number Diff line number Diff line change 6565 rustup update --no-self-update ${{ env.RUST_CHANNEL }}
6666 rustup component add --toolchain ${{ env.RUST_CHANNEL }} rustfmt rust-src
6767 rustup default ${{ env.RUST_CHANNEL }}
68-
68+ # https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/rust.json
6969 - name : Install Rust Problem Matcher
7070 if : matrix.os == 'ubuntu-latest'
7171 run : echo "::add-matcher::.github/rust.json"
@@ -111,6 +111,10 @@ jobs:
111111 if : matrix.os == 'windows-latest'
112112 run : cargo clippy --all-targets -- -D clippy::disallowed_macros -D clippy::dbg_macro -D clippy::todo -D clippy::print_stdout -D clippy::print_stderr
113113
114+ - name : rustfmt
115+ if : matrix.os == 'ubuntu-latest'
116+ run : cargo fmt -- --check
117+
114118 # Weird targets to catch non-portable code
115119 rust-cross :
116120 if : github.repository == 'rust-lang/rust-analyzer'
Original file line number Diff line number Diff line change @@ -9,27 +9,6 @@ use xshell::Shell;
99#[ cfg( not( feature = "in-rust-tree" ) ) ]
1010use xshell:: cmd;
1111
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-
3312#[ test]
3413fn check_lsp_extensions_docs ( ) {
3514 let sh = & Shell :: new ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments