-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy path.reek.yml
More file actions
34 lines (32 loc) · 1.43 KB
/
.reek.yml
File metadata and controls
34 lines (32 loc) · 1.43 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
# Reek configuration
#
# InstanceVariableAssumption is disabled for Unit class because it uses a mix of
# eager initialization (in initialize_instance_variables) and lazy initialization
# (using defined? checks) for its instance variables. This is an intentional design
# pattern where some variables are initialized immediately and others are computed
# on first access for performance reasons.
#
# See: https://github.com/troessner/reek/blob/master/docs/Instance-Variable-Assumption.md
#
# RepeatedConditional warnings are excluded for Unit class where the same condition
# needs to be checked in different methods for different purposes:
#
# - base?: Checked in to_base (early return), update_base_scalar (base unit calculation),
# and unit_signature_vector (recursion avoidance). Each serves a distinct purpose.
#
# - other: Type checking in operator overloading methods using case statements.
# This is a standard Ruby pattern for implementing polymorphic operators.
#
# - prefix_value: Checked in to_base (numerator/denominator processing) and parse
# (string parsing). These are completely different contexts.
#
# - temperature?: Checked in multiple methods (to_base, temperature_scale, arithmetic
# operators, power/root) where each serves a different purpose (conversion, formatting,
# validation, etc.).
detectors:
InstanceVariableAssumption:
exclude:
- RubyUnits::Unit
RepeatedConditional:
exclude:
- RubyUnits::Unit