ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
339 stars 78 forks source link

ansible-playbook --syntax-check seems to be not handled #894

Open sebastianreloaded opened 1 year ago

sebastianreloaded commented 1 year ago

Summary

The extension doesn't show anything for errors while executing ansible-playbook --syntax-check, in contrast to executing ansible-lint directly.

The extension works fine as long as there are not syntax errors in playbooks: I will get the same errors in vscode and commandline. But if i have syntax errors in my ansible playbook i get nothing in vscode, but a "syntax-check[specific]" error on commandline (all other errors won't show up, but the syntax error will).

Extension version

2.0.58

VS Code version

1.78.2

Ansible Version

ansible [core 2.12.7]
  config file = /Users/admin/projects/it-operations/aws-operations/provisioning/ansible/ansible.cfg
  configured module search path = ['/Users/admin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/admin/projects/it-operations/aws-operations/.awsoperations/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/admin/projects/it-operations/aws-operations/provisioning/ansible
  executable location = /Users/admin/projects/it-operations/aws-operations/.awsoperations/bin/ansible
  python version = 3.9.16 (main, Dec  7 2022, 10:16:11) [Clang 14.0.0 (clang-1400.0.29.202)]
  jinja version = 3.1.2
  libyaml = True

OS / Environment

OS: MacOSX Darwin x64 22.4.0 13.3 (22E252) ansible-lint 6.16.1 using ansible-core:2.12.7 ruamel-yaml:None ruamel-yaml-clib:None

Relevant log output

[Trace - 00:15:45] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///Users/admin/projects/it-operations/aws-operations/provisioning/ansible/playbooks/nexus3.yml",
    "diagnostics": []
}

diagnostics is just empty ..
ssbarnea commented 10 months ago

Please include a minimal example of playbook for reproducing this bug.