mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-13 00:27:21 +03:00
rubocop: add Chinese translation
This commit is contained in:
parent
1eeb988e0b
commit
e61a5550a0
31
pages.zh/osx/rubocop.md
Normal file
31
pages.zh/osx/rubocop.md
Normal file
@ -0,0 +1,31 @@
|
||||
# rubocop
|
||||
|
||||
> 格式化 Ruby 文件.
|
||||
|
||||
- 检查当前目录中的所有文件(包括子目录):
|
||||
|
||||
`rubocop`
|
||||
|
||||
- 检查一个或多个指定文件或目录:
|
||||
|
||||
`rubocop {{目录/文件名}} {{目录/}}`
|
||||
|
||||
- 将输出写入指定文件:
|
||||
|
||||
`rubocop --out {{目录/文件名}}`
|
||||
|
||||
- 查看规则列表(格式化规则):
|
||||
|
||||
`rubocop --show-cops`
|
||||
|
||||
- 排除格式规则:
|
||||
|
||||
`rubocop --except {{规则1}} {{规则2}}`
|
||||
|
||||
- 只运行指定的规则:
|
||||
|
||||
`rubocop --only {{规则1}} {{规则2}}`
|
||||
|
||||
- 自动更正文件(实验):
|
||||
|
||||
`rubocop --auto-correct`
|
Loading…
Reference in New Issue
Block a user