Repository navigation
Conversation
Constable's methodical check requires each method to live in the same file as its receiver type. Consolidate all app methods in roam.go so lint-constable's same-file diagnostics pass. This is a pure move with no behavior change and leaves method ordering untouched for the follow-up sorting commit.
Constable's methodical check requires methods sharing a type and file to be sorted by name. Reorder the consolidated app methods in roam.go with no behavior change.
Constable's testify check requires test failures to use testify/require instead of testing.Fatal methods. Convert helpers and assertions with no behavior change.
The helper only wrapped require.Equal, so it added indirection without adding meaning. Inlining it keeps assertions uniform with the rest of the tests.
As a single statement, the predicate reported 100% statement coverage even though the help-matching outcome was never tested. Splitting the length guard from the flag match makes statement coverage reveal that gap, which upcoming root-help tests will close.
The previous assertions indexed into the call log by position, which silently assumed call order and argument layout. Asserting the complete expected call list makes the test self-describing and catches unintended changes anywhere in the setup sequence.
Running roam with no args, -h, or --help must print roam's own help rather than exec git, which would otherwise print git usage or pass -h through. These cases guard the DisableFlagParsing root command and the isHelpArg predicate, whose help-matching branch was previously uncovered.
Scripts depend on roam exiting with git's exit code, and users depend on roam not printing a second error after git has already written its own message to stderr. Neither behavior was covered. The fake git now fails with exit code 3 so the propagation test cannot pass via the generic fallback of 1.
DisableFlagParsing on the root command is what lets users run commands like 'roam --no-pager log' without cobra intercepting the flag, and the exec wiring is what delivers git's output to the user's terminal. Both were untested, so a regression in either would not have been caught.
The existing tests verify roam invokes git with the expected arguments but never that those arguments actually work, so a broken setup sequence (for example a checkout that fails against a freshly fetched remote) would pass the suite. This test runs setup against a real local origin, rewritten from the GitHub URL via insteadOf, and verifies the dotfile is checked out into the home directory with a clean status.
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.
No description provided.