Sha256: 76e42a503698a4ff017a548faa8915f17bbaf177328a3666fae8a40b6e22fe13

Contents?: true

Size: 1.75 KB

Versions: 13

Compression:

Stored size: 1.75 KB

Contents

# Simplycop

Provides standard shared rubocop configuration for Simply Business applications. No more copying `.rubocop.yml`, no more out-of-sync configuration files. Yay!

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'simplycop'

```

Then install gems by executing:

    $ bundle install

Put following lines at the beginning of your `rubocop.yml` file:

```yaml
inherit_gem:
  simplycop: .simplycop.yml

AllCops:
  Exclude:
    - 'vendor/**/*'
```

* If you are implementing this in rails project and have rspec , you probably want the standard rails, rspec, and performance cops. you can include this by adding:

```yaml
inherit_gem:
  simplycop:
    - .simplycop.yml
    - .simplycop_performance.yml
    - .simplycop_rails.yml
    - .simplycop_rspec.yml
```

## Usage

Run Rubocop as you would usually do, i.e.

    $ bundle exec rubocop

or from your continuous integration tool.

## Guidances

* If you are implementing this in a non-rails project, you probably don't want or need the rails cops. In case they cause problems, you can exclude them using:
```yaml
Rails:
  Enabled: false
```
* When adding rubocop and simplycop to a legacy project, you might want to initially disable some of the rules.

## Security Cops
- CheckForVulnerableCode

This cop was built to identify possible Rails vulnerable code.
Its purpose is to raise an awareness of the finding.
When an offence was raised, please seek for help and guidance from application security team.

IMPORTANT:
This cop must be enabled at all times, if you need to disable it please check with AppSec team first.

Example of vulnerable code:

```ruby
class BooksController < ApplicationController
  caches_page :show
end
```
Vulnerability Details: https://nvd.nist.gov/vuln/detail/CVE-2020-8159

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
simplycop-1.14.6 docs/index.md
simplycop-1.14.5 docs/index.md
simplycop-1.14.3 docs/index.md
simplycop-1.14.2 docs/index.md
simplycop-1.14.1 docs/index.md
simplycop-1.14.0 docs/index.md
simplycop-1.13.11 docs/index.md
simplycop-1.13.9 docs/index.md
simplycop-1.13.8 docs/index.md
simplycop-1.13.7 docs/index.md
simplycop-1.13.5 docs/index.md
simplycop-1.13.1 docs/index.md
simplycop-1.13.0 docs/index.md