Skip to content

Instantly share code, notes, and snippets.

@arkadiybutermanov
Last active August 29, 2015 14:00
Show Gist options
  • Save arkadiybutermanov/11369895 to your computer and use it in GitHub Desktop.
Save arkadiybutermanov/11369895 to your computer and use it in GitHub Desktop.
Generate brakeman/rubocop ignore files

Brakeman setup:

Create ignore file, please name it .brakeman-ignore

bin/brakeman --interactive-ignore

Add to script/ci

bin/brakeman --quiet --skip-libs --exit-on-warn --ignore-config=.brakeman-ignore

Rubocop setup:

Generate rubocop-todo.yml with ignored offences:

bin/rubocop --auto-gen-config

Inherit it in rubocop.yml

inherit_from: rubocop-todo.yml

AllCops:
  RunRailsCops: true
  Excludes:
    - bin/**
    - db/**
    - config/**
    - lib/templates/**
    - lib/generators/**
    - vendor/**

Documentation:
  Description: 'Document classes and non-namespace modules.'
  Enabled: false

SymbolArray:
  Description: 'Use %i or %I for arrays of symbols.'
  Enabled: true

AlignParameters:
  Enabled: false

# LineLength:
#   Description: 'Limit lines to 120 characters.'
#   Max: 120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment