diff --git a/tests/sanity/extra/extra-docs.json b/tests/sanity/extra/extra-docs.json index c2e612e5f7..9a28d174fd 100644 --- a/tests/sanity/extra/extra-docs.json +++ b/tests/sanity/extra/extra-docs.json @@ -1,10 +1,13 @@ { "include_symlinks": false, "prefixes": [ - "docs/docsite/" + "docs/docsite/", + "plugins/", + "roles/" ], "output": "path-line-column-message", "requirements": [ + "ansible-core", "antsibull-docs" ] } diff --git a/tests/sanity/extra/extra-docs.py b/tests/sanity/extra/extra-docs.py index 6731049231..c636beb08e 100755 --- a/tests/sanity/extra/extra-docs.py +++ b/tests/sanity/extra/extra-docs.py @@ -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))