Implement check-depends --help and refactor help texts for easier maintenance#306
Open
ottok wants to merge 4 commits intoDebian:masterfrom
Open
Implement check-depends --help and refactor help texts for easier maintenance#306ottok wants to merge 4 commits intoDebian:masterfrom
check-depends --help and refactor help texts for easier maintenance#306ottok wants to merge 4 commits intoDebian:masterfrom
Conversation
According to `dh-make-golang`, all commands should emit help when called with `--help`. It was missing for `check-depends`, so implement it now. Add a proper flag.FlagSet with usage text explaining that check-depends compares go.mod dependencies against Debian packages and reports which ones are missing or obsolete. Also reject any positional arguments to keep the interface simple and predictable.
The scattered `fmt.Fprintf(os.Stderr, ...)` calls made the help texts hard to read and maintain. Switch to Go raw string literals (` `) so the entire block is formatted exactly as it will appear to the user. No functional changes. The help text is still the same.
Verify that the CLI help flag works correctly and displays the expected usage information. This catches regressions where the command-line interface might break or the help text becomes malformed.
This silences the unnecessary git hint visible when running `go test`:
=== RUN TestSnapshotVersion
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
hint:
hint: Disable this message with "git config set advice.defaultBranchName false"
4741faa to
662409b
Compare
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.
See commits for details.
User visible result: