Commit 0610f81b1be3e9e64c12c1f59b4b325f27c04581

Authored by Samson Rollo Jr
1 parent bae7200a

OJT21-52: Add pre-commit and rubocop auto-fix

  1 +repos:
  2 +- repo: local
  3 + hooks:
  4 + - id: rubocop
  5 + name: Check Ruby style with rubocop
  6 + description: Enforce Ruby style guide with rubocop and rubocop-rspec
  7 + entry: rubocop
  8 + language: ruby
  9 + types: ['ruby']
  10 + args: ['--safe', '--auto-correct-all','--disable-uncorrectable', '--force-exclusion']
1 # README 1 # README
2 2
3 --DEVELOPMENT:  
4 - -Create a mysql_account.rb file in config folder and put your mysql credentials with the following format:  
5 - .article {  
6 - # frozen_string_literal: true 3 +## DEVELOPMENT ##
  4 + - Create a mysql_account.rb file in config folder and put your mysql credentials with the following format:
  5 + > # frozen_string_literal: true
7 6
8 - ENV['MYSQL_USERNAME'] = 'your_user_name'  
9 - ENV['MYSQL_PASSWORD'] = 'your_password'  
10 - } 7 + > ENV['MYSQL_USERNAME'] = 'your_user_name'
  8 + > ENV['MYSQL_PASSWORD'] = 'your_password'
  9 +
  10 + - Install pre-commit application. You can follow here https://pre-commit.com/#install. We already provided the config.yaml.
  11 + - Input this command in the terminal in the root of the api:
  12 + _pre-commit install --instal-hooks_
  13 +