mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-04-27 14:57:44 +00:00
run rubocop as part of default CI tests
This commit is contained in:
parent
29e49c1ed7
commit
52830de1fb
2 changed files with 38 additions and 3 deletions
33
.rubocop.yml
Normal file
33
.rubocop.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
Metrics/BlockNesting:
|
||||||
|
Max: 2
|
||||||
|
|
||||||
|
Metrics/LineLength:
|
||||||
|
AllowURI: true
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Metrics/MethodLength:
|
||||||
|
CountComments: false
|
||||||
|
Max: 10
|
||||||
|
|
||||||
|
Metrics/ParameterLists:
|
||||||
|
Max: 4
|
||||||
|
CountKeywordArgs: true
|
||||||
|
|
||||||
|
Style/CollectionMethods:
|
||||||
|
PreferredMethods:
|
||||||
|
map: 'collect'
|
||||||
|
reduce: 'inject'
|
||||||
|
find: 'detect'
|
||||||
|
find_all: 'select'
|
||||||
|
|
||||||
|
Style/Documentation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/DoubleNegation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/SpaceInsideHashLiteralBraces:
|
||||||
|
EnforcedStyle: no_space
|
||||||
|
|
||||||
|
Style/TrailingComma:
|
||||||
|
EnforcedStyleForMultiline: 'comma'
|
||||||
8
Rakefile
8
Rakefile
|
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env rake
|
|
||||||
|
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
Bundler::GemHelper.install_tasks
|
Bundler::GemHelper.install_tasks
|
||||||
|
|
||||||
|
|
@ -7,7 +5,11 @@ require 'rspec/core/rake_task'
|
||||||
RSpec::Core::RakeTask.new(:spec)
|
RSpec::Core::RakeTask.new(:spec)
|
||||||
|
|
||||||
task test: :spec
|
task test: :spec
|
||||||
task default: :spec
|
|
||||||
|
require 'rubocop/rake_task'
|
||||||
|
RuboCop::RakeTask.new
|
||||||
|
|
||||||
require 'yard'
|
require 'yard'
|
||||||
YARD::Rake::YardocTask.new
|
YARD::Rake::YardocTask.new
|
||||||
|
|
||||||
|
task default: [:spec, :rubocop]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue