lib/rubocop/git/style_checker.rb in rubocop-git2-0.1.4 vs lib/rubocop/git/style_checker.rb in rubocop-git2-0.1.5

- old
+ new

@@ -1,8 +1,7 @@ -module RuboCop::Git -# ref. https://github.com/thoughtbot/hound/blob/d2f3933/app/models/style_checker.rb -class StyleChecker +class RuboCop::Git::StyleChecker + # ref. https://github.com/thoughtbot/hound/blob/d2f3933/app/models/style_checker.rb def initialize(modified_files, rubocop_options, config_file, custom_config = nil) @modified_files = modified_files @@ -11,11 +10,14 @@ @custom_config = custom_config end def violations file_violations = @modified_files.map do |modified_file| - FileViolation.new(modified_file.absolute_path, offenses(modified_file)) + RuboCop::Git::FileViolation.new( + modified_file.absolute_path, + offenses(modified_file) + ) end file_violations.select do |file_violation| file_violation.offenses.any? end @@ -33,11 +35,12 @@ modified_file.relevant_line?(violation.line) end end def style_guide - @style_guide ||= StyleGuide.new(@rubocop_options, - @config_file, - @custom_config) + @style_guide ||= RuboCop::Git::StyleGuide.new( + @rubocop_options, + @config_file, + @custom_config + ) end -end end