Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/funbox/face_control
Comment on problems in added lines of pull requests in Atlassian Bitbucket Server (formerly Stash)
https://github.com/funbox/face_control
bitbucket-server coffeelint continuous-integration rubocop static-analysis
Last synced: about 1 month ago
JSON representation
Comment on problems in added lines of pull requests in Atlassian Bitbucket Server (formerly Stash)
- Host: GitHub
- URL: https://github.com/funbox/face_control
- Owner: funbox
- License: gpl-2.0
- Created: 2015-03-12T19:08:41.000Z (almost 10 years ago)
- Default Branch: develop
- Last Pushed: 2020-10-26T19:51:56.000Z (about 4 years ago)
- Last Synced: 2024-10-27T05:43:25.675Z (about 2 months ago)
- Topics: bitbucket-server, coffeelint, continuous-integration, rubocop, static-analysis
- Language: Ruby
- Homepage: https://rubygems.org/gems/face_control
- Size: 81.1 KB
- Stars: 7
- Watchers: 12
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Face Control
[![Gem Version](https://img.shields.io/gem/v/face_control.svg)](https://rubygems.org/gems/face_control)
[![Travis CI](https://img.shields.io/travis/com/funbox/face_control)](https://travis-ci.com/github/funbox/face_control)
[![Coveralls](https://img.shields.io/coveralls/funbox/face_control.svg)](https://coveralls.io/github/funbox/face_control)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
```bash
gem install face_control
```You also need to have CoffeeLint installed and available in `PATH`.
## Usage
```bash
face-control
```It's natural to run this on a continuous integration server (see “[Example](#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:```bash
face-control --skip-severity convention
```Instead of `--skip-severity` you can use just `-S`.
You can also pass multiple severity levels as a comma-separated list:
```bash
face-control -S convention,refactor
````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:_
```bash
export PULL_REQUEST_ID=`echo $GIT_BRANCH | cut -d / -f 3`gem install rubocop face_control
npm install -g coffeelintface-control $PULL_REQUEST_ID
```## Etymology
[Face control][] in Wikipedia.
[![Sponsored by FunBox](https://funbox.ru/badges/sponsored_by_funbox_centered.svg)](https://funbox.ru)
[Hound]: https://houndci.com
[Bitbucket Server]: https://www.atlassian.com/software/bitbucket/server
[Bitbucket Server Command Line Tools]: https://bitbucket.org/atlassian/bitbucket-server-cli
[RuboCop]: http://batsov.com/rubocop/
[CoffeeLint]: http://www.coffeelint.org
[Jenkins]: http://jenkins-ci.org
[Face control]: http://en.wikipedia.org/wiki/Face_control