File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,33 @@ jobs:
109
109
run : sh ./_test/check-exercise-crate.sh
110
110
continue-on-error : ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }}
111
111
112
+ rustformat :
113
+ name : Check Rust Formatting
114
+ runs-on : ubuntu-latest
115
+
116
+ steps :
117
+ - name : Checkout code
118
+ uses : actions/checkout@v2
119
+
120
+ - name : Setup toolchain
121
+ uses : actions-rs/toolchain@v1
122
+ with :
123
+ toolchain : stable
124
+ default : true
125
+
126
+ - name : Rust Format Version
127
+ run : rustfmt --version
128
+
129
+ - name : Format
130
+ run : sh bin/format_exercises
131
+
132
+ - name : Diff
133
+ run : |
134
+ if ! git diff --color --exit-code; then
135
+ echo "Please run cargo fmt, or see the diff above:"
136
+ exit 1
137
+ fi
138
+
112
139
clippy :
113
140
name : Clippy
114
141
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments