<commit_before>#!/usr/bin/env ruby

require "git-hooks-helper"

GitHooksHelper.results do
  do_not_stop_on_warnings

  check_ruby_syntax
  check_erb
  check_best_practices
  warning_on "WTF?", "binding.pry", "<<<<<<<"
  warning_on "console.log", "debugger", {:in => [:js]}

  info "Run rspec tests and have a nice day."
end<commit_msg>One more try on Readme<commit_after>Instalation
-----------
  gem install git-hooks-helper

File clasification
------------------

Most commands use file classes internally or accept type class as a param.
File type classes and associated file extensions:
1. :rb  - .rb .rake .task .prawn
2. :js  - .js
3. :erb - .erb

Usage
-----
Create your hit hook in .git/hooks directory and make it executable.

My example pre-commit hook that i use myself.
To create such a hook type in console:

  cd your/project/
  touch .git/hooks/pre-commit
  chmod +x .git/hooks/pre-commit
  vim .git/hooks/pre-commit

and paste following code:


```ruby
  #!/usr/bin/env ruby

  require "git-hooks-helper"

  GitHooksHelper.results do
    # fail/pass options
    # stop_on_warnings                                   # makes git commit fail if any warnings are found
    # never_stop                                         # hooks never fails commits
    # list_files                                         # shows list of all changed files

    # schecks
    check_ruby_syntax                                    # errors when ruby syntax has errors
    check_erb                                            # errors when ERB syntax has errors
    check_best_practices                                 # warnings when ruby best practices are violated
    warning_on "WTF?", "binding.pry", "<<<<<<<"          # warnings when any of these texts are present in any commited files
    warning_on "console.log", "debugger", {:in => [:js]} # warning when any of these texts are present in JS files

    # messages
    info "Run rspec tests and have a nice day."
  end
```
{'fraction_non_alphanumeric': 0.09701869631126832, 'fraction_numerical': 0.0015159171298635675, 'mean_word_length': 2.0508474576271185, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6355258', 'n_tokens_mistral': 577, 'n_tokens_neox': 555, 'n_words': 206}