Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Can't get .yml files to be checked by linter #146

Open
johnpetersjr opened this issue Oct 17, 2018 · 5 comments
Open

Can't get .yml files to be checked by linter #146

johnpetersjr opened this issue Oct 17, 2018 · 5 comments

Comments

@johnpetersjr
Copy link

johnpetersjr commented Oct 17, 2018

I'm a bit lost here, please bear with me since I'm new to atom/package/lint installs...

This is working great for me for my files that end in .yaml, but I cannot get it trigger alerts on my files that end in .yml.

Can you help point me to what I need to do to make this work? I tried playing with file-types, etc, to no avail...

Thanks in advance for any help!

I tried adding this below as well to my config.cson:

  "linter-js-yaml":
    customTags: [
      "!yml"
      "!include"
      "!yaml"
      "!include"
      "!delta mapping"
      "!epsilon sequence"
    ]
@Arcanemagus
Copy link
Member

Atom doesn't explicitly rely on file types, but rather the "scope" of a file, so my first guess is that you have something installed that is marking .yml files as something other than source.yml.

Since it sounds like you manually edited your configuration file it's possible you missed something about the syntax and it's not getting the proper value. I recommend people use the settings interface within Atom to edit their settings as it prevents the file from getting invalid syntax entered into it.

Are you using linter or atom-ide-ui? If you are using linter can you run the Linter: Debug command from the Command Palette and paste the output here?

@johnpetersjr
Copy link
Author

johnpetersjr commented Oct 18, 2018

Here is the output (I couldn't run linter: debug while I had a .yml file selected, only a .yaml file, if that helps?)

Platform: darwin
Atom Version: 1.31.2
Linter Version: 2.2.0
Opened file is ignored: No
Matching Linter Providers: 
  - Js-YAML
Disabled Linter Providers: 
Standard Linter Providers: 
  - Ansible
  - Js-YAML
Indie Linter Providers: 
UI Providers: 
  - Linter
Ignore Glob: **/*.min.{js,css}
VCS Ignored Paths are excluded: true
Current File Scopes: 
  - *
  - source.yaml
  - entity.name.tag.yaml

@Arcanemagus
Copy link
Member

linter: debug while I had a .yml file selected

You should always be able to run that command on any TextEditor... do you have some package that is taking over editing of .yml files?

only a .yaml file, if that helps?

Since your issue is that you can't run it on .yml files, unfortunately not really 😉.

@johnpetersjr
Copy link
Author

I do have a few things installed, I am very interested in incorporating some sort of syntax/format checking in my Atom for Ansible/Yaml files.

Here is my entire config.cson if that helps?

"*":
core:
disabledPackages: [
"autocomplete-ansible"
"linter-ansible-linting"
]
telemetryConsent: "no"
themes: [
"one-light-ui"
"solarized-light-syntax"
]
editor: {}
"exception-reporting":
userId: "719f0f94-2c69-4bb2-95fe-9a78f1960c46"
"linter-ansible-syntax":
ansibleExecutablePath: "/usr/local/bin/ansible-playbook"
"linter-js-yaml":
customTags: [
"!yml"
"!include"
"!yaml"
"!include"
"!delta mapping"
"!epsilon sequence"
]
"linter-ui-default":
decorateOnTreeView: "Files and Directories"
hidePanelWhenEmpty: false
panelHeight: 67
"pull-request":
githubApiToken: "NONONONONONONONONONO"
welcome:
showOnStartup: false

@cvdabbeele
Copy link

for anyone else with the same issue:
I had similar issues fixed it by uninstalling all linter-related packages and then reinstalling them.
After each package install I restarted atom, which triggered the install of other packages
Now the exceptions (e.g. !secret) are whitelisted, but the linter doesn't provide detailed error information
Progress but not there yet.
Oh yes... I'm on windows (sorry)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants