Skip to content

Commit

Permalink
Merge pull request #555 from chaosi-zju/typo
Browse files Browse the repository at this point in the history
add typo check ci action
  • Loading branch information
karmada-bot authored Jan 16, 2024
2 parents 28b2d5e + 8d1b9d5 commit 528731f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Typos Check
on:
push:
pull_request:
jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-22.04
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling with custom config file
uses: crate-ci/typos@master
with:
config: ./typos.toml
8 changes: 8 additions & 0 deletions docs/contributor/contribute-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ Click **Next** and you can see the corresponding changes. If you have changes re

If the previewed page is not what you expected, please check your docs again.

### Typos Check (optional)

You can use [spell checker](https://github.com/crate-ci/typos) to find and correct spelling mistakes after you updated the documents.

To install the spell checker tool, you can refer to [Install](https://github.com/crate-ci/typos?tab=readme-ov-file#install).

Then, just executing `typos . --config ./typos.toml` at the repo root path in your local commandline.

## FAQ

### Versioning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ items: [

如果预览的页面与预期不符,请再次检查文档。

### 拼写检查 (可选)

更新文件后,你可以使用 [拼写检查工具](https://github.com/crate-ci/typos) 查找并纠正拼写错误。

要安装拼写检查工具,可以参考 [安装](https://github.com/crate-ci/typos?tab=readme-ov-file#install)

然后,只需在本地命令行的仓库 root 路径下执行 `typos . --config ./typos.toml`命令。

## FAQ

### 版本控制
Expand Down
13 changes: 13 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is the custom config file used by `typos` command and `crate-ci/typos@master` action to do source code spelling correction.
# Sometimes, what looks like a typo is intentional, like with people's names, acronyms, or localized content.
# To mark a word or an identifier (grouping of words) as valid, add it to this file by declaring itself as the valid spelling.
# See https://github.com/crate-ci/typos/blob/master/docs/reference.md for more info to configure typos.
[files]
extend-exclude = [
"*.svg",
"*.drawio",
]
[default.extend-words]
BA = "BA"
Ded = "Ded"
EDE = "EDE"

0 comments on commit 528731f

Please sign in to comment.