Skip to content

zlx/Gitlab-Hound

Repository files navigation

Gitlab-Hound

Gitlab-Hound reviews Gitlab Merge Request for style guide violations.

Usage

  1. cp config/secrets.yml.example config/secrets.yml and change
  2. cp config/database.yml.example config/database.yml and change
  3. bundle install & bundle exec rake db:setup
  4. bin/rails s
  5. bundle exec sidekiq -C config/sidekiq.yml

Read gitlab-hound 发布了 for more detail

Language Support

  • Ruby
  • JavaScript
  • CoffeeScript
  • Java

Custom Style

Ruby

To enable Ruby style checking, add the following to .hound.yml in the root of your project

ruby:
  enabled: true

We uses RUBOCOP internally so you can configure Gitlab-Hound by adding a RUBOCOP CONFIG to your project and adding the following to .hound.yml in the root of your project.

ruby:
  enabled: true
  config_file: config/.rubocop.yml

CoffeeScript

To enable CoffeeScript style checking, add the following to .hound.yml in the root of your project

coffee_script:
  enabled: true

We use COFFEELINT internally so you can configure Gitlab-Hound by adding a COFFEELINT CONFIG to your project and adding the following to .hound.yml in the root of your project.

coffee_script:
  enabled: true
  config_file: config/.coffeelint.json

JavaScript

To enable JavaScript style checking, add the following to .hound.yml in the root of your project

java_script:
  enabled: true

We use JSHINT internally so you can configure Gitlab-Hound by adding a JSHINT CONFIG to your project and adding the following to .hound.yml in the root of your project.

java_script:
  enabled: true
  config_file: config/.jshint.json

Java

To enable Java style checking, add the following to .hound.yml in the root of your project

java:
  enabled: true

We use check styles internally so you can configure Gitlab-Hound by custom config to your project and adding the following to .hound.yml in the root of your project.

java:
  enabled: true
  config_file: config/.java_custom.xml

Default we use sun checks for style checking, you can download google checks or sun checks from here, and change them according to your team check style checks

Contributing

First, thank you for contributing!

Here a few guidelines to follow:

  1. Write tests
  2. Make sure the entire test suite passes locally
  3. Open a pull request on GitHub