Skip to content

Commit 89095c3

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleNLP into develop
2 parents 04c9b39 + ab72ba7 commit 89095c3

53 files changed

Lines changed: 2545 additions & 1403 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.markdownlint.yaml

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
---
2+
# Default state for all rules
3+
default: true
4+
5+
# Path to configuration file to extend
6+
extends: null
7+
8+
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md001.md
9+
MD001: true
10+
11+
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md003.md
12+
MD003:
13+
# Heading style
14+
style: "consistent"
15+
16+
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md004.md
17+
MD004:
18+
# List style
19+
style: "consistent"
20+
21+
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md005.md
22+
MD005: true
23+
24+
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md007.md
25+
MD007:
26+
# Spaces for indent
27+
indent: 2
28+
# Whether to indent the first level of the list
29+
start_indented: false
30+
# Spaces for first level indent (when start_indented is set)
31+
start_indent: 2
32+
33+
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md009.md
34+
MD009:
35+
# Spaces for line break
36+
br_spaces: 2
37+
# Allow spaces for empty lines in list items
38+
list_item_empty_lines: false
39+
# Include unnecessary breaks
40+
strict: false
41+
42+
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md010.md
43+
MD010:
44+
# Include code blocks
45+
code_blocks: true
46+
# Fenced code languages to ignore
47+
ignore_code_languages: []
48+
# Number of spaces for each hard tab
49+
spaces_per_tab: 1
50+
51+
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md011.md
52+
MD011: true
53+
54+
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md012.md
55+
MD012:
56+
# Consecutive blank lines
57+
maximum: 1
58+
59+
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md
60+
MD013: false
61+
62+
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md014.md
63+
MD014: true
64+
65+
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md018.md
66+
MD018: true
67+
68+
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md019.md
69+
MD019: true
70+
71+
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md020.md
72+
MD020: true
73+
74+
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md021.md
75+
MD021: true
76+
77+
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md022.md
78+
MD022:
79+
# Blank lines above heading
80+
lines_above: 1
81+
# Blank lines below heading
82+
lines_below: 1
83+
84+
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md023.md
85+
MD023: true
86+
87+
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md024.md
88+
MD024:
89+
# Only check sibling headings
90+
allow_different_nesting: false
91+
# Only check sibling headings
92+
siblings_only: false
93+
94+
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md025.md
95+
MD025:
96+
# Heading level
97+
level: 1
98+
# RegExp for matching title in front matter
99+
front_matter_title: "^\\s*title\\s*[:=]"
100+
101+
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md026.md
102+
MD026:
103+
# Punctuation characters
104+
punctuation: ".,;:!。,;:!"
105+
106+
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md027.md
107+
MD027: true
108+
109+
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md028.md
110+
MD028: true
111+
112+
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md029.md
113+
MD029:
114+
# List style
115+
style: "one_or_ordered"
116+
117+
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md030.md
118+
MD030:
119+
# Spaces for single-line unordered list items
120+
ul_single: 1
121+
# Spaces for single-line ordered list items
122+
ol_single: 1
123+
# Spaces for multi-line unordered list items
124+
ul_multi: 1
125+
# Spaces for multi-line ordered list items
126+
ol_multi: 1
127+
128+
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md031.md
129+
MD031:
130+
# Include list items
131+
list_items: true
132+
133+
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md032.md
134+
MD032: true
135+
136+
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md
137+
MD033:
138+
# Allowed elements
139+
allowed_elements: [h1,h2,h3,h4,div,img,a,p,font,summary]
140+
141+
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md034.md
142+
MD034: true
143+
144+
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md035.md
145+
MD035:
146+
# Horizontal rule style
147+
style: "consistent"
148+
149+
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md036.md
150+
MD036:
151+
# Punctuation characters
152+
punctuation: ".,;:!?。,;:!?"
153+
154+
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md037.md
155+
MD037: true
156+
157+
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md038.md
158+
MD038: true
159+
160+
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md039.md
161+
MD039: true
162+
163+
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md040.md
164+
MD040:
165+
# List of languages
166+
allowed_languages: []
167+
# Require language only
168+
language_only: false
169+
170+
# MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md041.md
171+
MD041: false
172+
173+
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md042.md
174+
MD042: true
175+
176+
# MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md043.md
177+
MD043: false
178+
179+
# MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md044.md
180+
MD044:
181+
# List of proper names
182+
names: []
183+
# Include code blocks
184+
code_blocks: true
185+
# Include HTML elements
186+
html_elements: true
187+
188+
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md045.md
189+
MD045: false
190+
191+
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md046.md
192+
MD046:
193+
# Block style
194+
style: "consistent"
195+
196+
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md047.md
197+
MD047: true
198+
199+
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md048.md
200+
MD048:
201+
# Code fence style
202+
style: "consistent"
203+
204+
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md049.md
205+
MD049:
206+
# Emphasis style
207+
style: "consistent"
208+
209+
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md050.md
210+
MD050:
211+
# Strong style
212+
style: "consistent"
213+
214+
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md051.md
215+
MD051: true
216+
217+
# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md052.md
218+
MD052:
219+
# Include shortcut syntax
220+
shortcut_syntax: false
221+
222+
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md053.md
223+
MD053:
224+
# Ignored definitions
225+
ignored_definitions:
226+
- "//"
227+
228+
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md054.md
229+
MD054:
230+
# Allow autolinks
231+
autolink: true
232+
# Allow inline links and images
233+
inline: true
234+
# Allow full reference links and images
235+
full: true
236+
# Allow collapsed reference links and images
237+
collapsed: true
238+
# Allow shortcut reference links and images
239+
shortcut: true
240+
# Allow URLs as inline links
241+
url_inline: true

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,16 @@ repos:
4444
entry: python .copyright.hook
4545
language: system
4646
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|xpu|kps|py|sh)$
47+
# For Markdown files
48+
- repo: https://github.com/igorshubovych/markdownlint-cli
49+
rev: v0.41.0
50+
hooks:
51+
- id: markdownlint
52+
- repo: local
53+
hooks:
54+
- id: add-spaces-between-chinese-and-english
55+
name: Add spaces between Chinese and English characters
56+
entry: python scripts/codestyle/check_spaces.py
57+
language: python
58+
files: \.(md|markdown)$
59+
pass_filenames: true

0 commit comments

Comments
 (0)