Class: GazelleStyleguide::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/gazelle_styleguide/cli.rb

Overview

Command line tool for managing linter running and pre-commits

Constant Summary collapse

GENERIC_CHECKS =
'jshint, merge_conflict, json, yaml, coffeelint, scss_lint'
JAVA_CHECKS =
'checkstyle'
RUBY_CHECKS =
'rubocop, rspec_focus'

Instance Method Summary collapse

Instance Method Details

#initObject



14
15
16
17
18
# File 'lib/gazelle_styleguide/cli.rb', line 14

def init
  setup_git_config
  install_pre_commit
  setup_houndci
end

#lint(*files) ⇒ Object



23
24
25
26
27
28
# File 'lib/gazelle_styleguide/cli.rb', line 23

def lint(*files)
  require 'pre-commit'
  files = lint_files(files, options)

  PreCommit::Runner.new($stderr, files).run
end