Repository navigation
Expand file tree
/
Copy path.rubocop.yml
More file actions
103 lines (79 loc) · 2.9 KB
/
Copy path.rubocop.yml
File metadata and controls
103 lines (79 loc) · 2.9 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
plugins:
- rubocop-minitest
AllCops:
TargetRubyVersion: 3.3
NewCops: enable
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/AccessModifierDeclarations:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ParameterLists:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Layout/LineLength:
Enabled: false
Naming/VariableNumber:
EnforcedStyle: normalcase
Severity: warning
Style/Documentation:
Enabled: false
Style/Lambda:
EnforcedStyle: literal
Minitest/MultipleAssertions:
Enabled: false
Minitest/UselessAssertion:
Enabled: false
# Dynamic snippets are code samples for documentation, not standalone Ruby files.
Style/FrozenStringLiteralComment:
Exclude:
- "dynamic-snippets/**/*"
# Indent hash elements 2 spaces from the start of the enclosing line rather than
# aligning with the preceding paren or bracket. Generated code nests hashes inside
# arrays and method calls; the "consistent" style is more readable there.
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Exclude:
- "dynamic-snippets/**/*"
# Match Layout/FirstHashElementIndentation: indent the first argument 2 spaces
# from the start of the method call's line, regardless of parenthesis position.
# Dynamic snippets are code samples, not standalone Ruby files; exclude them to
# keep this config symmetric with Layout/FirstHashElementIndentation above.
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent
Exclude:
- "dynamic-snippets/**/*"
# The generator emits non-idiomatic class names (e.g. Get_With_Query, JSON_)
# derived from IR type names whose wire form contains underscores or digits.
# Rubocop never auto-corrected these (naming cops have no autocorrecter), so
# disabling the cop keeps CI green without changing customer output. Fixing at
# source would rename public types across every existing SDK and therefore
# requires a ruby-v2 major-version bump with a generator migration.
Naming/ClassAndModuleCamelCase:
Enabled: false
# Integer literals are emitted unformatted (e.g. 1000000, not 1_000_000).
# Rubocop has an autocorrecter for this cop, but the only caller of integer
# emission is the dynamic-snippets path, which feeds customer-facing surfaces:
# (1) snippet markdown in reference docs, (2) dynamic-snippets/*.rb sample
# files. Neither is rubocop-gated (markdown isn't Ruby, dynamic-snippets/**/*
# is excluded above), so formatting integers there would change docs/dashboard
# output without any rubocop benefit. Disabling the cop keeps integers raw
# everywhere and avoids customer-visible diffs.
Style/NumericLiterals:
Enabled: false