mschuchard / linter-ansible-linting

ansible-lint linter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update for ansible-lint 6+

EHEX-schildt opened this issue · comments

There are some errors with a newer ansible-lint version:

  • the plugin complains that my ansible-lint is not "new" enough "ansible-lint >= 5.0.0" My ansible-lint --version: ansible-lint 6.8.0 using ansible 2.13.4
  • also we get a error caused by the new ansible-lint feedback (Passed with basic profile, 1/5 star rating: 0 failure(s), 2 warning(s) on 1 files. with exit code 0)

detailed error message in atom:
An unexpected error with ansible, ansible-lint, linter-ansible-linting, atom, linter, and/or your playbook/role has occurred.
Passed with production profile: 0 failure(s), 0 warning(s) on 1 files.

6.8.0 did make a backwards incompatible change to the usage, and that impact on the version check was fixed in 0dfd3d6. You can patch in the fix by downloading the lib/main.js and placing it into your package locally.

I will have to look into the second issue since CI is broken because APM is broken.

Fixtures and unit tests are behaving as expected, so you would need to provide a MCVE for the second issue for reproduction purposes.

Hi
the 6.8.0 patch works fine.

MCVE:

  1. install python venv with:
    ansible
    ansible-lint
    yamllint
  2. configure linter-ansible-linting
  "linter-ansible-linting":
     timeout: 60
     useProjectConfig: true
  1. wirte a simpel role: roles/test-linter-ansible-linting/tasks/main.yml
---
- name: Test linter-ansible-linting
  ansible.builtin.debug:
    msg: All Good
  1. Open the File in Atom will couse this Error i think it is only visual:
    image
    If i have a issue in this file (name: test [lowcase start]) the plugin works fine and shows the warning without error top right.

That MCVE produces the following display output for me:

Warning Ansible-Lint yml:2:3: syntax-check[specific]: 'ansible.builtin.debug' is not a valid attribute for a Play 1:1 spec/fixtures/foo.yml

which is interesting because the line and col info is being displayed in the excerpt, and not in the line and col info. Therefore, I will act on that issue, but your issue does not seem to be reproducible.

Second issue with line and col info capturing fixed in 9695d99. This actually is being captured in current fixture, so no new fixture necessary.