MCPcopy Create free account
hub / github.com/ElementsProject/elements / lint_missing_argument_documentation

Function lint_missing_argument_documentation

test/lint/check-doc.py:31–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30
31def lint_missing_argument_documentation():
32 used = check_output(CMD_GREP_ARGS, shell=True).decode('utf8').strip()
33 docd = check_output(CMD_GREP_DOCS, shell=True).decode('utf8').strip()
34
35 args_used = set(re.findall(re.compile(REGEX_ARG), used))
36 args_docd = set(re.findall(re.compile(REGEX_DOC), docd)).union(SET_DOC_OPTIONAL)
37 args_need_doc = args_used.difference(args_docd)
38 args_unknown = args_docd.difference(args_used)
39
40 print("Args used : {}".format(len(args_used)))
41 print("Args documented : {}".format(len(args_docd)))
42 print("Args undocumented: {}".format(len(args_need_doc)))
43 print(args_need_doc)
44 print("Args unknown : {}".format(len(args_unknown)))
45 print(args_unknown)
46
47 assert 0 == len(args_need_doc), "Please document the following arguments: {}".format(args_need_doc)
48
49
50def lint_missing_hidden_wallet_args():

Callers 1

mainFunction · 0.85

Calls 2

formatMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected