šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

git-precheck

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-precheck

Run pre-commit checks before making commits to projects

0.2.1
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
Ā 
Created
Source

git-precheck

Installation

$ npm install -g git-precheck

Usage

You can use this from within any git directory to run basic pre-checks before making a commit:

$ git precheck
Installing node dependencies
Extracting build steps from travis

> shelljs@0.5.3 test /home/...
> node scripts/run-tests

# output of your commands...

Summary of build steps:
√  $ npm test
√  $ node scripts/generate-docs.js
√  $ git diff --quiet # make sure no files have changed

What commands does it choose to run? Well, it aims to run whatever Travis CI would attempt to run. How does it decide? Read below...

Integrating within vim

But wait, there's more! If you're a fugitive user, then you get vim-integration for free. You can run prechecks from within vim using:

:Git precheck " or if you were smart and made the short alias...

If you're not a fugitive user (but really, why not?) then you can use it like this:

:!git precheck

Travis CI Compatibility

Yup! It works with Travis as well. If you have a .travis.yml file in your repo, it will attempt to read the script steps from the file and execute those sequentially, just like Travis would. Now you can know if your PR will pass before you push it :+1:

Windows Compatibility???

Windows compatibility isn't my biggest priority, but it should still be there. If it isn't, drop me a line and let me know.

Keywords

git

FAQs

Package last updated on 09 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts