Skip to content
RuboCop style rules for GOV.UK's Ruby projects
Ruby
Branch: master
Clone or download
theseanything Merge pull request #6 from alphagov/update-readme
Fix rubocop config file reference in README
Latest commit 6d99b5f Nov 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
.gitignore
.rubocop.yml Refactor config to seperate ruby and rails rules Nov 6, 2019
.ruby-version
CHANGELOG.md
Gemfile
Jenkinsfile
LICENSE.md Add MIT License and Crown Copyright notice Apr 25, 2017
README.md
Rakefile
rubocop-govuk.gemspec Version bump to 1.0.0 Nov 6, 2019

README.md

RuboCop GOV.UK

This repository provides common RuboCop rules for use with GOV.UK Ruby projects to comply with our style guides.

Installation

Add rubocop-govuk to your Gemfile and then run bundle install:

# Gemfile
gem 'rubocop-govuk'

Inherit rules from the gem by adding the following to your project's RuboCop config:

# .rubocop.yml
inherit_gem:
  rubocop-govuk: 
    - config/default.yml

or if you also need Rails specific rules:

# .rubocop.yml
inherit_gem:
  rubocop-govuk: 
    - config/default.yml
    - config/rails.yml

Usage

Run RuboCop:

bundle exec rubocop
You can’t perform that action at this time.