Skip to content

Commit 8c955d6

Browse files
authored
[CodeStyle] Clean trailing whitespace in tool shell scripts (part4) (#64866)
1 parent d3309f6 commit 8c955d6

17 files changed

+59
-59
lines changed

tools/check_added_ut.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,7 +32,7 @@ if [[ "$SYSTEM" == "Linux" ]] || [[ "$SYSTEM" == "Darwin" ]];then
3232
cp $PADDLE_ROOT/paddle/scripts/paddle_build.sh $PADDLE_ROOT/paddle/scripts/paddle_build_pre.sh
3333
elif [[ "$SYSTEM" == "Windows_NT" ]];then
3434
git remote | grep upstream
35-
if [ $? != 0 ]; then
35+
if [ $? != 0 ]; then
3636
git remote add upstream https://github.com/PaddlePaddle/Paddle.git
3737
fi
3838
git fetch upstream ${BRANCH}

tools/check_sequence_op.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

tools/ci_op_benchmark.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -333,6 +333,6 @@ fi
333333
case $1 in
334334
run_op_benchmark)
335335
prepare_env
336-
gpu_op_benchmark
336+
gpu_op_benchmark
337337
;;
338338
esac

tools/document_preview.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,7 +45,7 @@ function get_docs_pr_num_from_paddle_pr_info(){
4545
}
4646

4747
# Attention:
48-
# 1. /FluidDoc will be used as the workspace of PaddlePaddle/docs.
48+
# 1. /FluidDoc will be used as the workspace of PaddlePaddle/docs.
4949
# 2. And /docs is used as the output of doc-build process.
5050
# 3. If conflicted with yours, please modify the definition of FLUIDDOCDIR and
5151
# OUTPUTDIR in the subsequent codes.

tools/enforce/count_enforce_by_dir.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# limitations under the License.
1616

1717
# This script is used to count detail PADDLE checks in the paddle/fluid directory,
18-
# contains the number of PADDLE checks under each folder, the statistical data
18+
# contains the number of PADDLE checks under each folder, the statistical data
1919
# does not include subdirectories, only covers all files under the current directory.
20-
#
21-
# The three columns of data are: total number, valid number, invalid number.
20+
#
21+
# The three columns of data are: total number, valid number, invalid number.
2222
# The output format is easy to display as a markdown table.
2323

2424
# Usage: bash count_enforce_by_dir.sh (run in tools directory)
@@ -70,8 +70,8 @@ function count_dir_independently(){
7070
enforce_count $1"/"$file dir_total_check_cnt dir_valid_check_cnt
7171
sub_dir_total_check_cnt=$(($sub_dir_total_check_cnt+$dir_total_check_cnt))
7272
sub_dir_valid_check_cnt=$(($sub_dir_valid_check_cnt+$dir_valid_check_cnt))
73-
74-
count_dir_independently $1"/"$file $dir_total_check_cnt $dir_valid_check_cnt
73+
74+
count_dir_independently $1"/"$file $dir_total_check_cnt $dir_valid_check_cnt
7575
fi
7676
done
7777
total_check_cnt=$(($2-$sub_dir_total_check_cnt))

tools/enforce/count_enforce_by_file.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
# This script is used to count PADDLE checks by files in the paddle/fluid/operators directory,
1818
# contains the number of PADDLE checks under each file.
19-
#
20-
# The three columns of data are: total number, valid number, invalid number.
19+
#
20+
# The three columns of data are: total number, valid number, invalid number.
2121
# The output format is easy to display as a markdown table.
2222

2323
# Usage: bash count_enforce_by_file.sh [target directory or file] (run in tools directory)

tools/externalError/start.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env bash
22

33
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

tools/gen_alias_mapping.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
# Brief:
1818
# This code is used for generating the mapping list of Paddle API alias.
1919
# Only the APIs set with the `DEFINE_ALIAS` flag is enable.
20-
#
20+
#
2121
# Arguments:
2222
# None
23-
#
23+
#
2424
# Usage:
25-
# Go into the `Paddle` folder and just run `./tools/gen_alias_mapping.sh`
25+
# Go into the `Paddle` folder and just run `./tools/gen_alias_mapping.sh`
2626
#
2727
# Returns:
2828
# succ: 0
29-
#
29+
#
3030
# Will also print the mapping list to stdout. The format of each line is as below:
3131
# <real API implement>\t<API recommend>,<API other alias name1>,<API other alias name2>,...
3232

@@ -38,7 +38,7 @@ find ${PADDLE_ROOT}/python/ -name '*.py' \
3838
| grep 'DEFINE_ALIAS' \
3939
| perl -ne '
4040
if (/\/python\/(.*):from (\.*)(\w.*) import (.*?)\s+#DEFINE_ALIAS\s+$/) {
41-
my @arr = split(", ", $4);
41+
my @arr = split(", ", $4);
4242
foreach $i (@arr) {
4343
printf "%s|%s|%s|%d\n", $3, $i, substr($1, 0, -3), length($2);
4444
}
@@ -66,7 +66,7 @@ find ${PADDLE_ROOT}/python/ -name '*.py' \
6666
}
6767
key = key""new;
6868
n2o[key] = val;
69-
}
69+
}
7070
END {
7171
for (new in n2o) {
7272
old = n2o[new] in n2o ? n2o[n2o[new]] : n2o[new];
@@ -78,7 +78,7 @@ find ${PADDLE_ROOT}/python/ -name '*.py' \
7878
{
7979
o2n[$1] = o2n[$1] ? o2n[$1]","$3 : $3;
8080
}
81-
END {
81+
END {
8282
for (i in o2n) {
8383
print i"\t"o2n[i];
8484
}

tools/get_build_time.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

tools/get_cpu_info.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -54,7 +54,7 @@ echo "OS Version : `uname -o`"
5454
echo "Kernel Release Version : `uname -r`"
5555
echo "Kernel Patch Version : `uname -v`"
5656
echo "GCC Version :`gcc --version | head -n 1|awk -F '\\\(GCC\\\)' '{print $2}'`"
57-
if command -v cmake >/dev/null 2>&1; then
57+
if command -v cmake >/dev/null 2>&1; then
5858
cmake_ver=`cmake --version | head -n 1 | awk -F 'version' '{print $2}'`
5959
else
6060
cmake_ver=" Not installed"

0 commit comments

Comments
 (0)