Giter Club home page Giter Club logo

face_control's Introduction

Face Control

Gem Version Travis CI Coveralls

Run static analysis of pull requests in Bitbucket Server (formerly Stash) and comment on problems in added lines.

Currently supports RuboCop and CoffeeLint and also checks for TODOs and FIXMEs.

Inspired by Hound.

Installation

gem install face_control

You also need to have CoffeeLint installed and available in PATH.

Usage

face-control <project> <repository> <pull_request_id>

It's natural to run this on a continuous integration server (see “Example” below).

If you don't want to receive RuboCop comments with certain severity level, pass the severity in the --skip-severity option like so:

face-control --skip-severity convention <project> <repository> <pull_request_id>

Instead of --skip-severity you can use just -S.

You can also pass multiple severity levels as a comma-separated list:

face-control -S convention,refactor <project> <repository> <pull_request_id>

face-control uses the same configuration file (~/.stashconfig.yml) as the official Bitbucket Server Command Line Tools to connect to your Stash instance.

Example

Here's a Jenkins project setup as an example:

Source Code Management → Git → Repositories → Refspec:

+refs/pull-requests/*:refs/remotes/origin/pull-requests/*

It makes Jenkins fetch otherwise ignored Stash-created branches.

Source Code Management → Git → Branches to build → Branch Specifier:

origin/pull-requests/*/merge

Merge results of open non-conflicting pull requests.

Build → Execute shell → Command:

export PULL_REQUEST_ID=`echo $GIT_BRANCH | cut -d / -f 3`

gem install rubocop face_control
npm install -g coffeelint

face-control <project> <repository> $PULL_REQUEST_ID

Etymology

Face control in Wikipedia.

Sponsored by FunBox

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.