Skip to content

Commit

Permalink
setup Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
e2 committed Jan 15, 2015
1 parent f0a05f0 commit e8dc6f9
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
inherit_from: .rubocop_todo.yml

AllCops:
Exclude:
- Guardfile
- Rakefile
- guard-minitest.gemspec
- lib/guard/minitest/templates/Guardfile
79 changes: 79 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-01-15 02:26:14 +0100 using RuboCop version 0.28.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Enabled: false

# Offense count: 1
Lint/UselessAssignment:
Enabled: false

# Offense count: 4
Metrics/AbcSize:
Max: 23

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 190

# Offense count: 1
Metrics/CyclomaticComplexity:
Max: 11

# Offense count: 79
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 199

# Offense count: 4
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 20

# Offense count: 2
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 6

# Offense count: 1
Metrics/PerceivedComplexity:
Max: 11

# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/ClassAndModuleChildren:
Enabled: false

# Offense count: 3
Style/ClassVars:
Enabled: false

# Offense count: 10
Style/Documentation:
Enabled: false

# Offense count: 1
Style/EachWithObject:
Enabled: false

# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/FormatString:
Enabled: false

# Offense count: 2
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Enabled: false

# Offense count: 1
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
Style/Next:
Enabled: false
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ group :development do
gem 'gems', require: false
gem 'netrc', require: false
gem 'octokit', require: false

gem 'guard-rubocop', require: false
end

group :test do
Expand Down
15 changes: 11 additions & 4 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
guard :rspec, cmd: 'bundle exec rspec' do
watch(%r{^spec/(.*)_spec\.rb$})
watch(%r{^(lib/.*/)?([^/]+)\.rb$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
group :development, halt_on_fail: true do
guard :rspec, cmd: 'bundle exec rspec' do
watch(%r{^spec/(.*)_spec\.rb$})
watch(%r{^(lib/.*/)?([^/]+)\.rb$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
end

guard :rubocop do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
end

0 comments on commit e8dc6f9

Please sign in to comment.