Skip to content

Commit e3a378b

Browse files
committed
fix: fix Rubocop Metrics/ClassLength offense (refactor Git::Status)
This refactoring streamlines the Git::Status class by decomposing its responsibilities, resulting in cleaner, more focused components: * `StatusFile`: The inner data responsibilities was moved to its own class. * `StatusFileFactory`: A new private factory was created to encapsulate all the logic for executing git commands and parsing their output into StatusFile objects. I think the result is more readable and maintainable code.
1 parent d70c800 commit e3a378b

File tree

2 files changed

+111
-261
lines changed

2 files changed

+111
-261
lines changed

.rubocop_todo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-07-06 05:52:16 UTC using RuboCop version 1.77.0.
3+
# on 2025-07-06 20:05:03 UTC using RuboCop version 1.77.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 21
9+
# Offense count: 3
1010
# Configuration parameters: CountComments, CountAsOne.
1111
Metrics/ClassLength:
1212
Max: 1032

0 commit comments

Comments
 (0)