Skip to content

Commit 2737fcb

Browse files
committed
[action] add autocorrect to auto fix
1 parent af63606 commit 2737fcb

29 files changed

+273
-5292
lines changed

.autocorrectrc

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# yaml-language-server: $schema=https://huacnlee.github.io/autocorrect/schema.json
2+
rules:
3+
# Default rules: https://github.com/huacnlee/autocorrect/raw/main/autocorrect/.autocorrectrc.default
4+
spellcheck: 2
5+
# Enable or disable in special context
6+
space-dash: 0
7+
context:
8+
# Enable or disable to format codeblock in Markdown or AsciiDoc etc.
9+
codeblock: 1
10+
textRules:
11+
# Config some special rule for some texts
12+
# For example, if we wants to let "Hello你好" just warning, and "Hi你好" to ignore
13+
# "Hello你好": 2
14+
# "Hi你好": 0
15+
"沪ICP备18008322号": 0
16+
"本题提交次数-1": 0
17+
"众所周知,生存还是死亡,这是个问题": 0
18+
"需要使用Dijkstra的堆优化算法": 0
19+
"桂平路481号": 0
20+
"15号楼6B3室": 0
21+
fileTypes:
22+
# Config the files associations, you config is higher priority than default.
23+
# "rb": ruby
24+
# "Rakefile": ruby
25+
# "*.js": javascript
26+
# ".mdx": markdown
27+
spellcheck:
28+
words:
29+
# Please do not add a general English word (eg. apple, python) here.
30+
# Users can add their special words to their .autocorrectrc file by their need.
31+
- ActiveMQ
32+
- AirPods
33+
- Aliyun
34+
- API
35+
- App Store
36+
- AppKit
37+
- AppStore = App Store
38+
- AWS
39+
- CacheStorage
40+
- CDN
41+
- CentOS
42+
- CloudFront
43+
- CORS
44+
- CPU
45+
- DNS
46+
- Elasticsearch
47+
- ESLint
48+
- Facebook
49+
- GeForce
50+
- GitHub
51+
- Google
52+
- GPU
53+
- H5
54+
- Hadoop
55+
- HBase
56+
- HDFS
57+
- HKEX
58+
- HTML
59+
- HTTP
60+
- HTTPS
61+
- I10n
62+
- I18n
63+
- iMovie
64+
- IndexedDB
65+
- Intel
66+
- iOS
67+
- iPad
68+
- iPadOS
69+
- iPhone
70+
- iTunes
71+
- JavaScript
72+
- jQuery
73+
- JSON
74+
- JWT
75+
- Linux
76+
- LocalStorage
77+
- macOS
78+
- Markdown
79+
- Microsoft
80+
- MongoDB
81+
- Mozilla
82+
- MVC
83+
- MySQL
84+
- Nasdaq
85+
- Netflix
86+
- NodeJS = Node.js
87+
- NoSQL
88+
- NVDIA
89+
- NYSE
90+
- OAuth
91+
- Objective-C
92+
- OLAP
93+
- OSS
94+
- P2P
95+
- PaaS
96+
- RabbitMQ
97+
- Redis
98+
- RESTful
99+
- RSS
100+
- RubyGem
101+
- RubyGems
102+
- SaaS
103+
- Sass
104+
- SDK
105+
- Shopify
106+
- SQL
107+
- SQLite
108+
- SQLServer
109+
- SSL
110+
- Tesla
111+
- TikTok
112+
- tvOS
113+
- TypeScript
114+
- Ubuntu
115+
- UML
116+
- URI
117+
- URL
118+
- VIM
119+
- watchOS
120+
- WebAssembly
121+
- WebKit
122+
- Webpack
123+
- Wi-Fi
124+
- Windows
125+
- WWDC
126+
- Xcode
127+
- XML
128+
- YAML
129+
- YML
130+
- YouTube

.github/workflows/autofix.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
name: autofix.ci # needed to securely identify the workflow
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- "*"
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
autofix:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
name: install pnpm
20+
with:
21+
run_install: false
22+
23+
- name: install node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'pnpm'
28+
29+
- name: install dependencies
30+
run: pnpm install
31+
32+
- name: "Linting: autocorrect"
33+
continue-on-error: true
34+
run: pnpm autocorrect --fix
35+
36+
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef

docs/manual/class/course-enroll.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tags:
4949

5050
![已加入购物车](https://ipic.luogu.com.cn/09x7z.png)
5151

52-
返回选课界面继续选课,重复4-6步骤进行操作
52+
返回选课界面继续选课,重复 4-6 步骤进行操作
5353

5454
### 7.选定全部要购买的课程之后,点击头像旁边的购物车进行结算 {#step-7}
5555

@@ -118,6 +118,6 @@ tags:
118118
> 账号:`8888 8885 9930 0884`
119119
> 开户行:浙江网商银行股份有限公司(浙江-杭州-没有支行)
120120
> 户名:上海洛谷网络科技有限公司
121-
> 联行号: `3233 3100 0001`(注意这个不是账号,一般仅于开户行列表中找不到网商银行时使用)
121+
> 联行号`3233 3100 0001`(注意这个不是账号,一般仅于开户行列表中找不到网商银行时使用)
122122
123123
如果您对网校报名还有任何疑问,可以[联系客服](https://class.luogu.com.cn/service)

docs/manual/class/faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A:洛谷网校使用**洛谷账号**,若未注册洛谷账号,请按照图
1818

1919
## Q:赠品物流信息在哪里查询?{#logistics-info}
2020

21-
A:进入[个人中心](https://class.luogu.com.cn/me#history) 切换到【历史订单】找到相应的订单,订单中的物流信息显示的就是赠品的快递单号,如果为【N/A】 那就是暂未发出或者还没更新单号。
21+
A:进入[个人中心](https://class.luogu.com.cn/me#history) 切换到【历史订单】找到相应的订单,订单中的物流信息显示的就是赠品的快递单号,如果为【N/A】那就是暂未发出或者还没更新单号。
2222

2323
## Q:报名后,课前需要提前准备什么吗?{#system-requirement}
2424

@@ -36,7 +36,7 @@ A:
3636

3737
:::tip
3838

39-
请使用最新版的 Chrome浏览器浏览洛谷网校。建议您将[我的学习中心](https://class.luogu.com.cn/learn)或对应课程详情页加入浏览器的收藏夹内,以便快速进入上课页面。
39+
请使用最新版的 Chrome 浏览器浏览洛谷网校。建议您将[我的学习中心](https://class.luogu.com.cn/learn)或对应课程详情页加入浏览器的收藏夹内,以便快速进入上课页面。
4040

4141
:::
4242
A:洛谷网校的课时上课入口在相应课程包目录内,点击【去上课】即可进入学习界面。

docs/manual/luogu/account/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sidebar_position: 3
2626

2727
新用户的初始动态等级为 0,也就是灰色用户名。用户在洛谷中按照洛谷社区规则使用各项功能,会增加动态等级。如果长时间不使用洛谷或者有违规行为,可能会降级。除非用户有严重违规行为或者在长时间不使用洛谷且未进行实名认证的情况下,一旦用户达到蓝名,则不会掉到灰名。你可以在打卡之后在打卡结果中看到自己用户名的颜色。**在犇犇或者讨论中询问颜色名字和咕值相关的一些问题将被和谐。**
2828

29-
如果用户抄袭题解或非恶意比赛作弊,将降级至棕名及名字旁带有 Cheater 标签,每次查到持续 15 日,并且在 90 日内不得在任何比赛获得排名。 15 日后,变成灰名并清空所有 AC 记录。(即,变为 Unaccepted 100 分状态)。(注:**棕名用户是仅次于封号的最严厉警告,如果发生任何违反洛谷社区规则的事情,直接立刻封禁一年。**
29+
如果用户抄袭题解或非恶意比赛作弊,将降级至棕名及名字旁带有 Cheater 标签,每次查到持续 15 日,并且在 90 日内不得在任何比赛获得排名。15 日后,变成灰名并清空所有 AC 记录。(即,变为 Unaccepted 100 分状态)。(注:**棕名用户是仅次于封号的最严厉警告,如果发生任何违反洛谷社区规则的事情,直接立刻封禁一年。**
3030

3131
动态等级影响洛谷内很多权限,例如创建比赛、团队、提交冷却时间、图床、下载数据等。灰名会有较多的限制。
3232

docs/manual/luogu/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ sidebar_label: 个人专栏文章功能
3737

3838
个人公开:仅在 *个人中心* 内公开展示。
3939

40-
个人隐藏:仅限作者自己查看,会显示在自己的 *个人中心* 内,但不会对访客显示。 访客无法通过 url 访问。
40+
个人隐藏:仅限作者自己查看,会显示在自己的 *个人中心* 内,但不会对访客显示。访客无法通过 url 访问。
4141

4242
已删除:不显示在 *文章管理-回收站* 内,但会保留在数据库内。
4343

docs/manual/luogu/commercial-contest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sidebar_position: 114514
3232
![首页帖子置顶](_image/cc-top-post.png)
3333
- 洛谷部分页面右下方广告位
3434
![右下方广告位](_image/cc-ad-block.png)
35-
- 洛谷科技微信公众号(约1万关注者
35+
- 洛谷科技微信公众号(约 1 万关注者
3636
![洛谷科技微信公众号](_image/cc-wechat-post.png)
3737

3838
向注册用户发送短信(需要没有关闭推送的用户)

docs/manual/luogu/contest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sidebar_position: 6
2929

3030
对于公开赛请务必按照 [公开赛审核要求](../../rules/academic/opencontest-standard.md) 上传比赛,否则比赛可能会被爆破或者被惩罚。
3131

32-
**恶意创建公开比赛属于II类违反,一次即可封号。**
32+
**恶意创建公开比赛属于 II 类违反,一次即可封号。**
3333

3434
个人邀请赛和团队内部赛比较宽松,但不可以违反以下几点:
3535

docs/manual/luogu/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sidebar_position: 2
3939
- Linux 中换行符是 `\n` 而 Windows 中是 `\r\n`(多一个字符),有些数据在 Windows 中生成,而在洛谷评测机 Linux 环境下评测。这种情况在字符串输入中非常常见。
4040
- 评测系统运行在 Linux 下,可能由于使用了 Linux 的保留字而出现 CE,但在 Windows 下正常。
4141
- Linux 对内存的访问控制更为严格,因此在 Windows 上可能正常运行的无效指针或数组下标访问越界,在评测系统上无法运行。
42-
- 严重的内存泄露的问题很可能会引起系统的保护模块杀死你的进程。因此,凡是使用 `malloc`(或 `calloc``realloc``new`)分配而得的内存空间,请使用 `free`(或 `delete`)完全释放。
42+
- 严重的内存泄露的问题很可能会引起系统的保护模块杀死你的进程。因此,凡是使用 `malloc`(或 `calloc``realloc``new`) 分配而得的内存空间,请使用 `free`(或 `delete`)完全释放。
4343
- 数据可能真的有问题。但是,如果已有不止一个人通过了这道题,那最好不要怀疑是数据的锅。
4444

4545
## 如何创建题目? {#problem-create}

docs/manual/luogu/problem/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sidebar_position: 4
4444

4545
## Special Judge 使用说明
4646

47-
当一个题目可以接受多种正确答案,即有多组解的时候,题目就必须被 Special Judge。
47+
当一个题目可以接受多种正确答案即有多组解的时候题目就必须被 Special Judge。
4848
Special Judge 程序使用输入数据和一些其他信息来判答你程序的输出,并将判答结果返回。
4949

5050
详见:[Special Judge 使用说明](./special-judge.md)

0 commit comments

Comments
 (0)