提交 5272642f 编写于 作者: S schinger 提交者: GitHub

Merge pull request #2 from PaddlePaddle/develop

add pre-commit to my fork
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
sha: c25201a00e6b0514370501050cf2a8538ac12270
hooks:
- id: remove-crlf
- repo: https://github.com/reyoung/mirrors-yapf.git
sha: v0.13.2
hooks:
- id: yapf
files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ # Bazel BUILD files follow Python syntax.
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
[style]
based_on_style = pep8
column_limit = 80
language: cpp
cache: ccache
sudo: required
dist: trusty
os:
- linux
env:
- JOB=PRE_COMMIT
addons:
apt:
packages:
- git
- python
- python-pip
- python2.7-dev
before_install:
- pip install virtualenv pre-commit
script:
- travis/precommit.sh
notifications:
email:
on_success: change
on_failure: always
# 深度学习入门
1. [新手入门](fit_a_line/README.md)
1. [个性化推荐](recommender_system/README.md)
1. [识别数字](recognize_digits/README.md)
1. [图像分类](classify_images/README.md)
1. [图像分类](image_classification/README.md)
1. [词向量](word2vec/README.md)
1. [情感分析](understand_sentiment/README.md)
1. [理解单词的语义](label_semantic_roles/README.md)
1. [文本序列标注](label_semantic_roles/README.md)
1. [机器翻译](machine_translation/README.md)
1. [个性化推荐](recommender_system/README.md)
1. [图像自动生成](gan/README.md)
#!/bin/bash
function abort(){
echo "Your commit not fit PaddlePaddle code style" 1>&2
echo "Please use pre-commit scripts to auto-format your code" 1>&2
exit 1
}
trap 'abort' 0
set -e
cd `dirname $0`
cd ..
export PATH=/usr/bin:$PATH
pre-commit install
if ! pre-commit run -a ; then
git diff --exit-code
fi
trap : 0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册