Ansible lint support

Since the version 1.4 sonar python supports pylint report files ,

https://docs.sonarqube.org/display/PLUG/Pylint+Report

It would be great if sonar-python could add support for ansible lint report files.
Or maybe a new plugin that supports ansible playbooks and ansible lint reports.

Ansible lint is a tool that can analyse ansible playbooks and roles and can generate a pep8 compliant report.

ansible-lint my-playbook.yml -p

xxxxx/generic.yml:26: [EANSIBLE0002] Trailing whitespace
xxxxx/main.yml:34: [EANSIBLE0012] Commands should not change things if nothing needs doing
xxxx/main.yml:34: [EANSIBLE0013] Use shell only when shell functionality is required
xxxxx/main.yml:37: [EANSIBLE0002] Trailing whitespace
xxxx/main.yml:38: [EANSIBLE0012] Commands should not change things if nothing needs doing
xxxxx/main.yml:38: [EANSIBLE0013] Use shell only when shell functionality is required
xxx/tasks/main.yml:40: [EANSIBLE0002] Trailing whitespace
xxxx/main.yml:41: [EANSIBLE0012] Commands should not change things if nothing needs doing
test.yml:1: [EANSIBLE0002] Trailing whitespace
test.yml:2: [EANSIBLE0002] Trailing whitespace
test.yml:3: [EANSIBLE0002] Trailing whitespace
test.yml:4: [EANSIBLE0002] Trailing whitespace

The idea is to add support for this report file generated by ansible lint in sonarQube.

Regards,

Hi,

SonarQube 7.2 (out yesterday!) gives you the ability to feed these reports yourself: https://docs.sonarqube.org/display/SONAR/Generic+Issue+Data

HTH,
Ann

Hello Ann,

I’m curious about this new “Generic Issue Data” feature: is it able to import issues about source files which would, otherwise, not be considered at all by the SonarQube analysis, because they are not in one of the programming languages supported by an installed analysis plugin?

Thanks,
Thomas.

Hi Thomas,

Actually, yes. That’s one of the scenarios I tested specifically.

Ann

Thanks Ann for your reply, that’s great. Can’t wait to get this new feature in an LTS version.

You do know the intermediate versions are now supported, right? :smiley: