Skip to content

Instantly share code, notes, and snippets.

@abhinavmsra
Last active March 6, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhinavmsra/a7dd9250adc029e085b3ce9adeafb628 to your computer and use it in GitHub Desktop.
Save abhinavmsra/a7dd9250adc029e085b3ce9adeafb628 to your computer and use it in GitHub Desktop.
Pronto Setup
  1. Add pronto and other pronto runners under test group in Gemfile
  group :test do
    gem 'pronto'
    gem 'pronto-rubocop', require: false # analyzes ruby code 
    gem 'pronto-flay', require: false # analyzes code for structural similarities
    gem 'pronto-brakeman', require: false # analyzes code for security vulnerabilities
    gem 'pronto-dirty_words', require: false # analyzes code for  Seven Dirty Words
    gem 'pronto-rails_best_practices', require: false # code metric tool for Rails projects 
    gem 'pronto-rails_schema', require: false # checks schema for pending migrations. 
    gem 'pronto-reek', require: false # code smell detector for Ruby 
    gem 'pronto-scss', require: false # runner for SCSS-Lint
  end

Note Some runners might require a separate config file to run analysis. Refer to respective analyzers wiki.

  1. Add .pronto.yml file at the root of codebase or if the CI allows configuration files, it can be created there too.
github:
  slug: REPO_ACCOUNT_NAME/REPO
  access_token: xxxxxxxxxx
max_warnings: 150
verbose: false
format: "[%{runner}]-[%{level}]: %{msg}"
  1. Following command runs Pronto checks, it should be added in the CI build
if [ $BRANCH_NAME != "master" ] && [ $BRANCH_NAME != "development" ]; then bundle exec pronto run -f github_pr -c origin/development; fi

In .travis.yml this can be placed under script key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment