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

Add context option for filter diffs #421

Merged
merged 1 commit into from
Jan 19, 2025
Merged

Conversation

kpengboy
Copy link
Contributor

This adds a --context option to the diff subcommand and a --diff-context option to the apply and edit commands. The option allows the number of lines of diff context to be customized, which is helpful for verifying the correctness of changes to more complex filters.

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 31.81818% with 15 lines in your changes missing coverage. Please review.

Project coverage is 54.52%. Comparing base (c566f95) to head (7dd5035).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
cmd/gmailctl/cmd/apply_cmd.go 0.00% 5 Missing ⚠️
cmd/gmailctl/cmd/diff_cmd.go 0.00% 5 Missing ⚠️
cmd/gmailctl/cmd/edit_cmd.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
- Coverage   54.63%   54.52%   -0.12%     
==========================================
  Files          53       53              
  Lines        4448     4457       +9     
==========================================
  Hits         2430     2430              
- Misses       1877     1886       +9     
  Partials      141      141              

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

Copy link
Owner

@mbrt mbrt left a comment

Choose a reason for hiding this comment

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

Great stuff, left only minor comments, thanks!

This adds a `--context` option to the `diff` subcommand and a `--diff-context` option to the `apply` and `edit` commands. The option allows the number of lines of diff context to be customized, which is helpful for verifying the correctness of changes to more complex filters.
@kpengboy kpengboy requested a review from mbrt January 19, 2025 04:27
@mbrt mbrt merged commit 6b9e153 into mbrt:master Jan 19, 2025
4 of 5 checks passed
@mbrt mbrt added the kind/feature New feature or request label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants