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

Ci/typo checker #362

Merged
merged 5 commits into from
Aug 1, 2024
Merged

Ci/typo checker #362

merged 5 commits into from
Aug 1, 2024

Conversation

Kilerd
Copy link
Collaborator

@Kilerd Kilerd commented Aug 1, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new typo-checking job in the GitHub Actions workflow to enhance code quality.
    • Added a configuration file to manage file exclusions during typo checks.
  • Bug Fixes

    • Corrected multiple typographical errors in financial records, enhancing clarity and accuracy.
    • Fixed spelling issues in localization files for improved user interface text.
  • Style

    • Enhanced code readability through formatting adjustments and consistent naming conventions.
    • Minor adjustments to improve the layout and presentation of components.
  • Documentation

    • Updated README for clarity, correcting typographical errors and improving the flow of information.

Kilerd added 3 commits August 1, 2024 11:22
Signed-off-by: Kilerd Chan <blove694@gmail.com>
Signed-off-by: Kilerd Chan <blove694@gmail.com>
Signed-off-by: Kilerd Chan <blove694@gmail.com>
Copy link
Contributor

coderabbitai bot commented Aug 1, 2024

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent updates enhance code quality and maintainability by correcting typographical errors across various files, adding a new typo-checking job to the GitHub Actions workflow, and improving localization accuracy. These changes contribute to a cleaner codebase and a more professional presentation of information in both English and Chinese translations, ensuring clarity and consistency throughout the project.

Changes

File Path Change Summary
.github/workflows/build-latest.yml Added a typo-checker job to improve code quality by identifying typographical errors.
_typos.toml Introduced a configuration for excluding specific files from typo checks, enhancing workflow efficiency.
examples/main.zhang Corrected typos in financial records for terms like "Transportation" and "OpenBalancing" to ensure clarity in financial reporting.
extensions/beancount/src/beancount.pest Corrected multiple instances of "indentation" to enhance clarity in grammar definitions.
extensions/beancount/src/parser.rs Renamed identation function to indentation, correcting a typographical error.
frontend/public/locales/.../translation.json Fixed spelling errors in keys, specifically "ASSET_BLANACE" to "ASSET_BALANCE" and "Montly Income" to "Monthly Income."
frontend/src/components/.../*.tsx Corrected various typographical errors in component props and function names, enhancing readability and consistency.
frontend/src/rest-model.ts Corrected the spelling of JournalBlancePadItem to JournalBalancePadItem.
readme.md Fixed spelling errors and improved text clarity and formatting in project documentation.
zhang-core/src/data_type/text/... Corrected the spelling of "indentation" in parsing rules and changed function names for accuracy.
zhang-core/src/domains/mod.rs Renamed account_invetory to account_inventory to improve code clarity.
zhang-core/src/lib.rs Changed "Open-Balacing" to "Open-Balancing" for consistency in terminology.
zhang-core/src/utils/string_.rs Renamed the test function test_escapse_with_quote to test_escape_with_quote for accuracy.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CI as CI/CD System
    participant Repo as Repository
    participant Checker as Typo Checker

    User->>Repo: Push Changes
    Repo->>CI: Trigger Workflow
    CI->>Checker: Run Typo Check
    Checker->>CI: Report Typos
    CI->>User: Notify Results
Loading

🐇 In the code, there’s a hop,
Typos fixed, we won’t stop!
With clearer texts and brighter ways,
Our code now shines, oh what a praise!
From checks of typos to fixes fine,
Hooray for changes, let’s all dine! 🥕✨


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 Configuration 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.

Signed-off-by: Kilerd Chan <blove694@gmail.com>
@Kilerd
Copy link
Collaborator Author

Kilerd commented Aug 1, 2024

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Aug 1, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

coderabbitai bot commented Aug 1, 2024

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

Commits

Files that changed from the base of the PR and between 54a0813 and 66296dc.

Files selected for processing (22)
  • .github/workflows/build-latest.yml (2 hunks)
  • _typos.toml (1 hunks)
  • examples/main.zhang (1 hunks)
  • extensions/beancount/src/beancount.pest (2 hunks)
  • extensions/beancount/src/parser.rs (1 hunks)
  • frontend/public/locales/en/translation.json (1 hunks)
  • frontend/public/locales/zh/translation.json (1 hunks)
  • frontend/src/components/ErrorBox.tsx (3 hunks)
  • frontend/src/components/StatisticBar.tsx (1 hunks)
  • frontend/src/components/StatisticBox.tsx (1 hunks)
  • frontend/src/components/journalLines/tableView/TableViewBalancePadLine.tsx (2 hunks)
  • frontend/src/components/journalPreview/BalanceCheckPreview.tsx (2 hunks)
  • frontend/src/components/journalPreview/BalancePadPreview.tsx (2 hunks)
  • frontend/src/components/journalPreview/JournalPreview.tsx (2 hunks)
  • frontend/src/pages/tools/BatchBalance.tsx (5 hunks)
  • frontend/src/rest-model.ts (2 hunks)
  • readme.md (2 hunks)
  • zhang-core/src/data_type/text/parser.rs (1 hunks)
  • zhang-core/src/data_type/text/zhang.pest (2 hunks)
  • zhang-core/src/domains/mod.rs (1 hunks)
  • zhang-core/src/lib.rs (1 hunks)
  • zhang-core/src/utils/string_.rs (1 hunks)
____________________________________________________________
< If you don't finish then you're just busy, not productive. >
------------------------------------------------------------
 \
  \   \
       \ /\
       ( )
     .( o ).

Tip

You can disable sequence diagrams in the walkthrough.

Disable the reviews.sequence_diagrams setting in your project's settings in CodeRabbit to remove sequence diagrams from the walkthrough.


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 Configuration 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.

Signed-off-by: Kilerd Chan <blove694@gmail.com>
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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 54a0813 and 66296dc.

Files selected for processing (22)
  • .github/workflows/build-latest.yml (2 hunks)
  • _typos.toml (1 hunks)
  • examples/main.zhang (1 hunks)
  • extensions/beancount/src/beancount.pest (2 hunks)
  • extensions/beancount/src/parser.rs (1 hunks)
  • frontend/public/locales/en/translation.json (1 hunks)
  • frontend/public/locales/zh/translation.json (1 hunks)
  • frontend/src/components/ErrorBox.tsx (3 hunks)
  • frontend/src/components/StatisticBar.tsx (1 hunks)
  • frontend/src/components/StatisticBox.tsx (1 hunks)
  • frontend/src/components/journalLines/tableView/TableViewBalancePadLine.tsx (2 hunks)
  • frontend/src/components/journalPreview/BalanceCheckPreview.tsx (2 hunks)
  • frontend/src/components/journalPreview/BalancePadPreview.tsx (2 hunks)
  • frontend/src/components/journalPreview/JournalPreview.tsx (2 hunks)
  • frontend/src/pages/tools/BatchBalance.tsx (5 hunks)
  • frontend/src/rest-model.ts (2 hunks)
  • readme.md (2 hunks)
  • zhang-core/src/data_type/text/parser.rs (1 hunks)
  • zhang-core/src/data_type/text/zhang.pest (2 hunks)
  • zhang-core/src/domains/mod.rs (1 hunks)
  • zhang-core/src/lib.rs (1 hunks)
  • zhang-core/src/utils/string_.rs (1 hunks)
Files skipped from review due to trivial changes (18)
  • _typos.toml
  • examples/main.zhang
  • extensions/beancount/src/beancount.pest
  • extensions/beancount/src/parser.rs
  • frontend/public/locales/en/translation.json
  • frontend/public/locales/zh/translation.json
  • frontend/src/components/ErrorBox.tsx
  • frontend/src/components/StatisticBox.tsx
  • frontend/src/components/journalLines/tableView/TableViewBalancePadLine.tsx
  • frontend/src/components/journalPreview/BalanceCheckPreview.tsx
  • frontend/src/components/journalPreview/JournalPreview.tsx
  • frontend/src/pages/tools/BatchBalance.tsx
  • frontend/src/rest-model.ts
  • zhang-core/src/data_type/text/parser.rs
  • zhang-core/src/data_type/text/zhang.pest
  • zhang-core/src/domains/mod.rs
  • zhang-core/src/lib.rs
  • zhang-core/src/utils/string_.rs
Additional context used
LanguageTool
readme.md

[uncategorized] ~35-~35: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...al precision and datetime supported for directive, provide more control - **Document Ma...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)


[grammar] ~37-~37: The preposition ‘to’ may be missing (allow someone to do something).
Context: ...ocument management feature to allow you collect and control document easier and effec...

(ALLOW_TO_DO)


[uncategorized] ~38-~38: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...ture to allow you collect and control document easier and effective, like receipts. - ...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)


[uncategorized] ~44-~44: This expression is usually spelled with a hyphen.
Context: ...beancount beancount and zhang are both text based accounting tools, and they are some fam...

(BASED_HYPHEN)

Additional comments not posted (8)
frontend/src/components/StatisticBar.tsx (2)

23-23: Corrected typo in text property.

The text property has been corrected from 'ASSET_BLANACE' to 'ASSET_BALANCE', improving clarity.


28-31: Corrected typo in property name.

The property negetive has been corrected to negative, enhancing semantic correctness.

readme.md (4)

34-34: Corrected typo in 'Directive'.

The term "Direcitve" has been corrected to "Directive", ensuring accurate terminology.


38-38: Improved readability of the text.

The phrase "document easier and effective" has been revised to "document easier and effective," enhancing readability.

Tools
LanguageTool

[uncategorized] ~38-~38: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...ture to allow you collect and control document easier and effective, like receipts. - ...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)


46-46: Improved readability of the text.

The text has been revised for better readability and clarity.


56-58: Improved readability of the text.

The text has been revised for better readability and clarity.

frontend/src/components/journalPreview/BalancePadPreview.tsx (1)

22-22: Corrected typo in type name.

The type name has been corrected from JournalBlancePadItem to JournalBalancePadItem, ensuring correct reference to the intended data structure.

.github/workflows/build-latest.yml (1)

146-151: Addition of typo-checker job looks good!

The new typo-checker job is a valuable addition to the CI pipeline for maintaining code quality by identifying typographical errors.

However, consider the following points:

  1. Documentation: Ensure that the usage and configuration of the typo-checker are well-documented. This includes how to handle false positives and configure the tool for specific project needs.
  2. Performance Impact: Monitor the performance impact of this new job on the overall CI pipeline. If necessary, run the typo checks in a separate job to avoid slowing down the main build process.
  3. Exclusions: If not already configured, consider adding options to exclude certain files or directories where typos are less critical.

Would you like me to assist with any of these suggestions or open a GitHub issue to track them?

@Kilerd Kilerd merged commit c14f610 into main Aug 1, 2024
22 checks passed
@Kilerd Kilerd deleted the ci/typo-checker branch August 1, 2024 03:56
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.

1 participant