mschuchard / linter-ansible-linting

ansible-lint linter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting linter-ansible-linting working with yml files by default

johnroach opened this issue · comments

Hi,

I really like the idea of having an Ansible linter. However the issue I am facing is that the files never get linted by default. I need to switch from yml to ansible in languages for each yml file. Is there a way to specify the linter to work for all yml files?

I could put a user option in so that atom executes ansible-linter on yaml files in addition to ansible files. I would think a good idea would also be to ask the 'language-ansible' maintainer if he/she would provide an option to automatically prefer to detect all yaml files as ansible. That would automatically detect your yaml as ansible inside atom as well as automatically execute ansible-lint on them and kill two birds with one stone.

If you open that issue with language-ansible please mention me so I receive notifications.

I have the same problem, 95% of the YAML files I edit are Ansible ones.

Is the original request that *.yaml be ignored by the ansible-lint linter if not specified as Ansible but that *.yml is linted even if not specified as Ansible? I just went and checked language-yaml and I would guess language-ansible cannot conflict with its extensions because it is a core package.

If that is the original request I can put in an option for it in the next version.

Feature added in 742d94e. Note that I had to add the entire yaml grammar scope and could not just add the .yml extension.