-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs][hook] add a pre-commit hook to automatically insert space to cn and en char #4973
Merged
Ligoml
merged 32 commits into
PaddlePaddle:develop
from
cattidea:add-space-between-cn-en-char
Aug 4, 2022
Merged
Changes from 7 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
81bd6fd
replace tab with spaces
SigureMo 992bbf1
CRLF -> LF
SigureMo 7dbb805
trim trailing whitespace
SigureMo 6159bdc
ensure-final-newline and trim-trailing-blank-lines
SigureMo 231f8db
insert-whitespace-between-cn-and-en-char
SigureMo 945102a
fix check_api_cn script to ignore some files not include sample code
SigureMo 91955b1
use COPY-FROM to avoid some ci error
SigureMo e691bb4
make pre-commit also check rst
SigureMo 2c08fd7
remove missing `.. code-block:: python`
SigureMo 73e6dfa
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo b3f848e
update api_white_list.txt
SigureMo ea3151b
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo ac07624
fix the issue caused by upstream
SigureMo 6521aa2
add a pre-commit hook to automatically insert space to cn and en char
SigureMo c3fc4d6
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo 9e2a0bb
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo f48202f
fix style issues from upstream
SigureMo 00f9ea6
bump pre-commit hooks version
SigureMo 4712d79
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo 703bf1c
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo af77994
more COPY-FROM (the file only include one code block)
SigureMo 2cd0bfd
remove redundant labels
SigureMo 7cb6aff
more COPY-FROM (try multiple code example)
SigureMo 9fc8b90
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo effb380
restore HDFSClient changes
SigureMo f942f8a
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo 155cc1d
fix style issues from upstream
SigureMo 4f2d798
use COPY-FROM to avoid ci issue
SigureMo 693fd83
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo af6fe6e
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo 0725e4d
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo d85c64e
Merge branch 'develop' into add-space-between-cn-en-char
SigureMo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原来 CI 中有部分示例代码因为 no sample code 问题而报错,这是因为在这里筛选是否 need check 的文件时仅仅 check 了是否包含
code-block
,然而有些文件是包含一些非可运行的code-block
的,比如code-block:: text
,这些文件之后传入 chinese_samplecode_processor.py 就会报 no sample code 错误因此这里收缩检查条件,仅仅包含
code-block:: python
才进行后续 check目前遇到该问题的文件有以下 8 个,这 8 个文件均不会通过
grep 'code-block:: python' $filename
的检查,也就不会传入后续 checkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改后 CI 不再出现 no sample code 的问题