mschuchard / linter-ansible-linting

ansible-lint linter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible lint is ignored when yaml linter is installed

whoamiUNIX opened this issue · comments

Current issue:
When you have installed yaml linter. I want both linter to be executed on my yaml/yml files. System automatically detec all yml files as yaml language. I must switch each file manually to ansible then do some temporary change on file to run ansible linter again(because it automatically execute yaml linter). This is not really friendly behavior.

What I must do is disable yaml language package in atom. Than all yml are detected as ansible language and linter is executed automatically.

But actually I want check yaml linter and also ansible as all files are yaml but also ansible releated because are written in ansible.

Expected behavior:
Best will be if is possible to run both linter at the same time. Not switch language or disable yaml linter.
Also do not understand why yaml linter take precedence if both are configured to detect yml files. Maybe because yaml linter was installed before ?

Is there better way how to workaround this problem ?

Before language-ansible or language-ansible-advanced was released and reliably recognized Ansible files, there was an option to lint all YAML. This was added about six years ago in 1.1.2, and then removed half a year later in 1.2.1. Atom should be recognizing your Ansible files correctly with the language package. if it is not, then you can quickly modify the language in the lower right of your window for the current open file. Atom will remember it thereafter.

You can also see how to do some global settings for languages: https://flight-manual.atom.io/using-atom/sections/basic-customization/

Well, it does not recognize ansible files correctly. If I open whole git repo as open folder in atom all ansible releated files are always marked as Yaml language.

Thanks for link I already explored this languages in and customization for each language and linter. Bot I did not found some logical workaround.
But this customization do not help as both linter in settings show that will detect .yml but only yaml linter take this files.

Do you have any other idea? Or I'm only one who want to use yaml and ansible linter on this files 🥲.

You can really either use the Atom language packages and Atom itself the way they are designed, or override them the way i specified (or perhaps modifying the language source config files). I never really had a problem with using them the way they are designed, so I am unsure why your language packages are not behaving as expected. I mostly have to deal with non-Ansible files being recognized as Ansible files which is apparently the opposite of your experience.

You may want to check with some kind of Atom editor group, or look into how the language packages work if you want to start hacking those.

Issue root cause in different Atom/Pulsar package; closing.