mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 01:33:34 +08:00
px_process_module_doc: add --no-validation flag
and make sure the command failed if there's a validation error.
This commit is contained in:
@@ -63,9 +63,9 @@ def main():
|
||||
metavar="DIRECTORY",
|
||||
help="Markdown output directory"
|
||||
" (default DIRECTORY: .)")
|
||||
parser.add_argument('--no-validation', action='store_true', help="do not fail if consistency checks fail")
|
||||
parser.add_argument('-v', '--verbose', action='store_true', help="verbose output")
|
||||
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Check for valid command
|
||||
@@ -84,8 +84,13 @@ def main():
|
||||
if not scanner.ScanDir(args.src_path, parser):
|
||||
sys.exit(1)
|
||||
|
||||
if not args.no_validation and parser.HasValidationFailure():
|
||||
print("Error: validation failed")
|
||||
sys.exit(1)
|
||||
|
||||
module_groups = parser.GetModuleGroups()
|
||||
|
||||
|
||||
# Output to Markdown/HTML tables
|
||||
if args.markdown:
|
||||
out = markdownout.MarkdownTablesOutput(module_groups)
|
||||
|
||||
Reference in New Issue
Block a user