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

docs: opt contributiong.md #1339

Merged
merged 1 commit into from
Jun 30, 2024
Merged

Conversation

kiner-tang
Copy link
Contributor

@kiner-tang kiner-tang commented Jun 30, 2024

Summary by CodeRabbit

  • Documentation
    • 重新组织并优化了CONTRIBUTING.md文档结构。
    • 增加了环境设置和工具安装的详细步骤。
    • 对命令进行了重新表述,使其更易于理解。
    • 增加了运行测试、确保代码质量和管理依赖项的详细步骤。

Copy link
Contributor

coderabbitai bot commented Jun 30, 2024

Walkthrough

本次变更对 CONTRIBUTING.md 文件进行了结构性调整,主要包括引入新标题、添加工具安装说明和优化开发步骤。显著的改动包括添加环境设置说明、重新措辞以提高命令清晰度,并详细列出运行测试、确保代码质量和管理依赖的步骤。

Changes

文件 变更概要
CONTRIBUTING.md 重新组织内容,添加新标题和工具安装说明,并优化开发流程步骤。

Poem

🐰

贡献指南新改版,
结构清晰步骤全;
环境设置来指引,
格式检查保质量。
🐇


Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are always opted into early access features.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Outside diff range and nitpick comments (2)
CONTRIBUTING.md (2)

Line range hint 131-131: 拼写错误:将 "Mac AppStore" 更改为 "Mac App Store"

可能存在拼写错误。

- Install Xcode App from Mac AppStore and switch xcode dev tool with:
+ Install Xcode App from Mac App Store and switch xcode dev tool with:
Tools
LanguageTool

[style] ~6-~6: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...g ## Getting Started ### Environment First of all, you need to install the following tool...

(FIRST_OF_ALL)

Markdownlint

16-16: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


17-17: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


23-23: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


24-24: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


30-30: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


Line range hint 134-134: 建议:移除命令前的美元符号

根据Markdownlint的建议,命令前不应使用美元符号。

- $ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- $ cargo install cargo-instruments
- # see instruments template:
- $ cargo instruments --list-templates
- $ cargo instruments -t sys --profile release-debug --package mako --bin mako examples/with-antd
- $ open target/instruments/mako_System-Trace_xxx.trace
- $ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi build
- $ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi dev
- $ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js max build
- $ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js bigfish build
- $ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi build
- $ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi dev
- $ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js max build
- $ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js bigfish build
+ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
+ cargo install cargo-instruments
+ # see instruments template:
+ cargo instruments --list-templates
+ cargo instruments -t sys --profile release-debug --package mako --bin mako examples/with-antd
+ open target/instruments/mako_System-Trace_xxx.trace
+ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi build
+ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi dev
+ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js max build
+ OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js bigfish build
+ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi build
+ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js umi dev
+ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js max build
+ XCODE_PROFILE=1 OKAM=/PATH/TO/umijs/marko/packages/bundler-mako/index.js bigfish build

Also applies to: 149-149, 155-155, 161-161, 162-162, 163-163, 164-164, 169-169, 170-170, 171-171, 172-172

Tools
LanguageTool

[style] ~6-~6: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...g ## Getting Started ### Environment First of all, you need to install the following tool...

(FIRST_OF_ALL)

Markdownlint

16-16: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


17-17: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


23-23: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


24-24: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


30-30: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 25fa59f and d1a7e2e.

Files selected for processing (1)
  • CONTRIBUTING.md (4 hunks)
Additional context used
LanguageTool
CONTRIBUTING.md

[style] ~6-~6: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...g ## Getting Started ### Environment First of all, you need to install the following tool...

(FIRST_OF_ALL)


[style] ~80-~80: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...en target/llvm-cov/html/index.html Run fmt to format code. bash $ just fmt...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~86-~86: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...o format code. bash $ just fmt Run lint to check code style. ```bash $ ju...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[misspelling] ~131-~131: Possible spelling mistake found.
Context: ...ruments/mac). - Install Xcode App from Mac AppStore and switch xcode dev tool with: ```bas...

(EN_MULTITOKEN_SPELLING_TWO)

Markdownlint
CONTRIBUTING.md

16-16: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


17-17: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


23-23: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


24-24: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


30-30: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


31-31: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


37-37: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


77-77: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


78-78: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


84-84: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


90-90: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


96-96: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


97-97: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


98-98: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


125-125: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


126-126: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


134-134: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


149-149: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


155-155: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


161-161: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


162-162: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


163-163: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


164-164: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


169-169: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


170-170: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


171-171: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


172-172: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


168-168: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


194-194: null
Bare URL used

(MD034, no-bare-urls)

@@ -63,26 +71,26 @@ $ cargo nextest run transformers::transform_try_resolve::tests
$ cargo insta review
```

Coverage.
Run Coverage.

```bash
$ cargo codecov
$ cargo codecov --html && open target/llvm-cov/html/index.html
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议:重新措辞以避免重复的句子开头

连续三个句子以相同的词开头,建议重新措辞或使用同义词。

- Run fmt to format code.
- Run lint to check code style.
+ Use `just fmt` to format the code.
+ Use `just lint` to check the code style.

Also applies to: 86-86

Tools
LanguageTool

[style] ~80-~80: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...en target/llvm-cov/html/index.html Run fmt to format code. bash $ just fmt...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

Comment on lines 16 to 24
$ git clone git@github.com:umijs/mako.git
$ cd mako
```

Install tools.
Install dependencies.

```bash
$ cargo install just
$ cargo install cargo-binstall
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议:移除命令前的美元符号

根据Markdownlint的建议,命令前不应使用美元符号。

- $ git clone git@github.com:umijs/mako.git
- $ cd mako
- $ cargo install just
- $ cargo install cargo-binstall
- $ cargo build
- $ cargo build --release
- $ pnpm build
+ git clone git@github.com:umijs/mako.git
+ cd mako
+ cargo install just
+ cargo install cargo-binstall
+ cargo build
+ cargo build --release
+ pnpm build

Also applies to: 30-31, 37-37

Tools
Markdownlint

16-16: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


17-17: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


23-23: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


24-24: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

@@ -44,15 +52,15 @@ $ RUST_LOG=mako::parse=debug,info cargo run --bin mako examples/normal

## Advanced Tasks

Before you push.
Before you push your code, you should run the following commands to make sure everything is ok.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议:移除命令前的美元符号

根据Markdownlint的建议,命令前不应使用美元符号。

- $ just ready
- # without e2e
- $ just ready-lite
- $ pnpm playwright install # only need to run before the first time you run "jest test"
- $ just test
- # test specified testcase
- $ cargo nextest run transformers::transform_try_resolve::tests
- # review snapshot
- $ cargo insta review
- $ cargo codecov
- $ cargo codecov --html && open target/llvm-cov/html/index.html
- $ just fmt
- $ just lint
- $ cargo upgrade
- $ cargo upgrade --incompatible
- $ cargo upgrade --dry-run
+ just ready
+ # without e2e
+ just ready-lite
+ pnpm playwright install # only need to run before the first time you run "jest test"
+ just test
+ # test specified testcase
+ cargo nextest run transformers::transform_try_resolve::tests
+ # review snapshot
+ cargo insta review
+ cargo codecov
+ cargo codecov --html && open target/llvm-cov/html/index.html
+ just fmt
+ just lint
+ cargo upgrade
+ cargo upgrade --incompatible
+ cargo upgrade --dry-run

Also applies to: 63-63, 74-74, 81-81, 87-87, 93-93

@@ -2,21 +2,29 @@

## Getting Started

Clone.
### Environment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议:移除冗余短语 "First of all"

这个副词短语通常是多余的,可以考虑使用替代表达方式。

- First of all, you need to install the following tools:
+ You need to install the following tools:
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You need to install the following tools:
Tools
LanguageTool

[style] ~6-~6: Often, this adverbial phrase is redundant. Consider using an alternative.
Context: ...g ## Getting Started ### Environment First of all, you need to install the following tool...

(FIRST_OF_ALL)

@@ -29,7 +37,7 @@ Build js packages (include packages/mako).
$ pnpm build
```

Run.
Run mako with examples.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议:移除命令前的美元符号

根据Markdownlint的建议,命令前不应使用美元符号。

- $ cargo run --bin mako examples/normal
- # with HMR
- $ cargo run --bin mako examples/normal --watch
- # in production
- $ cargo run --bin mako examples/normal --mode production
- # filter logs
- $ RUST_LOG=mako=debug,info cargo run --bin mako examples/normal
- $ RUST_LOG=mako::parse=debug,info cargo run --bin mako examples/normal
+ cargo run --bin mako examples/normal
+ # with HMR
+ cargo run --bin mako examples/normal --watch
+ # in production
+ cargo run --bin mako examples/normal --mode production
+ # filter logs
+ RUST_LOG=mako=debug,info cargo run --bin mako examples/normal
+ RUST_LOG=mako::parse=debug,info cargo run --bin mako examples/normal
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Run mako with examples.
Run mako with examples.
cargo run --bin mako examples/normal
# with HMR
cargo run --bin mako examples/normal --watch
# in production
cargo run --bin mako examples/normal --mode production
# filter logs
RUST_LOG=mako=debug,info cargo run --bin mako examples/normal
RUST_LOG=mako::parse=debug,info cargo run --bin mako examples/normal

@sorrycc sorrycc merged commit 2fa13fb into umijs:master Jun 30, 2024
4 checks passed
@sorrycc sorrycc mentioned this pull request Jun 30, 2024
@afc163
Copy link
Contributor

afc163 commented Jun 30, 2024

根据 CR 建议改改?

@kiner-tang
Copy link
Contributor Author

根据 CR 建议改改?

文案描述可以调整,
image
这个需要根据 CR 建议改吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants