Skip to content

Commit

Permalink
Merge pull request #17 from jonas054/bugfix2
Browse files Browse the repository at this point in the history
The configuration property should be "Enabled", not "Enable".
  • Loading branch information
bbatsov committed Jan 17, 2013
2 parents aab4f65 + ada44e4 commit 618625f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/cli.rb
Expand Up @@ -47,7 +47,7 @@ def run(args = ARGV)
cop.correlations = correlations
config = $options[:config] || config_from_dotfile(File.dirname(file))
cop_config = config[cop_klass.name.split('::').last] if config
cop_klass.enabled = cop_config.nil? || cop_config['Enable']
cop_klass.enabled = cop_config.nil? || cop_config['Enabled']
cop.inspect(file, source, tokens, sexp)
total_offences += cop.offences.count
report << cop if cop.has_report?
Expand Down
8 changes: 4 additions & 4 deletions spec/rubocop/cli_spec.rb
Expand Up @@ -72,10 +72,10 @@ module Report
File.open('example1.rb', 'w') { |f| f.puts 'x = 0 ' }
File.open('rubocop.yml', 'w') do |f|
f.puts('Encoding:',
' Enable: false',
' Enabled: false',
'',
'Indentation:',
' Enable: false')
' Enabled: false')
end
begin
return_code = cli.run(['-c', 'rubocop.yml', 'example1.rb'])
Expand All @@ -97,10 +97,10 @@ module Report
File.open('example_src/example1.rb', 'w') { |f| f.puts 'x = 0 ' }
File.open('example_src/.rubocop.yml', 'w') do |f|
f.puts('Encoding:',
' Enable: false',
' Enabled: false',
'',
'Indentation:',
' Enable: false')
' Enabled: false')
end
begin
return_code = cli.run(['example_src/example1.rb'])
Expand Down

0 comments on commit 618625f

Please sign in to comment.