Module: RubocopPr::EnvironmentChecker::GitStatus

Defined in:
lib/rubocop_pr/environment_checker.rb

Overview

Check that we do not have any un-commited changes

Class Method Summary collapse

Class Method Details

.callObject



19
20
21
22
# File 'lib/rubocop_pr/environment_checker.rb', line 19

def call(*)
  return true if git_status.empty?
  raise 'You have un-commited changes in this branch'
end

.git_statusObject



24
25
26
# File 'lib/rubocop_pr/environment_checker.rb', line 24

def git_status
  RubocopPr::Git.new.status
end