Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
28680c65
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
28680c65
编写于
2月 26, 2019
作者:
T
Tao Luo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enable cpplint, remove go_fmt
上级
effec866
变更
5
展开全部
显示空白变更内容
内联
并排
Showing
5 changed file
with
16 addition
and
6436 deletion
+16
-6436
.pre-commit-config.yaml
.pre-commit-config.yaml
+0
-6
paddle/fluid/framework/async_executor.h
paddle/fluid/framework/async_executor.h
+0
-1
paddle/scripts/cpplint.py
paddle/scripts/cpplint.py
+0
-6425
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+1
-0
tools/codestyle/cpplint_pre_commit.hook
tools/codestyle/cpplint_pre_commit.hook
+15
-4
未找到文件。
.pre-commit-config.yaml
浏览文件 @
28680c65
...
...
@@ -42,12 +42,6 @@ repos:
entry
:
bash ./tools/codestyle/pylint_pre_commit.hook
language
:
system
files
:
\.(py)$
-
repo
:
https://github.com/PaddlePaddle/pre-commit-golang
sha
:
8337620115c25ff8333f1b1a493bd031049bd7c0
hooks
:
-
id
:
go-fmt
types
:
-
go
-
repo
:
local
hooks
:
-
id
:
copyright_checker
...
...
paddle/fluid/framework/async_executor.h
浏览文件 @
28680c65
...
...
@@ -20,7 +20,6 @@ limitations under the License. */
#include <mutex> // NOLINT
#include <random> // local_random_engine
#include <set>
#include <string>
#include <thread> // NOLINT
#include <typeinfo>
#include <vector>
...
...
paddle/scripts/cpplint.py
已删除
100644 → 0
浏览文件 @
effec866
此差异已折叠。
点击以展开。
paddle/scripts/paddle_build.sh
浏览文件 @
28680c65
...
...
@@ -259,6 +259,7 @@ function check_style() {
eval
"
$(
GIMME_GO_VERSION
=
1.8.3 gimme
)
"
fi
pip
install
cpplint
# set up go environment for running gometalinter
mkdir
-p
$GOPATH
/src/github.com/PaddlePaddle/
ln
-sf
${
PADDLE_ROOT
}
$GOPATH
/src/github.com/PaddlePaddle/Paddle
...
...
tools/codestyle/cpplint_pre_commit.hook
浏览文件 @
28680c65
#!/bin/bash
TOTAL_ERRORS
=
0
if
[[
!
$TRAVIS_BRANCH
]]
;
then
# install cpplint on local machine.
if
[[
!
$(
which cpplint
)
]]
;
then
pip
install
cpplint
fi
# diff files on local machine.
files
=
$(
git diff
--cached
--name-status
|
awk
'$1 != "D" {print $2}'
)
else
# diff files between PR and latest commit on Travis CI.
branch_ref
=
$(
git rev-parse
"
$TRAVIS_BRANCH
"
)
head_ref
=
$(
git rev-parse HEAD
)
files
=
$(
git diff
--name-status
$branch_ref
$head_ref
|
awk
'$1 != "D" {print $2}'
)
fi
# The trick to remove deleted files: https://stackoverflow.com/a/2413151
for
file
in
$
(
git diff
--cached
--name-status
|
awk
'$1 != "D" {print $2}'
)
;
do
if
[[
$file
=
~ ^
(
pa
ddle/legacy/api/.
*
|paddle/legacy/capi/.
*
|paddle/contrib/.
*
|paddle/legacy/cuda/.
*
|paddle/legacy/function/.
*
|paddle/legacy/gserver/.
*
|paddle/legacy/math/.
*
|paddle/legacy/optimizer/.
*
|paddle/legacy/parameter/.
*
|paddle/legacy/pserver/.
*
|paddle/legacy/trainer/.
*
|paddle/legacy/utils/.
*
|paddle/testing/TestUtil.
*
|pa
tches/grpc/.
*
)
]]
;
then
for
file
in
$
files
;
do
if
[[
$file
=
~ ^
(
patches/grpc/.
*
)
]]
;
then
continue
;
else
cpplint
--filter
=
-readability
/fn_size
$file
;
...
...
@@ -13,4 +25,3 @@ for file in $(git diff --cached --name-status | awk '$1 != "D" {print $2}'); do
done
exit
$TOTAL_ERRORS
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录