ci/docs: stabilize validator (quote backticks; remove brittle code-block syntax check; use pre-increments)
This commit is contained in:
@@ -160,18 +160,15 @@ check_code_examples() {
|
||||
((++CHECKS))
|
||||
|
||||
# Find Kotlin code blocks and check basic syntax
|
||||
kotlin_blocks=$(grep -r "```kotlin" docs/ | wc -l)
|
||||
kotlin_blocks=$(grep -r '```kotlin' docs/ | wc -l)
|
||||
if [ "$kotlin_blocks" -gt 0 ]; then
|
||||
log_success "Found $kotlin_blocks Kotlin code examples"
|
||||
else
|
||||
log_warning "No Kotlin code examples found in documentation"
|
||||
fi
|
||||
|
||||
# Check for common syntax issues in code blocks
|
||||
syntax_issues=$(grep -A 10 "```kotlin" docs/**/*.md | grep -E "(fun|class|interface)" | grep -v ":" | head -5 || true)
|
||||
if [ -n "$syntax_issues" ]; then
|
||||
log_warning "Potential syntax issues in code examples (manual review recommended)"
|
||||
fi
|
||||
# Skipping code block syntax checks to avoid false positives in CI
|
||||
true
|
||||
}
|
||||
|
||||
# Check documentation completeness score
|
||||
@@ -214,7 +211,7 @@ link_check() {
|
||||
# Optional PlantUML render check
|
||||
plantuml_check() {
|
||||
log_info "Rendering PlantUML diagrams to validate syntax (if 'plantuml' is available)..."
|
||||
((CHECKS++))
|
||||
((++CHECKS))
|
||||
if command -v plantuml &> /dev/null; then
|
||||
# Render to SVG; failures should surface as non-zero exit
|
||||
# Note: This may produce SVGs next to the .puml files in CI workspace
|
||||
|
||||
Reference in New Issue
Block a user