Skip to content
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

feat: add configuration file of vale #1227

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/styles/Vocab/Graviti/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# ---------------> | 正则表达式
[a-zA-z]+://[^\s]*

# ---------------> | 专有名词,公司名
graviti
Graviti
GRAVITI
Neolix
tensorbay
TensorBay
accesskey
AccessKey
pytorch
PyTorch
github
GitHub

keypoint
keypoints
polyline
polylines
dataloader
Dataloader

pythonic


Qingdao
Hangzhou



# ---------------> | CS术语
rst
csv
txt
json

png
jpg

http
Http
https
Https
ip
IP

url
URL
config
Config

autodoc
todo
ctx
cli
CLI



# ---------------> | 第三方包
Zsh
NumPy
pytest
Pytest
xmltodict
pyyaml
mypy
pylint
tqdm
toolbelt
filetype
oss

# ---------------> | 常用变量
trainval

dev
attr
usr
env
enum
tbrn

rf
API
noqa
param
uuid

kwargs
args

boolean



# ---------------> | 其他
sublicense
opendataset
subfolder
abyssinian
subcatalog
unmodify
Makefile
iterable

Empty file.
121 changes: 121 additions & 0 deletions .github/styles/style-p1/ComplexWords.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
extends: substitution
message: "Consider using '%s' instead of '%s'."
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-simple-words-concise-sentences
ignorecase: true
level: suggestion

action:
name: replace
swap:
"approximate(?:ly)?": about
abundance: plenty
accelerate: speed up
accentuate: stress
accompany: go with
accomplish: carry out|do
accorded: given
accordingly: so
accrue: add
accurate: right|exact
acquiesce: agree
acquire: get|buy
additional: more|extra
address: discuss
addressees: you
adjacent to: next to
adjustment: change
admissible: allowed
advantageous: helpful
advise: tell
aggregate: total
aircraft: plane
alleviate: ease
allocate: assign|divide
alternatively: or
alternatives: choices|options
ameliorate: improve
amend: change
anticipate: expect
apparent: clear|plain
ascertain: discover|find out
assistance: help
attain: meet
attempt: try
authorize: allow
belated: late
bestow: give
cease: stop|end
collaborate: work together
commence: begin
compensate: pay
component: part
comprise: form|include
concept: idea
concerning: about
confer: give|award
consequently: so
consolidate: merge
constitutes: forms
contains: has
convene: meet
demonstrate: show|prove
depart: leave
designate: choose
desire: want|wish
determine: decide|find
detrimental: bad|harmful
disclose: share|tell
discontinue: stop
disseminate: send|give
eliminate: end
elucidate: explain
employ: use
enclosed: inside|included
encounter: meet
endeavor: try
enumerate: count
equitable: fair
equivalent: equal
exclusively: only
expedite: hurry
facilitate: ease
females: women
finalize: complete|finish
frequently: often
identical: same
incorrect: wrong
indication: sign
initiate: start|begin
itemized: listed
jeopardize: risk
liaise: work with|partner with
maintain: keep|support
methodology: method
modify: change
monitor: check|watch
multiple: many
necessitate: cause
notify: tell
numerous: many
objective: aim|goal
obligate: bind|compel
optimum: best|most
permit: let
portion: part
possess: own
previous: earlier
previously: before
prioritize: rank
procure: buy
provide: give|offer
purchase: buy
relocate: move
solicit: request
state-of-the-art: latest
subsequent: later|next
substantial: large
sufficient: enough
terminate: end
transmit: send
utilization: use
utilize: use
9 changes: 9 additions & 0 deletions .github/styles/style-p1/DateFormat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: Use 'July 31, 2016' format, not '%s'.
link: https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/date-time-terms
ignorecase: true
level: error

nonword: true
tokens:
- '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}'
31 changes: 31 additions & 0 deletions .github/styles/style-p1/E-Prime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
extends: existence
message: "Try to avoid using '%s'."
ignorecase: true
level: suggestion
tokens:
- am
- are
- aren't
- be
- been
- being
- he's
- here's
- here's
- how's
- i'm
- is
- isn't
- she's
- that's
- there's
- they're
- was
- wasn't
- we're
- were
- weren't
- what's
- where's
- who's
- you're
11 changes: 11 additions & 0 deletions .github/styles/style-p1/Illusions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: repetition
message: "'%s' is repeated!"
level: warning
alpha: true
action:
name: edit
params:
- truncate
- " "
tokens:
- '[^\s]+'
8 changes: 8 additions & 0 deletions .github/styles/style-p1/Ranges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "In most cases, use 'from' or 'through' to describe a range of numbers."
link: 'https://docs.microsoft.com/en-us/style-guide/numbers'
nonword: true
level: warning

tokens:
- '\b\d+\s?[-–]\s?\d+\b'
7 changes: 7 additions & 0 deletions .github/styles/style-p1/SentenceLength.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: occurrence
message: "Try to keep sentences short (< 30 words)."
scope: sentence
level: suggestion
max: 30
token: \b(\w+)\b

5 changes: 5 additions & 0 deletions .github/styles/style-p1/So.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: existence
message: "Don't start a sentence with '%s'."
level: error
raw:
- '(?:[;-]\s)so[\s,]|\bSo[\s,]'
17 changes: 17 additions & 0 deletions .github/styles/style-p1/Spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: consistency
message: "Inconsistent spelling of '%s'."
level: error
ignorecase: true
either:
advisor: adviser
centre: center
colour: color
emphasise: emphasize
finalise: finalize
focussed: focused
labour: labor
learnt: learned
organise: organize
organised: organized
organising: organizing
recognise: recognize
11 changes: 11 additions & 0 deletions .github/styles/style-p1/URLFormat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: substitution
message: "Use '%s' instead of '%s'."
ignorecase: true
level: error

action:
name: replace
swap:
URL for: URL of
an URL: a URL

12 changes: 12 additions & 0 deletions .github/styles/style-p1/We.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: existence
message: "Try to avoid using first-person plural like '%s'."
link: https://docs.microsoft.com/en-us/style-guide/grammar/person#avoid-first-person-plural
level: warning
ignorecase: true

tokens:
- we
- we'(?:ve|re)
- ours?
- us
- let's
Loading