Skip to content

Commit fc4b688

Browse files
committed
fix: Resolve ShellCheck warnings in test script
Separate variable declaration from assignment in validate_mcp_metadata to avoid masking return values and resolve ShellCheck warnings.
1 parent 294cf1c commit fc4b688

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

modules/ai-agents/examples/test-mcp-examples.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ validate_mcp_metadata() {
6363
fi
6464

6565
# Check for required MCP fields
66-
local has_enabled=$(grep -c "enabled: true" "$file" || echo 0)
67-
local has_description=$(grep -c "description:" "$file" || echo 0)
66+
local has_enabled
67+
local has_description
68+
has_enabled=$(grep -c "enabled: true" "$file" || echo 0)
69+
has_description=$(grep -c "description:" "$file" || echo 0)
6870

6971
if [[ $has_enabled -eq 0 ]]; then
7072
echo -e "${YELLOW}WARNING${NC} (mcp.enabled not set to true)"

0 commit comments

Comments
 (0)