Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do extra docs validation; explicitly disallow semantic markup in docs #165

Merged
merged 8 commits into from
Apr 16, 2023
Merged
5 changes: 4 additions & 1 deletion tests/sanity/extra/extra-docs.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"include_symlinks": false,
"prefixes": [
"docs/docsite/"
"docs/docsite/",
"plugins/",
"roles/"
],
"output": "path-line-column-message",
"requirements": [
"ansible-core",
"antsibull-docs"
]
}
11 changes: 8 additions & 3 deletions tests/sanity/extra/extra-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@

def main():
"""Main entry point."""
if not os.path.isdir(os.path.join('docs', 'docsite')):
return
p = subprocess.run(['antsibull-docs', 'lint-collection-docs', '.'], check=False)
env = os.environ.copy()
suffix = ':{env}'.format(env=env["ANSIBLE_COLLECTIONS_PATH"]) if 'ANSIBLE_COLLECTIONS_PATH' in env else ''
env['ANSIBLE_COLLECTIONS_PATH'] = '{root}{suffix}'.format(root=os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd()))), suffix=suffix)
p = subprocess.run(
['antsibull-docs', 'lint-collection-docs', '--plugin-docs', '--disallow-semantic-markup', '--skip-rstcheck', '.'],
env=env,
check=False,
)
if p.returncode not in (0, 3):
print('{0}:0:0: unexpected return code {1}'.format(sys.argv[0], p.returncode))

Expand Down