-
-
Notifications
You must be signed in to change notification settings - Fork 259
/
.rubocop.yml
67 lines (55 loc) · 1.68 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
inherit_from: .rubocop_todo.yml
inherit_mode:
merge:
- Exclude
require:
- rubocop-thread_safety
- rubocop-rspec
- rubocop-rails
- rubocop-rake
- rubocop-performance
AllCops:
NewCops: enable
Exclude:
- db/schema.rb # autogenerated
- vendor/**/* # not our code
- bin/**/* # autogenerated
- node_modules/**/*
# we allow exiting from rake tasks
Rails/Exit:
Exclude:
- lib/tasks/**/*
# Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
Rails/Output:
Exclude:
- lib/tasks/**/* # rake tasks need output
- app/jobs/**/* # heroku scheduler support output# Offense count: 4
RSpec/MessageSpies:
EnforcedStyle: receive
Metrics/BlockLength:
Exclude:
- spec/**/*
- config/**/*
- db/migrate/*
- lib/tasks/**/*
# perceived complexity cop forces us to avoid inlining code, even though
# inlining code makes code easier to reason with and less error prone
Metrics/PerceivedComplexity:
Enabled: false
# cyclomatic complexity cop forces us to avoid inlining code, even though
# inlining code makes code easier to reason with and less error prone
Metrics/CyclomaticComplexity:
Enabled: false
# we will never change existing migrations, but we want rubocop
# to fail for old migrations. So this isn't in the .todo file but thel
Rails/CreateTableWithTimestamps:
Exclude:
- 'db/migrate/20151210035820_init_schema.rb'
- 'db/migrate/20160211061631_add_chapter_leaderships_again.rb'
- 'db/migrate/20160312224628_create_organization_leaderships.rb'
# explicit arguments are easier to understand / read without needing to read the docs
Style/RedundantArgument:
Enabled: false
Style/Documentation:
Exclude:
- spec/**/*