Socket
Book a DemoInstallSign in
Socket

rubocop-highlands

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rubocop-highlands

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

RuboCop Church of the Highlands

Church of the Highlands specific analysis for RuboCop.

It contains Church of the Highlands' internally used configuration for RuboCop and RuboCop RSpec. It also includes a handful custom rules that are not currently addressed by other projects.

Installation

Just put this in your Gemfile it depends on the appropriate version of rubocop and rubocop-rspec.

gem 'rubocop-highlands'

Usage

You need to tell RuboCop to load the Highlands extension. There are three ways to do this:

RuboCop configuration file

First Create a new file .rubocop_highlands.yml in the same directory as your .rubocop.yml this file should contain

require:
  - rubocop-highlands

Next add the following to .rubocop.yml or add before .rubocop_todo.yml in your existing inherit_from

inherit_from:
  - .rubocop_highlands.yml
  - .rubocop_todo.yml

You need to inherit .rubocop_highlands.yml from another file because of Rubocop order of operations. It runs inherit_from before require commands. If the configuration is not in a separate file you could potentially experience a bunch of warnings from .rubocop_todo.yml for non-existant Highlands rules.

Now you can run rubocop and it will automatically load the RuboCop Highlands cops together with the standard cops.

Command line

rubocop --require rubocop-highlands

The Cops

All cops are located under lib/rubocop/cop/highlands, and contain examples/documentation.

In your .rubocop.yml, you may treat the Church of the Highlands cops just like any other cop. For example:

Highlands/PhraseBundleKeys:
  Exclude:
    - spec/my_poorly_named_spec_file.rb

FAQs

Package last updated on 21 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.