Skip to content

Commit 7b7c291

Browse files
authored
fix: RC010 should ignore components without parameters (#210)
This fixes #209
1 parent 1d2ddd8 commit 7b7c291

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/scripts/review.bats

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ setup() {
201201
echo "Component names should be snake_cased. Please rename this file to use snake_case."
202202
exit 1
203203
fi
204+
205+
# Check if the file has parameters, if not skip counting.
206+
HAS_PARAMETERS=$(yq 'has("parameters")' "$i")
207+
if [[ "$HAS_PARAMETERS" == "false" ]]; then
208+
continue
209+
fi
210+
204211
# Check parameter keys on component for snake_case
205212
ORB_COMPONENT_PARAMETERS_COUNT=$(yq '.parameters | keys | .[]' "$i")
206213
for j in $ORB_COMPONENT_PARAMETERS_COUNT; do

0 commit comments

Comments
 (0)