nachoverdon / d0nt

A pre-commit git hook to avoid committing unwanted code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage

To prevent yourself from committing unwanted code, write @d0nt somewhere in the code. Ex:

public ThingThatDealsWithMoney {
  public ThingThatDealsWithMoney() {
    // @d0nt
    String user = "nachoverdon";
    String password = "s3cUr€pA5sW0rD";
    boolean secure = true;

    login(user, password, true);
  }
}

Call the program from your repository's .git/hooks/pre-commit file.

#!/bin/bash

C:/projects/tools/d0nt/d0nt.exe
exit $?

If @d0nt is found, the commit will fail.

Build

v -prod -autofree d0nt.v

About

A pre-commit git hook to avoid committing unwanted code

License:MIT License


Languages

Language:V 84.5%Language:AMPL 15.5%