Skip to content

Commit 778ccd3

Browse files
committed
improve comment for non-dry code
1 parent 61ce185 commit 778ccd3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/src/traverse-get.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ bash_object.traverse-get() {
124124
local -n __current_object="$current_object_name"
125125

126126
if [ -n "${VERIFY_BASH_OBJECT+x}" ]; then
127-
# Ensure the 'final_value' is the same type as specified by the user (WET)
127+
# Ensure the 'final_value' is the same type as specified by the user (DUPLICATED)
128128
local __current_object_type=
129129
if ! __current_object_type="$(declare -p "$current_object_name" 2>/dev/null)"; then
130130
bash_object.util.die 'ERROR_INTERNAL' "The variable '$current_object_name' does not exist"
@@ -157,7 +157,7 @@ bash_object.traverse-get() {
157157
esac
158158
fi
159159

160-
# Ensure no circular references (WET)
160+
# Ensure no circular references (DUPLICATED)
161161
if [ "$old_current_object_name" = "$current_object_name" ]; then
162162
bash_object.util.die 'ERROR_SELF_REFERENCE' "Virtual object '$current_object_name' cannot reference itself"
163163
return

pkg/src/traverse-set.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ bash_object.traverse-set() {
321321
local -n __current_object="$current_object_name"
322322

323323
if [ -n "${VERIFY_BASH_OBJECT+x}" ]; then
324-
# Ensure the 'final_value' is the same type as specified by the user (WET)
324+
# Ensure the 'final_value' is the same type as specified by the user (DUPLICATED)
325325
local __current_object_type=
326326
if ! __current_object_type="$(declare -p "$current_object_name" 2>/dev/null)"; then
327327
bash_object.util.die 'ERROR_INTERNAL' "The variable '$current_object_name' does not exist"
@@ -354,7 +354,7 @@ bash_object.traverse-set() {
354354
esac
355355
fi
356356

357-
# Ensure no circular references (WET)
357+
# Ensure no circular references (DUPLICATED)
358358
if [ "$old_current_object_name" = "$current_object_name" ]; then
359359
bash_object.util.die 'ERROR_SELF_REFERENCE' "Virtual object '$current_object_name' cannot reference itself"
360360
return

0 commit comments

Comments
 (0)