John Epperson
Ruby Developer since 2007
John Epperson
A Look at the tools and the practice
def some_method
do_something
endJoe: 'Fix your spacing. It looks terrible'
Rails:
Enabled: true
AllCops:
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'berks-cookbooks/**/*'
- 'bundler_stubs/**/*'
- 'bin/**/*'
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'tmp/**/*'
Metrics/LineLength:
Max: 120
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma
Include or Exclude Files
Enable/Disable or configure individual cops
> rubocop -D> rubocop -aD --only Style/StringLiteralsRunning multiple tools on commit diffs
> pronto run> pronto run --indexRun pronto on the diff between your current branch and master
Run pronto on the diff between your index (staged files) and master
group :development, :test do
gem 'pronto'
gem 'pronto-brakeman', require: false
gem 'pronto-rails_best_practices', require: false
gem 'pronto-reek', require: false
gem 'pronto-rubocop', require: false
endGemfile
machine:
environment:
PULL_REQUEST_URL: ${CI_PULL_REQUEST}
PULL_REQUEST_ID: ${CI_PULL_REQUEST##*/}
RUBOCOP_CONFIG: ./.rubocop.yml
test:
override:
- bundle exec pronto run -f github_status github_pr -c origin/mastercircle.yml
all:
exclude:
- 'spec/**/*'
github:
slug: kirillian/sbm
api_endpoint: https://api.github.com/
web_endpoint: https://github.com/
max_warnings: 150
verbose: falsehttp://slides.com/kirillian/deck
kirillian
By John Epperson