-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
77 lines (66 loc) · 1.99 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
require: rubocop-rails
# Ignore some folders completely
AllCops:
NewCops: enable
Exclude:
- .buildkite/**/*
- bin/**/*
- shared/**/*
- log/**/*
- public/**/*
- remote/**/*
- tmp/**/*
- db/schema.rb
# Yes, keep lines shorter than 80 characters.
# Yes, keep names short and succinct.
# But, no need to zealous about it.
Layout/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
# Personally, I'd rather read status: 200 than status: :ok ¯\_(ツ)_/¯
Rails/HttpStatus:
Enabled: false
# Forcing ASCII is restricts comments to English only. Many international teams
# write comments in their native languages (e.g. Chinese, French, ...) and are
# not helped by this rule. UTF-8 is widely supported today. Let's forget ASCII.
Style/AsciiComments:
Enabled: false
# Forcing top-level class documentation comments seems like a good idea,
# but it's tidious and against the idea of "convention over configuration".
# For example when you read `class ProductsController` all Rails developers know
# what that is and how it works. It's conventional and baked in, no need to
# force comments on such a class.
Style/Documentation:
Enabled: false
# Frozen string literals are default behaviour since Rails 3.
# There is no use case for this outdated cop?
Style/FrozenStringLiteralComment:
Enabled: false
# Has been causing bugs, temporarily disabling.
Style/PercentLiteralDelimiters:
Enabled: false
# Until today I have never needed to know created_at and updated_at. ¯\_(ツ)_/¯
# Let's only add them when we have a good reason.
Rails/CreateTableWithTimestamps:
Enabled: false
# Because warning asked to add these...
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true