-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
98 lines (81 loc) · 2.87 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
90
91
92
93
94
95
96
97
98
inherit_from: .rubocop_todo.yml
require: rubocop-rspec
AllCops:
TargetRubyVersion: 2.4
# Do not prefer various `%` ways of specifying things in Ruby - I
# think these are less clear and unnecessary
Style/PercentLiteralDelimiters:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/WordArray:
Enabled: false
# Do not preder trailing commas in multi-line hash/array literals - better as
# when something is added to a literal the previous last line does not also
# need to be changed, which also makes diffs smaller
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma
# Do not require documentation for top-level classes or modules - seems
# unnecessary for the project at the moment.
Style/Documentation:
Enabled: false
# Do not limit block length - fails for any significant RSpec test file.
Metrics/BlockLength:
Enabled: false
# Ignore the number of methods in FilePath, the class is design to
# collect all the file path methods.
Metrics/ModuleLength:
Exclude:
- src/file_path.rb
# We trust the YAML we're loading, so don't warn if we don't use
# `YAML.safe_load` instead of `YAML.load`.
Security/YAMLLoad:
Enabled: false
# I don't care if we use the compact way of declaring classes and modules.
Style/ClassAndModuleChildren:
Enabled: false
# If we need a boolean value, having it actually be a boolean rather than
# checking if it is nil or not is clearer IMO, and `!!value` is a standard way
# to get this.
Style/DoubleNegation:
Enabled: false
# Turn off Heredoc delimiter check. EOF is used extensively and will
# continue to be used
Naming/HeredocDelimiterNaming:
Enabled: false
# The status has a race condition when killing bash commands. Thus
# it should ignore no process errors
Lint/HandleExceptions:
Exclude:
- src/status/job.rb
# Quite a few specs are nested 4 deep, however the default is 3
RSpec/NestedGroups:
Max: 4
# The following specs have super long blocks which will not be
# refactored
RSpec/ExampleLength:
Exclude:
- spec/configurator_spec.rb
- spec/slow/**/*
- spec/integration/**/*
# It isn't feasible to set up spies in the following specs as they
# are coupled to the original implementation
RSpec/MessageSpies:
Exclude:
- spec/configurator_spec.rb
# Requiring that the subject is explicitly named in order to use it
# doesn't isn't that much clearer IMO.
RSpec/NamedSubject:
Enabled: false
# Allow RSpec to suppress Output using a global variable. It already used a global
# variable previously and it will not be used in the installed version of
# Metalware. It is however useful to turn the Output off in the specs
# TODO: Remove spec/commander_extensions_spec.rb from this list eventually
# It needs to be included here as the array is overridding the todo list
Style/GlobalVars:
Exclude:
- spec/commander_extensions_spec.rb
- spec/spec_helper.rb
- spec/spec_utils.rb