Skip to content

Commit

Permalink
fix: RC010 should ignore components without parameters (#210)
Browse files Browse the repository at this point in the history
This fixes #209
  • Loading branch information
chasinglogic authored May 19, 2023
1 parent 1d2ddd8 commit 7b7c291
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/scripts/review.bats
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ setup() {
echo "Component names should be snake_cased. Please rename this file to use snake_case."
exit 1
fi

# Check if the file has parameters, if not skip counting.
HAS_PARAMETERS=$(yq 'has("parameters")' "$i")
if [[ "$HAS_PARAMETERS" == "false" ]]; then
continue
fi

# Check parameter keys on component for snake_case
ORB_COMPONENT_PARAMETERS_COUNT=$(yq '.parameters | keys | .[]' "$i")
for j in $ORB_COMPONENT_PARAMETERS_COUNT; do
Expand Down

0 comments on commit 7b7c291

Please sign in to comment.