This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
This file contains 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
This was referenced Jul 11, 2018
ibrasho
reviewed
Jul 11, 2018
cmd/dep/check.go
Outdated
Check determines if your project is in a good state. If problems are found, it | ||
prints a description of each issue, then exits 1. Passing -q suppresses output. | ||
|
||
Flags control which specific checks will be run. By default,dep check verifies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/default,dep/default, dep/
dep check is a read-only command that verifies dep's sync invariants are met. It's primarily intended for automated use (e.g. CI or git pre-commit hooks). We may expand it later to include more comprehensive checks.
If vendor was empty, nonexistent, or just missing a few targeted items, the SafeWriter would miss them.
This is sad, but it's the fastest way to satisfy the test harness running on Windows.
No more hacky ensure-and-diff-vendor!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
dep check is a read-only command that verifies the sync invariants dep defines are met.
What does this do / why do we need it?
This introduces the
dep check
subcommand, which does the same kind of sync checking asdep ensure
. If it finds any issues, it reports them and exits 1.This is primarily intended to be used in automated contexts (scripts, git hooks, CI, etc). To that end, it is an express design goal is that it be really fast, which it is - there are no circumstances under which it would hit network, and it does not require a populated source manager cache.
This could use some tests, and at least a bit of update to the docs.
What should your reviewer look out for in this PR?
Wording is particularly important here - i tried to be terse without impacting understanding. And, of course, correctness.
Do you need help or clarification on anything?
nah
Which issue(s) does this PR fix?
fixes #1929