Permalink
Browse files

Add some files.

  • Loading branch information...
pocke committed Jun 7, 2016
1 parent 77c38df commit 871537532474a102de13bad1e16a1c5067a3045a
View
@@ -0,0 +1,3 @@
Lint/ExceptionCall:
Description: '例外送出の際のカンマ忘れを指摘します'
Enabled: true
No changes.
@@ -1,7 +1,8 @@
require 'rubocop'
require "rubocop/exception_call/version"
require 'rubocop/exception_call/inject'
module Rubocop
module ExceptionCall
# Your code goes here...
end
end
RuboCop::ExceptionCall::Inject.defaults!
# cops
require 'rubocop/cop/lint/exception_call'
@@ -0,0 +1,23 @@
# This file is copied from rubocop-rspec
require 'yaml'
module RuboCop
module ExceptionCall
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
# bit of our configuration.
module Inject
DEFAULT_FILE = File.expand_path(
'../../../../config/default.yml', __FILE__
)
def self.defaults!
path = File.absolute_path(DEFAULT_FILE)
hash = ConfigLoader.send(:load_yaml_configuration, path)
config = Config.new(hash, path)
puts "configuration from #{DEFAULT_FILE}" if ConfigLoader.debug?
config = ConfigLoader.merge_with_default(config, path)
ConfigLoader.instance_variable_set(:@default_configuration, config)
end
end
end
end

0 comments on commit 8715375

Please sign in to comment.