Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fe30f17
Fix mock_modules generated docs to avoid yaml parsing failures
santosh7676 Apr 25, 2026
b7ac71d
Fix mock_modules generated docs to avoid yaml parsing failures
santosh7676 Apr 25, 2026
f1fd20f
Revert "Fix mock_modules generated docs to avoid yaml parsing failures"
santosh7676 Apr 25, 2026
c3015fc
added white space
santosh7676 Apr 25, 2026
2acaac5
fix: update malformed block regex and bump pathspec upper bound (#5039)
rockygeekz May 6, 2026
719a59e
chore(deps): update all dependencies pep621 (#5012)
renovate[bot] May 6, 2026
04ee329
chore: sync agent skills from team-devtools
May 7, 2026
ed5e3f6
fix(security): update dependencies [SECURITY] - abandoned (#5014)
renovate[bot] May 7, 2026
e3e2850
chore: sync agent skills from team-devtools
May 8, 2026
d4740d3
chore: sync agent skills from team-devtools
May 8, 2026
748bed2
chore(deps): update all dependencies (#5011)
renovate[bot] May 8, 2026
0d9c610
chore(deps): update all dependencies (#5040)
renovate[bot] May 11, 2026
43fa88c
chore(deps): update all dependencies pep621 (#5041)
renovate[bot] May 11, 2026
4f1036e
fix: update _extends syntax for release-drafter v7 compatibility (#5043)
rockygeekz May 14, 2026
7648271
chore: sync agent skills from team-devtools
May 14, 2026
1bd179d
Merge branch 'ansible:main' into fix_mock_module_lint_issue
santosh7676 May 17, 2026
0b0c39e
Merge branch 'main' into fix_mock_module_lint_issue
santosh7676 May 18, 2026
d819854
Merge branch 'main' into fix_mock_module_lint_issue
santosh7676 May 23, 2026
47e5747
Merge branch 'ansible:main' into fix_mock_module_lint_issue
santosh7676 Jun 7, 2026
414e8f1
Merge branch 'ansible:main' into fix_mock_module_lint_issue
santosh7676 Jun 10, 2026
ceca619
Merge branch 'ansible:main' into fix_mock_module_lint_issue
santosh7676 Jun 12, 2026
d890f68
Remove offline parameter from run_ansible_lint call
santosh7676 Jun 13, 2026
9c62549
Merge branch 'main' into fix_mock_module_lint_issue
santosh7676 Jun 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/ansiblelint/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ class RC: # pylint: disable=too-few-public-methods
author:
- ansible-lint (@nobody)
'''
EXAMPLES = '''mocked'''
RETURN = '''mocked'''

EXAMPLES = '''\
- name: Mocked module example
{name}:
'''
RETURN = r\"\"\"
# \"\"\"

def main():
result = dict(
Expand Down
18 changes: 18 additions & 0 deletions test/test_mockings.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,21 @@ def test_options_collection_mocks() -> None:

opts.mock_modules = ["ns.coll.mod"]
assert opts.has_collection_mocks() is True


def test_mock_modules_stub_is_lintable(tmp_path: Path) -> None:
"""Ensure generated mock module docs do not trip yaml/doc parsing."""
(tmp_path / ".ansible-lint.yml").write_text(
"mock_modules:\n - some_ns.some_coll.some_module\n"
)
(tmp_path / "playbook.yml").write_text(
"---\n"
"- name: Test mocked module\n"
" hosts: localhost\n"
" gather_facts: false\n"
" tasks:\n"
" - name: Run mocked module\n"
" some_ns.some_coll.some_module:\n"
)
result = run_ansible_lint("playbook.yml", cwd=tmp_path)
assert result.returncode == 0, result.stdout
Loading