Skip to content
Snippets Groups Projects
.rubocop.yml 25.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • Performance/TimesMap:
      Enabled: false
    
    
    
    ##################### Rails ##################################
    
    
    # Enables Rails cops.
    Rails:
      Enabled: true
    
    # Enforces consistent use of action filter methods.
    
      Enabled: true
    
      EnforcedStyle: action
    
    # Checks the correct usage of date aware methods, such as `Date.today`,
    # `Date.current`, etc.
    
    Rails/Date:
      Enabled: false
    
    
    # Prefer delegate method for delegations.
    Rails/Delegate:
    
    # Prefer `find_by` over `where.first`.
    Rails/FindBy:
      Enabled: false
    
    # Prefer `all.find_each` over `all.find`.
    Rails/FindEach:
    
    # Prefer has_many :through to has_and_belongs_to_many.
    
      Enabled: true
    
    # Checks for calls to puts, print, etc.
    
    # Checks for incorrect grammar when using methods like `3.day.ago`.
    Rails/PluralizationGrammar:
      Enabled: false
    
    # Checks for `read_attribute(:attr)` and `write_attribute(:attr, val)`.
    
    # Checks the arguments of ActiveRecord scopes.
    
    # Checks the correct usage of time zone aware methods.
    # http://danilenko.org/2012/7/6/rails_timezones
    
    Rails/TimeZone:
      Enabled: false
    
    
    # Use validates :attribute, hash of validations.