Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds pre-commit hook for dep check #1842

Merged
merged 3 commits into from Mar 8, 2019

Conversation

3 participants
@reggieriser
Copy link
Contributor

reggieriser commented Mar 8, 2019

Description

We seem to get out of sync with dep quite often (see #1826 for an example). This PR adds in a pre-commit hook for dep check which should block commits that would put us out-of-sync. It is currently set to run only on changes to *.go, Gopkg.toml, or Gopkg.lock files.

We had already gotten out-of-sync slightly again since #1826 landed, so this PR fixes that dep problem too.

Reviewer Notes

If/when we land this, we'll need to make sure all existing branches merge from master so they don't accidentally put us out-of-sync again in master.

I'm curious if anybody sees significant delays from this check. It seems to take 5 seconds or so on my machine (which seems acceptable), but YMMV.

Setup

To test, grab this branch and try making changes to *.go, Gopkg.toml, or Gopkg.lock files and committing locally (don't push!) to see the pre-commit hook run. Try taking something out of Gopkg.lock and see that it blocks the commit and reports the sync problem. You can also try changing some other non-Go and non-dep file like a *.jsx file and note that the hook does not execute.

@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 8, 2019

Codecov Report

Merging #1842 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1842   +/-   ##
=======================================
  Coverage   49.44%   49.44%           
=======================================
  Files         427      427           
  Lines       18407    18407           
  Branches     1632     1632           
=======================================
  Hits         9102     9102           
  Misses       8503     8503           
  Partials      802      802
@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj left a comment

🤖 - Love more automation!

@pjdufour-truss
Copy link
Contributor

pjdufour-truss left a comment

🚢

@reggieriser reggieriser merged commit 6b37414 into master Mar 8, 2019

19 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: client_test_coverage Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_mymove Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_office Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_tsp Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
ci/circleci: server_test_coverage Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 1148e61...1370e50
Details
codecov/project 49.44% remains the same compared to 1148e61
Details

@reggieriser reggieriser deleted the rr-pre-commit-dep-check branch Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.