This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.rubocop.yml
89 lines (73 loc) · 2.39 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
AllCops:
TargetRubyVersion: 2.3
Exclude:
# This file is autogenerated by Rails, we shouldn't worry about changing its
# format.
- 'db/schema.rb'
# Some people may choose to install gems into vendor/bundle/, which will
# break Rubocop. Ignore it.
- 'vendor/**/*'
- 'bundler_cache/**/*'
# Disable line length checks
Metrics/LineLength:
Enabled: false
# Disable class length checks
Metrics/ClassLength:
Enabled: false
# Disable method length checks
Metrics/MethodLength:
Enabled: false
# Disable block length checks
Metrics/BlockLength:
Enabled: false
# Disable Assignment Branch Condition size check
Metrics/AbcSize:
Enabled: false
# Disable check for methods requiring more than 5 parameters.
Metrics/ParameterLists:
Enabled: false
# Disable check for cyclomatic complexity. While we'll certainly have to
# refactor our code as we code, it's just a nuisance right now.
Metrics/CyclomaticComplexity:
Enabled: false
# Same deal as above, except for perceived complexity.
Metrics/PerceivedComplexity:
Enabled: false
# Disable for built-in Rails scripts in bin/ because it breaks them.
Style/MixinUsage:
Exclude:
- 'bin/**/*'
# Don't worry about having top-level class documentation comments for every
# class. It'd be a nuisance to do this on all of the generated Rails classes.
Documentation:
Enabled: false
# Exclude all tests from this check beacuse this makes a core part of Rspec's
# DSL ugly.
#
# Example: the following test would be invalid with this check enabled.
#
# expect { User.create }.to change { User.count }.by 1
#
Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*'
# Run those Rails cops!
Rails:
Enabled: true
# Disable preference for has_many :through over has_and_belongs_to_many. They're
# different types of relationships and Rails attaches different helper methods
# for each, not sure why Rubocop has a preference for this by default.
Rails/HasAndBelongsToMany:
Enabled: false
# Disable inverse_of check because it's automatically implicitly added in recent
# Rails versions
Rails/InverseOf:
Enabled: false
# Don't force :dependent to be specified beacuse :nullify is a sane default.
Rails/HasManyOrHasOneDependent:
Enabled: false
# Don't force usage of ApplicationRecord instead of ActiveRecord::Base in Rails
# migrations because migrations shouldn't depend on application code.
Rails/ApplicationRecord:
Exclude:
- 'db/migrate/**'