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

🐛 Fix behavior on verbose environment #244

Merged
merged 4 commits into from
May 14, 2024
Merged

🐛 Fix behavior on verbose environment #244

merged 4 commits into from
May 14, 2024

Conversation

lambdalisue
Copy link
Member

@lambdalisue lambdalisue commented May 14, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced the list function to provide more detailed output using 0verbose.
  • Bug Fixes

    • Restored the verbose setting after listing autocmds to ensure consistent user environment.
  • Chores

    • Updated task commands for better Deno script management.
    • Changed import statements to named imports for consistency.
  • Tests

    • Improved test coverage by adding assertions and managing verbose settings during tests.

Copy link

coderabbitai bot commented May 14, 2024

Walkthrough

This update includes various modifications to the project, focusing on enhancing functionality and improving code clarity. Key changes involve renaming commands in workflows and tasks, modifying verbose settings in autocmd and mapping modules, and updating import statements in helper files. These adjustments ensure better execution of scripts, more precise control over verbosity, and cleaner code organization.

Changes

File Path Change Summary
.github/workflows/update.yml Renamed deno task -q upgrade:commit to deno task -q update:commit to reflect the updated task naming convention.
autocmd/common.ts Altered the list function to append 0verbose to the expression before calling denops.call("execute", ...).
autocmd/common_test.ts Added saving and restoring of the verbose setting around the block of code that lists autocmds.
deno.jsonc Updated tasks section, replacing upgrade with update, and added new tasks for updating with commit and generating.
helper/expr_string.ts Changed import statement from a default import to a named import for is.
helper/keymap.ts Changed import statement from a default import to a named import for is.
mapping/mod.ts Modified fn.execute call within the list function to include 0verbose before mode in the executed command.
mapping/mod_test.ts Added saving and restoring of the verbose setting around the block of code that lists mappings.

🐇✨ Beneath the code, a rabbit pranced,
Adjusting scripts with careful stance.
With 0verbose, commands refined,
And imports neatly realigned.
Tasks renamed, updates unfurled,
A better script for the coding world! 🚀


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.53%. Comparing base (83978e8) to head (eb296e0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
+ Coverage   82.52%   82.53%   +0.01%     
==========================================
  Files          57       57              
  Lines        2964     2966       +2     
  Branches      262      262              
==========================================
+ Hits         2446     2448       +2     
  Misses        516      516              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@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 83978e8 and eb296e0.
Files selected for processing (8)
  • .github/workflows/update.yml (1 hunks)
  • autocmd/common.ts (1 hunks)
  • autocmd/common_test.ts (2 hunks)
  • deno.jsonc (1 hunks)
  • helper/expr_string.ts (1 hunks)
  • helper/keymap.ts (1 hunks)
  • mapping/mod.ts (1 hunks)
  • mapping/mod_test.ts (3 hunks)
Additional comments not posted (9)
deno.jsonc (2)

7-7: Addition of deno check ./**/*.ts enhances type safety across the project.


11-12: Modification of the update task to specify exact permissions and use a specific CLI tool is a good security practice.

.github/workflows/update.yml (1)

21-21: Update of the workflow command from upgrade:commit to update:commit maintains consistency with task changes in deno.jsonc.

helper/keymap.ts (1)

11-11: Change of import statement for is module to named import enhances clarity and aligns with module export changes.

autocmd/common.ts (1)

134-134: Prefixing 0verbose in the list function suppresses verbose output, aligning with the PR's objective to manage verbose environments effectively.

mapping/mod.ts (1)

219-222: Inclusion of 0verbose in the list function command suppresses verbose output, consistent with changes across other modules to manage verbose environments.

helper/expr_string.ts (1)

29-29: Change of import statement for is module to named import enhances clarity and aligns with module export changes.

autocmd/common_test.ts (1)

Line range hint 166-201: Addition of steps to save and restore the verbose setting in tests ensures that global settings are not inadvertently affected, enhancing test reliability.

mapping/mod_test.ts (1)

Line range hint 570-622: Addition of steps to save and restore the verbose setting in tests ensures that global settings are not inadvertently affected, enhancing test reliability.

@lambdalisue lambdalisue merged commit 52b4d51 into main May 14, 2024
9 checks passed
@lambdalisue lambdalisue deleted the fix-verbose branch May 14, 2024 03:12
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.

None yet

1 participant