mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
adds stub API docs in a single file (#46663)
* adds stub API docs in a single file
This commit is contained in:
parent
e1cfc2500c
commit
9764f32513
11 changed files with 118 additions and 612 deletions
|
@ -52,12 +52,6 @@ def main():
|
|||
'unknown-interpreted-text-role': '^Unknown interpreted text role "[^"]*".$',
|
||||
}
|
||||
|
||||
ignore_codes = [
|
||||
'reference-target-not-found',
|
||||
]
|
||||
|
||||
used_ignore_codes = set()
|
||||
|
||||
for line in lines:
|
||||
match = re.search('^(?P<path>[^:]+):((?P<line>[0-9]+):)?((?P<column>[0-9]+):)? (?P<level>WARNING|ERROR): (?P<message>.*)$', line)
|
||||
|
||||
|
@ -96,20 +90,8 @@ def main():
|
|||
else:
|
||||
code = 'error'
|
||||
|
||||
if code == 'not-in-toc-tree' and path.startswith('docs/docsite/rst/modules/'):
|
||||
continue # modules are not expected to be in the toc tree
|
||||
|
||||
if code in ignore_codes:
|
||||
used_ignore_codes.add(code)
|
||||
continue # ignore these codes
|
||||
|
||||
print('%s:%d:%d: %s: %s' % (path, lineno, column, code, message))
|
||||
|
||||
unused_ignore_codes = set(ignore_codes) - used_ignore_codes
|
||||
|
||||
for code in unused_ignore_codes:
|
||||
print('test/sanity/code-smell/docs-build.py:0:0: remove `%s` from the `ignore_codes` list as it is no longer needed' % code)
|
||||
|
||||
|
||||
def simplify_stdout(value):
|
||||
"""Simplify output by omitting earlier 'rendering: ...' messages."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue