Created
March 3, 2018 20:09
-
-
Save Nondv/409efbe67c50c824647f41b2cf18fe47 to your computer and use it in GitHub Desktop.
My rubocop config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment