File tree 6 files changed +106
-4
lines changed
6 files changed +106
-4
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,10 @@ jobs:
307
307
rustup default stable
308
308
rustup component add rustfmt
309
309
- name : Run
310
- run : cargo fmt --all -- --check
310
+ run : ci/scripts/rust_fmt.sh
311
+ env :
312
+ CARGO_HOME : " /github/home/.cargo"
313
+ CARGO_TARGET_DIR : " /github/home/target"
311
314
312
315
clippy :
313
316
name : Clippy
@@ -347,8 +350,7 @@ jobs:
347
350
run : |
348
351
rustup component add clippy
349
352
- name : Run clippy
350
- run : |
351
- cargo clippy --all-targets --workspace -- -D warnings
353
+ run : ci/scripts/rust_clippy.sh
352
354
env :
353
355
CARGO_HOME : " /github/home/.cargo"
354
356
CARGO_TARGET_DIR : " /github/home/target"
@@ -479,7 +481,7 @@ jobs:
479
481
# check which Cargo.toml introduces formatting violation
480
482
#
481
483
# ignore ./Cargo.toml because putting workspaces in multi-line lists make it easy to read
482
- find . -mindepth 2 -name 'Cargo.toml' -exec cargo tomlfmt -p {} \;
484
+ ci/scripts/rust_toml_fmt.sh
483
485
git diff --exit-code
484
486
env :
485
487
CARGO_HOME : " /github/home/.cargo"
Original file line number Diff line number Diff line change @@ -53,6 +53,16 @@ Testing setup:
53
53
- ` git submodule init `
54
54
- ` git submodule update `
55
55
56
+ Formatting instructions:
57
+
58
+ - [ ci/scripts/rust_fmt.sh] ( ci/scripts/rust_fmt.sh )
59
+ - [ ci/scripts/rust_clippy.sh] ( ci/scripts/rust_clippy.sh )
60
+ - [ ci/scripts/rust_toml_fmt.sh] ( ci/scripts/rust_toml_fmt.sh )
61
+
62
+ or run them all at once:
63
+
64
+ - [ dev/rust_lint.sh] ( dev/rust_lint.sh )
65
+
56
66
## Test Organization
57
67
58
68
DataFusion has several levels of tests in its [ Test
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ set -ex
21
+ cargo clippy --all-targets --workspace -- -D warnings
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ set -ex
21
+ cargo fmt --all -- --check
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ #
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ set -ex
21
+ find . -mindepth 2 -name ' Cargo.toml' -exec cargo tomlfmt -p {} \;
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ set -e
20
+ if ! command -v cargo-tomlfmt & > /dev/null; then
21
+ echo " Installing cargo-tomlfmt using cargo"
22
+ cargo install cargo-tomlfmt
23
+ fi
24
+
25
+ ci/scripts/rust_fmt.sh
26
+ ci/scripts/rust_clippy.sh
27
+ ci/scripts/rust_toml_fmt.sh
You can’t perform that action at this time.
0 commit comments