Changeset View
Changeset View
Standalone View
Standalone View
test/lint/check-doc.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
# Copyright (c) 2019 The Bitcoin developers | # Copyright (c) 2019 The Bitcoin developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
''' | ''' | ||||
This checks if all command line args are documented. | This checks if all command line args are documented. | ||||
Return value is 0 to indicate no error. | Return value is 0 to indicate no error. | ||||
Author: @MarcoFalke | Author: @MarcoFalke | ||||
''' | ''' | ||||
from subprocess import check_output | from subprocess import check_output | ||||
from pprint import PrettyPrinter | from pprint import PrettyPrinter | ||||
import re | import re | ||||
import sys | |||||
FOLDER_SRC = 'src' | FOLDER_SRC = 'src' | ||||
FOLDER_TEST = 'src/test/' | FOLDER_TEST = 'src/test/' | ||||
PATH_SRC = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_SRC) | PATH_SRC = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_SRC) | ||||
PATH_TEST = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_TEST) | PATH_TEST = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_TEST) | ||||
GREP_ARGS_REGEX = r"egrep -rIzo '((Is|Get)(Bool)?Arg(s|Set)?\((\s)*)\"\-[^\"]+?\"' {}" | GREP_ARGS_REGEX = r"egrep -rIzo '((Is|Get)(Bool)?Arg(s|Set)?\((\s)*)\"\-[^\"]+?\"' {}" | ||||
CMD_GREP_ARGS_SRC = GREP_ARGS_REGEX.format(PATH_SRC) | CMD_GREP_ARGS_SRC = GREP_ARGS_REGEX.format(PATH_SRC) | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |