Rubocop rules

This commit is contained in:
Nedim
2025-02-17 19:12:40 +01:00
parent ef01db0700
commit ee89170c32
42 changed files with 1043 additions and 267 deletions

29
.rubocop/rspec.yml Normal file
View File

@@ -0,0 +1,29 @@
# Cross-Repository conguration for Cops of the rubocop-rspec extension
RSpec:
Include:
- spec/**/*
RSpec/ExampleLength:
# Topic on how to structure the specs is whole separate thing. When
# we want to reduce let/before to improve redablity, then block length
# cannot stay low. See comments on "MultipleExpectations".
Enabled: false
RSpec/MultipleExpectations:
# Disable check for multiple Expectations in single specs. Forcing
# single assertion requires repeated specs, which might slow down
# legacy test suites. Also this forces heavey extraction into
# separate lets/before which itself causes readablity issues.
# Please refer to https://thoughtbot.com/blog/lets-not
Enabled: false
RSpec/MultipleMemoizedHelpers:
# Current legacy codebase uses a lot of helpers in RSpec. Please see comment
# for RSpec/MultipleExpectations why this is not a good thing. For now
# "lets" (hehe) relax this rule.
Max: 35
RSpec/NestedGroups:
# Legacy codebase. Relax for now to avoid heavy refactoring.
Max: 7