-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.rubocop.yml
More file actions
123 lines (108 loc) · 2.91 KB
/
.rubocop.yml
File metadata and controls
123 lines (108 loc) · 2.91 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
require:
- standard
- rubocop-minitest
- rubocop-performance
- rubocop-sorbet
# - rubocop-rails
inherit_gem:
standard: config/base.yml
AllCops:
NewCops: enable
SuggestExtensions:
rubocop-rails: false
Exclude:
- '**/node_modules/**/*'
- public/**/*
- vendor/**/*
- tmp/**/*
- coverage/**/*
- coverage_rails/**/*
- docs/public/**/*
- docspring/**/*
- convox_racks_terraform/**/*
- terraform-aws-logstruct/**/*
- terraform-example/**/*
- terraform-provider-logstruct/**/*
- sorbet/rbi/dsl/**/*
- sorbet/rbi/gems/**/*
- sorbet/rbi/annotations/**/*
- rails_test_app/logstruct_test_app/**/*
- bin/**/* # Exclude bundler-generated binstubs
Layout/MultilineHashKeyLineBreaks:
Enabled: true
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
Bundler/DuplicatedGem:
Enabled: false # ignore duplicated gem errors because we have duplicated gems for testing
# We use UTC for all timestamps, no timezones required for logs
# Rails/TimeZone:
# Enabled: false
# # We don't use ApplicationMailer in this gem
# Rails/ApplicationMailer:
# Enabled: false
# # Not a Rails app
# Rails/RakeEnvironment:
# Enabled: false
# Rails/Output:
# Enabled: false
# Rails/NegateInclude:
# Enabled: false
# Rails/RefuteMethods:
# Enabled: false
Performance/OpenStruct:
Exclude:
- test/**/*
# Testing
# ------------------------------------------------------------------------------
Minitest/MultipleAssertions:
Enabled: false
Minitest/ReturnInTestMethod:
Enabled: false
# Sorbet RBI Rules
# ------------------------------------------------------------------------------
Style/SingleLineMethods:
Exclude:
- sorbet/**/*
- lib/log_struct/log/interfaces/**/*
- '**/*_interface.rb'
Style/EmptyMethod:
Exclude:
- sorbet/**/*
- lib/log_struct/log/interfaces/**/*
- '**/*_interface.rb'
# Ban typed: false everywhere
Sorbet/FalseSigil:
Enabled: false
# Require typed: strict for all files except test files
Sorbet/StrictSigil:
Enabled: true
Exclude:
- 'test/**/*'
- 'sorbet/**/*'
- 'rails_test_app/**/*.rb'
- 'scripts/**/*.rb'
SuggestedStrictness: strict
Sorbet/ForbidUntypedStructProps:
Exclude:
- 'lib/log_struct/log/plain.rb'
Sorbet/ConstantsFromStrings:
Exclude:
- 'scripts/generate_log_fields_json.rb'
# Require typed: true for test files
Sorbet/TrueSigil:
Enabled: true
Include:
- 'test/**/*.rb'
- 'rails_test_app/**/*.rb'
- 'scripts/**/*.rb'
Exclude:
- 'scripts/test.rb' # Has dynamic code that Sorbet can't handle
- 'test/log_struct/formatter_test.rb' # Metaprogramming-heavy, uses typed: false
- 'test/log_struct/rails_boot_banner_silencer_test.rb' # Metaprogramming-heavy, uses typed: false
SuggestedStrictness: true
# Don't try to validate typing on generated Sorbet RBI files
Sorbet:
Enabled: true
Exclude:
- 'sorbet/**/*.rbi'
- 'rails_test_app/templates/**/*.rb'