1#!/usr/bin/env python3 2# 3# Arm SCP/MCP Software 4# Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. 5# 6# SPDX-License-Identifier: BSD-3-Clause 7 8""" 9Check for missing documentation. 10This script runs "make -f Makefile.cmake doc" and checks for any 11output on stderr, where the Doxygen tool outputs any warnings 12about undocumented components 13""" 14 15import sys 16import subprocess 17 18 19def main(): 20 print("Checking for undocumented code...") 21 22 result = subprocess.Popen( 23 "make -f Makefile.cmake doc", 24 shell=True, 25 stdout=subprocess.DEVNULL, 26 stderr=subprocess.PIPE) 27 28 (stdout, stderr) = result.communicate() 29 30 if stderr: 31 print(stderr.decode()) 32 return 1 33 34 print("The codebase is fully documented.") 35 return 0 36 37 38if __name__ == '__main__': 39 sys.exit(main()) 40