Skip to content

Commit

Permalink
change warn-level for rubocop checker
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaseger committed Sep 18, 2014
1 parent 4d64233 commit eed8777
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 25 deletions.
11 changes: 1 addition & 10 deletions .codeqa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,5 @@
'pkg/*']

config.enabled_checker.delete 'CheckRubySyntax'
config.enabled_checker << 'RubocopLint'
config.enabled_checker << 'RubocopFormatter'

config.rubocop_formatter_cops << 'AlignHash'
config.rubocop_formatter_cops << 'SignalException'
config.rubocop_formatter_cops << 'DeprecatedClassMethods'
config.rubocop_formatter_cops << 'RedundantBegin'
config.rubocop_formatter_cops << 'RedundantSelf'
config.rubocop_formatter_cops << 'RedundantReturn'
config.rubocop_formatter_cops << 'CollectionMethods'
config.enabled_checker << 'Rubocop'
end
20 changes: 10 additions & 10 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
notification :tmux,
:display_message => true,
:timeout => 3 # in seconds
:display_message => true,
:timeout => 3 # in seconds

# ignore /doc/

group :red_green_refactor, halt_on_fail: true do
guard 'rspec', cmd: "bundle exec rspec --color --format p", all_after_pass: true do
group :red_green_refactor, :halt_on_fail => true do
guard 'rspec', :cmd => 'bundle exec rspec --color --format p', :all_after_pass => true do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
watch(%r{^spec/support/(.+)\.rb}) { 'spec' }
watch(%r{^spec/fixtures/(.+)}) { 'spec' }
watch(%r{^lib/(.+)\.rb$}){ |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb'){ 'spec' }
watch(%r{^spec/support/(.+)\.rb}){ 'spec' }
watch(%r{^spec/fixtures/(.+)}){ 'spec' }
end

guard :rubocop, cli: %w(--display-cop-names --auto-correct) do
guard :rubocop, :cli => %w(--display-cop-names --auto-correct) do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
watch(%r{(?:.+/)?\.rubocop\.yml$}){ |m| File.dirname(m[0]) }
end
end
2 changes: 1 addition & 1 deletion lib/codeqa/checkers/rubocop_full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def check
private

def config_args
%w(--auto-correct --fail-level warning)
%w(--auto-correct)
end

def default_args
Expand Down
2 changes: 1 addition & 1 deletion lib/codeqa/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run
attr_reader :results

def failures
@failures ||= @results.reject{ |checker| checker.success? }
@failures ||= @results.reject(&:success?)
end

def success?
Expand Down
4 changes: 2 additions & 2 deletions lib/codeqa/utils/erb_sanitizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def make_compiler(trim_mode)
class Compiler < ERB::Compiler
# Compiles an ERB template into Ruby code. Returns an array of the code
# and encoding like ["code", Encoding].
# rubocop:disable Style/CyclomaticComplexity
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
def compile(s)
enc = s.encoding
raise ArgumentError, "#{enc} is not ASCII compatible" if enc.dummy?
Expand Down Expand Up @@ -79,7 +79,7 @@ def compile(s)
out.close
[out.script, enc]
end
# rubocop:enable Style/CyclomaticComplexity
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
end
end
end
2 changes: 1 addition & 1 deletion lib/codeqa/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Codeqa
VERSION = '0.4.1'
VERSION = '0.4.2'
end

0 comments on commit eed8777

Please sign in to comment.