Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

dep: Introduce dep check subcommand #1932

Merged
merged 12 commits into from
Jul 21, 2018
Merged

dep: Introduce dep check subcommand #1932

merged 12 commits into from
Jul 21, 2018

Conversation

sdboyer
Copy link
Member

@sdboyer sdboyer commented Jul 11, 2018

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 as dep 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

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
Copy link
Collaborator

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.
@sdboyer sdboyer requested a review from carolynvs as a code owner July 21, 2018 00:15
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.
@sdboyer sdboyer merged commit aace561 into golang:master Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dep check subcommand
3 participants