Giter VIP home page Giter VIP logo

pronto's Introduction

Pronto

Code Climate Build Status Gem Version Dependency Status Inline docs

Pronto runs analysis quickly by checking only the relevant changes. Created to be used on pull requests, but also works locally and integrates with GitLab. Perfect if want to find out quickly if branch introduces changes that conform to your styleguide, are DRY, don't introduce security holes and more.

Pronto demo

Usage

Pronto runs the checks on a diff between the current HEAD and the provided commit-ish (default is master).

Local Changes

You can run Pronto locally. First, install Pronto and the runners you want to use:

gem install pronto
gem install pronto-rubocop

Then navigate to the repository you want to run Pronto on, and:

git checkout feature/branch
pronto run # Pronto runs against master by default

Just run pronto without any arguments to see what Pronto is capable of.

GitHub Integration

You can run Pronto as a step of your CI builds and get the results as comments on GitHub commits using GithubFormatter or GithubPullRequestFormatter.

Add Pronto runners you want to use to your Gemfile:

gem 'pronto'
gem 'pronto-rubocop', require: false
gem 'pronto-scss', require: false

or gemspec file:

s.add_development_dependency 'pronto'
s.add_development_dependency 'pronto-rubocop'
s.add_development_dependency 'pronto-scss'

Set the GITHUB_ACCESS_TOKEN environment variable to OAuth token that has access to the repository.

Then just run it:

GITHUB_ACCESS_TOKEN=token pronto run -f github -c origin/master

or, if you want comments to appear on pull request diff, instead of commit:

GITHUB_ACCESS_TOKEN=token PULL_REQUEST_ID=id pronto run -f github_pr -c origin/master

As an alternative, you can also set up a rake task:

Pronto.gem_names.each { |gem_name| require "pronto/#{gem_name}" }

formatter = Pronto::Formatter::GithubFormatter.new # or GithubPullRequestFormatter
Pronto.run('origin/master', '.', formatter)

GitLab Integration

You can run Pronto as a step of your CI builds and get the results as comments on GitLab commits using GitlabFormatter.

note: this requires at least GitLab v7.5.0

Add Pronto runners you want to use to your Gemfile:

gem 'pronto'
gem 'pronto-rubocop', require: false
gem 'pronto-scss', require: false

or gemspec file:

s.add_development_dependency 'pronto'
s.add_development_dependency 'pronto-rubocop'
s.add_development_dependency 'pronto-scss'

Set the GITLAB_API_ENDPOINT environment variable to your API endpoint URL. If you are using Gitlab.com's hosted service your endpoint will be https://gitlab.com/api/v3. Set the GITLAB_API_PRIVATE_TOKEN environment variable to your Gitlab private token which you can find in your account settings.

Then just run it:

GITLAB_API_ENDPOINT="https://gitlab.com/api/v3" GITLAB_API_PRIVATE_TOKEN=token pronto run -f gitlab -c origin/master

As an alternative, you can also set up a rake task:

Pronto.gem_names.each { |gem_name| require "pronto/#{gem_name}" }

formatter = Pronto::Formatter::GitlabFormatter.new
Pronto.run('origin/master', '.', formatter)

Runners

Pronto can run various tools and libraries, as long as there's a runner for it. Currently available:

pronto's People

Contributors

mmozuras avatar jeroenj avatar andyw8 avatar edk avatar siebertm avatar rrrene avatar dankohn avatar garysweaver avatar gabealmer avatar jamiew avatar mvz avatar tadast avatar sanemat avatar

Watchers

Hiroshi SHIBATA avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.