diff --git a/scripts/verify-guidelines.sh b/scripts/verify-guidelines.sh index bccaeea..5bd17e4 100755 --- a/scripts/verify-guidelines.sh +++ b/scripts/verify-guidelines.sh @@ -367,84 +367,6 @@ if [ -d "docs/devices" ]; then fi fi -############################################################################### -## Check 14: Bruno API Tests Validation -############################################################################### -section "Documentation: Bruno API Tests" - -echo "Checking Bruno API test files..." -BRUNO_FILES=$(find bruno -name "*.bru" 2>/dev/null | wc -l) -if [ "$BRUNO_FILES" -gt 0 ]; then - success_msg "Found $BRUNO_FILES Bruno test files" -else - warning_msg "No Bruno test files found" -fi - -echo "Checking API documentation vs Bruno test coverage..." -if [ -d "docs/api" ]; then - API_DOC_COUNT=$(find docs/api -name "*.md" 2>/dev/null | wc -l) - if [ "$BRUNO_FILES" -ge "$API_DOC_COUNT" ]; then - success_msg "Bruno test coverage appears sufficient" - else - warning_msg "Bruno test files ($BRUNO_FILES) fewer than API docs ($API_DOC_COUNT)" - fi -fi - -############################################################################### -## Check 15: Recent Documentation Changes Analysis -############################################################################### -section "Documentation: Recent Changes Validation" - -echo "Checking recent commits for documentation compliance..." -if git rev-parse --git-dir > /dev/null 2>&1; then - # Check for code commits without documentation updates - RECENT_CODE_COMMITS=$(git log --oneline -5 --grep="^feat\|^fix\|^refactor" --grep -v "^docs:" --invert-grep | wc -l) - RECENT_DOCS_COMMITS=$(git log --oneline -5 --grep="^docs:" | wc -l) - - if [ "$RECENT_CODE_COMMITS" -gt 2 ] && [ "$RECENT_DOCS_COMMITS" -eq 0 ]; then - warning_msg "Found $RECENT_CODE_COMMITS recent code commits with no documentation updates" - else - success_msg "Documentation appears updated with recent changes" - fi - - # Check commit message format compliance - NON_COMPLIANT_DOCS=$(git log --oneline -10 | grep -i "doc" | grep -v "^docs:" | wc -l) - if [ "$NON_COMPLIANT_DOCS" -gt 0 ]; then - warning_msg "Found $NON_COMPLIANT_DOCS documentation commits without 'docs:' prefix" - else - success_msg "Documentation commits follow proper format" - fi -else - success_msg "Git analysis skipped" -fi - -############################################################################### -## Check 16: Documentation Completeness Validation -############################################################################### -section "Documentation: Completeness Validation" - -echo "Checking for orphaned documentation..." -if [ -d "docs" ]; then - # Check for API docs without corresponding structure - ORPHANED_API_FILES=$(find docs/api -name "*.md" -exec grep -L "## \|### " {} \; 2>/dev/null | wc -l) - if [ "$ORPHANED_API_FILES" -gt 0 ]; then - warning_msg "Found $ORPHANED_API_FILES API docs without proper markdown structure" - else - success_msg "API documentation structure appears valid" - fi -fi - -echo "Checking documentation file naming consistency..." -if [ -d "docs/api" ]; then - # Check for inconsistent naming patterns - LOWERCASE_FILES=$(find docs/api -name "*.md" | grep -E "[A-Z]" | wc -l) - if [ "$LOWERCASE_FILES" -gt 0 ]; then - warning_msg "Found $LOWERCASE_FILES API documentation files with uppercase letters" - else - success_msg "Documentation file naming appears consistent" - fi -fi - ############################################################################### ## Summary ###############################################################################