- Add
pronto
and other pronto runners undertest
group inGemfile
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.
- 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}"
- 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