Skip to content

Commit e2f6c72

Browse files
lmeyerovclaude
andcommitted
fix(docs): fail Docker build if .rstcheck.cfg is missing
Changed build-docs.sh to exit with error if .rstcheck.cfg is not found in expected locations rather than silently creating a default config. This ensures configuration issues are caught early and makes builds more predictable and debuggable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 37d4a17 commit e2f6c72

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

docs/docker/build-docs.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ if [ -f "/.rstcheck.cfg" ]; then
1111
elif [ -f "/docs/.rstcheck.cfg" ]; then
1212
CONFIG_FILE="/docs/.rstcheck.cfg"
1313
else
14-
# Create minimal config if not found
15-
CONFIG_FILE="/tmp/.rstcheck.cfg"
16-
cat > "$CONFIG_FILE" << 'EOF'
17-
[rstcheck]
18-
ignore_roles = meth,class,ref,doc,attr,mod,func,data,const,exc,obj,any
19-
ignore_directives = automodule,autoclass,autofunction,toctree,literalinclude,code-block
20-
ignore_messages = (Hyperlink target "[^"]*" is not referenced\.$)
21-
report_level = ERROR
22-
EOF
14+
echo "ERROR: .rstcheck.cfg not found in expected locations (/ or /docs/)"
15+
echo "The Docker build should have copied docs/.rstcheck.cfg to /docs/.rstcheck.cfg"
16+
exit 1
2317
fi
2418

2519
# Run rstcheck on all RST files, fail on errors

0 commit comments

Comments
 (0)