Przeglądaj źródła

Add a warning header to each rst file

To tell potential contributors that they should direct their work to the XML template and not the auto-generated reST
Rémi Verschelde 9 lat temu
rodzic
commit
e5389288dd
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      doc/tools/makerst.py

+ 4 - 0
doc/tools/makerst.py

@@ -349,6 +349,10 @@ def make_rst_class(node):
 
 
 	f = open("class_"+name.lower() + '.rst', 'wb')
 	f = open("class_"+name.lower() + '.rst', 'wb')
 
 
+	# Warn contributors not to edit this file directly
+	f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n")
+	f.write(".. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.\n\n")
+
 	f.write(".. _class_"+name+":\n\n")
 	f.write(".. _class_"+name+":\n\n")
 	f.write(make_heading(name, '='))
 	f.write(make_heading(name, '='))