GithubHelp home page GithubHelp logo

.gitblacklist's Introduction

GIT blacklist checker


GIT - pre-commit check and reject certain words/phrases/functions commit into git repository.

Install

$ npm install gitblacklist -g

Usage

$ gitblacklist init

Configuration

gitblacklist use following blacklist files to definition blacklist for certain words/phrases/functions.

  • REPO_ROOT/.gitblacklist.[ext]
  • REPO_ROOT/.gitblacklist
  • ~/.gitblacklist.[ext]
  • ~/.gitblacklist

description:

  • REPO_ROOT/.gitblacklist.[ext] and ~/.gitblacklist.[ext] is for specifically filetype.
  • .gitblacklist and ~/.gitblacklist is for all of files.
  • REPO_ROOT/.gitblacklist.[ext] and REPO_ROOT/.gitblacklist is for current repository.
  • ~/.gitblacklist.[ext] and ~/.gitblacklist is for all of current user's repository.

Pre-line a certain words/phrases/functions.

Example

To check for "TODO" or "FIXME" in a java file, create the file {REPO_ROOT}/.gitblacklist.java containing the two lines:

TODO
FIXME

Bugs

For any bugs, please visit issues

.gitblacklist's People

Contributors

hotoo avatar mflint avatar niden avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

.gitblacklist's Issues

更好的检查 add 的内容,而不是检查文件最后的内容

$ git add .
文件有敏感内容,但添加成功。
$ git commit
文件有敏感内容, commit 失败
$ vi somefile
清理敏感内容。
$ git commit -m ""
提交了带有敏感内容的文件,虽然这个敏感内容被修复。
$ git status
M somefile
$ git add .
$ git commit -m ""
虽然重复提交修复了敏感内容,但是并未解决之前提交的敏感内容。

需要一个类似 pre-add 的 hooks。

文件名中存在空格时,被当作两个文件处理

File: wki/The World Browser.md

$ git ci
grep: "wiki/The: No such file or directory
grep: "wiki/The: No such file or directory
grep: "wiki/The: No such file or directory
grep: "wiki/The: No such file or directory
grep: "wiki/The: No such file or directory
grep: "wiki/The: No such file or directory
grep: "wiki/The: No such file or directory
grep: World: No such file or directory
grep: World: No such file or directory
grep: World: No such file or directory
grep: World: No such file or directory
grep: World: No such file or directory
grep: World: No such file or directory
grep: World: No such file or directory
grep: Browser.md": No such file or directory
grep: Browser.md": No such file or directory
grep: Browser.md": No such file or directory
grep: Browser.md": No such file or directory
grep: Browser.md": No such file or directory
grep: Browser.md": No such file or directory
grep: Browser.md": No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.