Я решил выложить его для того, чтобы не копипастить конфиги между проектами, а
Таким образом, я могу вносить правки в свою конфигурацию независимо от конкретного проекта.
# Available at: # * http://nondv.io/rubocop-config.html # * http://nondv.io/rubocop-config.yml AllCops: DisplayStyleGuide: true ExtraDetails: true UseCache: false Exclude: # These files are generated automaticaly - 'bin/**/*' - "db/schema.rb" # I think 80 is kinda obsolete. Nowdays we can easily read 120+ chars # But of course you should make your lines as short as possible, # I just dont see a reason why we should set max at 80. # # [Here](https://github.com/bbatsov/ruby-style-guide/issues/207) # people suggest to set it to 100 Metrics/LineLength: Max: 120 # To make it possible to copy or click on URIs in the code, we allow lines # contaning a URI to be longer than Max. AllowURI: true URISchemes: - http - https Metrics/BlockLength: Exclude: # Specs can be pretty large in terms of block length - 'spec/**/*' # I think in some cases 20-30 lines are ok # but in these cases you can just disable this cop in place Metrics/MethodLength: Max: 15 CountComments: false # Maybe it's a good idea to to exclude # controllers and helpers too Style/Documentation: Exclude: - 'db/**/*' Rails: Enabled: true # I presume that code under the lib/ # is not rails-specific Rails/Delegate: Exclude: - 'lib/**/*' # In case you have thin models # I suggest to disable this cop completely Rails/SkipsModelValidations: Exclude: - 'db/migrate/**/*' - 'spec/**/*' # I don't see why we should reject using unix syntax. # How the hell many people runs code on system where # slash is not a separator? # For what it worth, it's just more readable # so I think this cop should be enabled only in few cases Rails/FilePath: Enabled: false