File tree 4 files changed +15
-0
lines changed
4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ matrix:
132
132
133
133
install :
134
134
- if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
135
+ - rustup component add rustfmt
135
136
136
137
script :
137
138
- mkdir -p target/$TARGET;
Original file line number Diff line number Diff line change @@ -728,6 +728,10 @@ affecting any existing installation. Remember to keep those two environment vari
728
728
set when running your compiled ` rustup-init ` or the toolchains it installs, but _ unset_
729
729
when rebuilding ` rustup ` itself.
730
730
731
+ We use ` rustfmt ` to keep our codebase consistently formatted. Please ensure that
732
+ you have correctly formatted your code (most editors will do this automatically
733
+ when saving) or it may not pass the CI tests.
734
+
731
735
Unless you explicitly state otherwise, any contribution intentionally
732
736
submitted for inclusion in the work by you, as defined in the
733
737
Apache-2.0 license, shall be dual licensed as above, without any
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ install:
59
59
# add mingw to PATH if necessary
60
60
- if defined MINGW_DIR set PATH=C:\msys64\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
61
61
62
+ # Add rustfmt support
63
+ - rustup component add rustfmt
64
+
62
65
# set cargo features for MSI if requested (otherwise empty string)
63
66
- set FEATURES=
64
67
- if defined BUILD_MSI set FEATURES=--features msi-installed
@@ -67,6 +70,7 @@ install:
67
70
- where gcc rustc cargo
68
71
- rustc -vV
69
72
- cargo -vV
73
+ - rustfmt -vV
70
74
71
75
build : false
72
76
@@ -76,6 +80,7 @@ test_script:
76
80
- cargo test --release --target %TARGET% %FEATURES%
77
81
- if defined BUILD_MSI pushd src\rustup-win-installer && cargo build --release --target %TARGET% & popd
78
82
- if defined BUILD_MSI pushd src\rustup-win-installer\msi && powershell .\build.ps1 -Target %TARGET% & popd
83
+ - cargo fmt --all -- --check
79
84
80
85
notifications :
81
86
- provider : Webhook
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ echo "toolchain versions\n------------------"
6
6
7
7
rustc -vV
8
8
cargo -vV
9
+ rustfmt -vV
9
10
10
11
cargo build --locked -v --release --target $TARGET --features vendored-openssl
11
12
@@ -14,3 +15,7 @@ if [ -z "$SKIP_TESTS" ]; then
14
15
cargo test --release -p rustup-dist --target $TARGET --features vendored-openssl
15
16
cargo test --release --target $TARGET --features vendored-openssl
16
17
fi
18
+
19
+ # Check the formatting last because test failures are more interesting to have
20
+ # discovered for contributors lacking some platform access for testing beforehand
21
+ cargo fmt --all -- --check
You can’t perform that action at this time.
0 commit comments