forked from watir/watir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
165 lines (140 loc) · 4.69 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# Offense count: 144
# Cop supports --auto-correct.
# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
Layout/EmptyLineBetweenDefs:
Exclude:
- 'lib/watir/elements/html_elements.rb'
- 'lib/watir/elements/svg_elements.rb'
# Offense count: 2
# Cop supports --auto-correct.
Layout/EmptyLines:
Exclude:
- 'lib/watir/elements/html_elements.rb'
- 'lib/watir/elements/svg_elements.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
Layout/EmptyLinesAroundModuleBody:
Exclude:
- 'lib/watir/elements/html_elements.rb'
- 'lib/watir/elements/svg_elements.rb'
# Offense count: 85
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
# Offense count: 1
Lint/HandleExceptions:
Exclude:
- 'lib/watirspec.rb'
Lint/UnifiedInteger:
Exclude:
- 'lib/watir/locators/element/selector_builder.rb'
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
- 'support/doctest_helper.rb'
- 'watir.gemspec'
- 'Rakefile'
## Configuration parameters: CountComments.
Metrics/ModuleLength:
Exclude:
- 'lib/watir/elements/html_elements.rb'
- 'lib/watir/elements/svg_elements.rb'
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 18
Exclude:
- 'lib/watir/locators/element/selector_builder.rb'
- 'lib/watir/locators/element/selector_builder/xpath.rb'
- 'lib/watir/locators/element/selector_builder/regexp_disassembler.rb'
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 93
Exclude:
- 'lib/watir/capabilities.rb'
- 'lib/watir/locators/element/matcher.rb'
- 'lib/watir/locators/element/selector_builder.rb'
- 'lib/watir/locators/element/selector_builder/xpath.rb'
- 'lib/watir/browser.rb'
- 'lib/watir/window.rb'
- 'lib/watir/elements/element.rb'
- 'lib/watir/elements/select.rb'
- 'lib/watir/generator/base/spec_extractor.rb'
- 'lib/watir/element_collection.rb'
Metrics/PerceivedComplexity:
Max: 10
Metrics/CyclomaticComplexity:
Max: 8
Exclude:
- 'lib/watir/locators/element/selector_builder.rb'
Metrics/AbcSize:
Max: 21
Exclude:
- 'lib/watir/locators/element/selector_builder.rb'
- 'lib/watir/locators/element/selector_builder/regexp_disassembler.rb'
- 'lib/watir/locators/element/selector_builder/xpath.rb'
- 'lib/watir/locators/element/locator.rb'
- 'lib/watir/generator/base/generator.rb'
- 'lib/watir/generator/base/visitor.rb'
- 'spec/locator_spec_helper.rb'
# TODO: fix with Watir 7
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Exclude:
- 'lib/watir/wait.rb'
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 120
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining
Style/CommentedKeyword:
Enabled: false
Style/DoubleNegation:
Enabled: false
## Configuration parameters: AllowedVariables.
Style/GlobalVars:
AllowedVariables:
- $browser
Style/RegexpLiteral:
Exclude:
- 'spec/watirspec/selector_builder/element_spec.rb'
### Cop supports --auto-correct.
### Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
## SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'lib/watir/elements/html_elements.rb'
- 'lib/watir/elements/svg_elements.rb'
Style/MethodCallWithoutArgsParentheses:
Enabled: false
# TODO: I can't tell if this applies
## Configuration parameters: EnforcedStyle.
## SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
Exclude:
- 'lib/watir/browser.rb'
- 'lib/watir/locators/text_field/selector_builder/xpath.rb'
- 'lib/watir/window.rb'
Style/Documentation:
Enabled: false
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
Style/FrozenStringLiteralComment:
Enabled: false
Naming/FileName:
Exclude:
- 'lib/watir-webdriver.rb'