[ci skip] Add note that this change may break SetOption() + ninja usage with fix
[scons.git] / bin / docs-validate.py
blob06a7906b6a8d669ab41f1d69ae14b17db2ae8451
1 #!/usr/bin/env python
3 # SPDX-License-Identifier: MIT
5 # Copyright The SCons Foundation
7 # Searches through the whole source tree and validates all
8 # documentation files against our own XSD in docs/xsd.
10 import sys,os
11 import SConsDoc
13 if __name__ == "__main__":
14 if len(sys.argv) > 1:
15 if SConsDoc.validate_all_xml((sys.argv[1],)):
16 print("OK")
17 else:
18 print("Validation failed! Please correct the errors above and try again.")
19 sys.exit(1)
20 else:
21 if SConsDoc.validate_all_xml(
23 'SCons',
24 os.path.join('doc', 'design'),
25 os.path.join('doc', 'developer'),
26 os.path.join('doc', 'man'),
27 os.path.join('doc', 'python10'),
28 os.path.join('doc', 'reference'),
29 os.path.join('doc', 'user'),
32 print("OK")
33 else:
34 print("Validation failed! Please correct the errors above and try again.")
35 sys.exit(1)