mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 09:35:45 +02:00
Do extra docs validation; explicitly disallow semantic markup in docs (#165)
* Do extra docs validation. Explicitly disallow semantic markup in docs. * Forgot to add new requirement. * Improve test. * TEMP - make CI fail. * Remove unnecessary import. * Make sure ANSIBLE_COLLECTIONS_PATH is set. * Revert "TEMP - make CI fail." This reverts commit 445c56e7e1bcd844be59f1df9df00a9c8334ff55. * Make sure sanity tests from older Ansible versions don't complain.
This commit is contained in:
parent
e5eff0b90e
commit
dd1e48c388
2 changed files with 12 additions and 4 deletions
|
@ -1,10 +1,13 @@
|
|||
{
|
||||
"include_symlinks": false,
|
||||
"prefixes": [
|
||||
"docs/docsite/"
|
||||
"docs/docsite/",
|
||||
"plugins/",
|
||||
"roles/"
|
||||
],
|
||||
"output": "path-line-column-message",
|
||||
"requirements": [
|
||||
"ansible-core",
|
||||
"antsibull-docs"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -13,9 +13,14 @@ import subprocess
|
|||
|
||||
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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue