Skip to content

Commit ec90a50

Browse files
authoredNov 9, 2023
chore: add rust formatter (doocs#1946)
close doocs#1853
1 parent 160b013 commit ec90a50

File tree

1,228 files changed

+6910
-5539
lines changed

Some content is hidden

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

1,228 files changed

+6910
-5539
lines changed
 

‎.github/workflows/pr-checker.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
2020
我们项目中各种编程语言代码(包括文档)所采用的格式化工具不同,提交 pr 之前必须确保代码、文档正确格式化。
2121
22-
- .{md,js,ts,php,sql} 采用 prettier
22+
- .{md,js,ts,php,sql,rs} 采用 prettier
2323
- .{c,cpp,java} 采用 clang-format
2424
- .{py} 采用 black
2525
- .{go} 采用 gofmt
@@ -47,7 +47,7 @@ jobs:
4747
4848
We use different formatting tools for various programming languages (including documentation) in our project. You must ensure that the code and documentation are correctly formatted before submitting a pr.
4949
50-
- .{md,js,ts,php,sql} use prettier
50+
- .{md,js,ts,php,sql,rs} use prettier
5151
- .{c,cpp,java} use clang-format
5252
- .{py} use black
5353
- .{go} use gofmt

‎.github/workflows/prettier.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Run prettier
2626
run: |
2727
git config --global core.quotepath off
28-
changed_files=$(git diff --name-only "${{ github.event.pull_request.base.sha }}" | grep -E '\.md$|\.js$|\.ts$|\.php|\.sql$' || true)
28+
changed_files=$(git diff --name-only "${{ github.event.pull_request.base.sha }}" | grep -E '\.js$|\.ts$|\.php$|\.sql$|\.rs$|\.md$' || true)
2929
if [ -n "$changed_files" ]; then
3030
echo "Running prettier on the changed files"
3131
echo "$changed_files" | xargs -d '\n' npx prettier --write

0 commit comments

Comments
 (0)