-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.rubocop.yml
More file actions
104 lines (81 loc) · 2.3 KB
/
Copy path.rubocop.yml
File metadata and controls
104 lines (81 loc) · 2.3 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
plugins:
- rubocop-performance
- rubocop-rake
- rubocop-rspec
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: true
NewCops: enable
TargetRubyVersion: 2.7 # Support from Ruby 2.7+
Exclude:
- 'vendor/**/*'
- 'coverage/**/*'
- 'docs/**/*'
# Disable Gemspec cops (we keep deps in gemspec for compatibility)
Gemspec/RequiredRubyVersion:
Enabled: false
Gemspec/DuplicatedAssignment:
Enabled: false
Gemspec/DevelopmentDependencies:
Enabled: false
Gemspec/RubyVersionGlobalsUsage:
Enabled: false
# Limity długości linii
Layout/LineLength:
Max: 120
AllowedPatterns: ['^\\s*# ', '^\\s*#+', '^\\s*it .* do$']
# Długość metod
Metrics/MethodLength:
Max: 30
CountAsOne: ['array', 'hash', 'heredoc']
# Złożoność metod
Metrics/AbcSize:
Max: 30 # Increase for complex algorithms
# Cyklomatyczna złożoność
Metrics/CyclomaticComplexity:
Max: 10
# Długość klasy
Metrics/ClassLength:
Max: 300
# Module length
Metrics/ModuleLength:
Max: 200 # Allow larger modules for readability formulas
# Dokumentacja
Style/Documentation:
Enabled: false
# Frozen string literal
Style/FrozenStringLiteralComment:
Enabled: false
# Numerowane parametry
Naming/MethodParameterName:
MinNameLength: 1 # Allow single-letter params like 'n'
# Boolean parameters
Style/OptionalBooleanParameter:
Enabled: false # Allow boolean defaults for gem compatibility
# Trivial accessors
Style/TrivialAccessors:
Enabled: false # Allow custom setters with logic
# RSpec configuration
RSpec/ExampleLength:
Max: 50 # Allow longer examples for integration tests
RSpec/MultipleExpectations:
Max: 20 # Allow more expectations for complex tests
RSpec/LeakyConstantDeclaration:
Enabled: false # Allow constants in specs
RSpec/DescribeClass:
Enabled: false # Allow string descriptions
RSpec/ContextWording:
Enabled: false # Allow flexible context names
RSpec/SpecFilePathFormat:
Enabled: false # Allow textstat_spec.rb naming
RSpec/SpecFilePathSuffix:
Enabled: false # Allow textstat_spec.rb naming
RSpec/InstanceVariable:
Enabled: false # Allow @long_test in legacy specs
RSpec/BeEql:
Enabled: false # Allow eql for precise numeric comparisons
# Disable problematic constants-in-block warnings for specs
Lint/ConstantDefinitionInBlock:
Exclude:
- 'spec/**/*'