Conversation
Contributor
Code Metrics Report
Details | | main (5a55674) | #124 (d177b87) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 37.8% | 37.5% | -0.4% |
| Files | 11 | 12 | +1 |
| Lines | 871 | 880 | +9 |
| Covered | 330 | 330 | 0 |
- | Code to Test Ratio | 1:2.0 | 1:2.0 | -0.1 |
| Code | 1936 | 1969 | +33 |
+ | Test | 4026 | 4090 | +64 |
- | Test Execution Time | 14s | 15s | +1s |Code coverage of files in pull request scope (0.0% → 0.0%)
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: #123
This pull request introduces a new feature that adds support for JSON output when listing Git worktrees, along with corresponding tests to ensure correct functionality. The main changes involve implementing the JSON output logic, adding a command-line flag to enable it, and verifying the output in the end-to-end test suite.
New JSON Output Feature:
--jsonflag to the CLI, allowing users to output the list of worktrees in JSON format. [1] [2]printJSONfunction incmd/json.goto format and print worktree information as JSON, including fields for path, branch, head, bare status, and whether the worktree is current.listWorktreesfunction to useprintJSONwhen the--jsonflag is set.Testing:
e2e/basic_test.goto verify that the--jsonflag outputs correctly structured JSON, checks for the presence and correctness of both main and feature worktrees, and validates field values. [1] [2]