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

Linter not triggered #33

Closed
gggritso opened this issue Sep 14, 2015 · 24 comments
Closed

Linter not triggered #33

gggritso opened this issue Sep 14, 2015 · 24 comments

Comments

@gggritso
Copy link

On Atom 1.0.11, with linter-htmlhint 0.1.1 even manually setting the syntax for a file to HTML doesn't trigger linting at all if the file's extension isn't "html".

@devurandom
Copy link

I even have an html file, which is not being linted by linter-htmllint inside Atom. When I invoke htmlhint manually on the commandline, I get an error message, though:

$ ~/.atom/packages/linter-htmlhint/node_modules/htmlhint/bin/htmlhint thefile.html 

  thefile.html
      L416 |             <h2>Backend</h3>
                                    ^ Tag must be paired, no start tag: [ </h3> ] (tag-pair)
      L419 |            </section>
                        ^ Tag must be paired, missing: [ </h2> ], start tag match failed [ <h2> ] on line 416. (tag-pair)

2 errors in 1 files

@johnwebbcole
Copy link
Contributor

Do you have a .htmlhintrc file anywhere above your file? If so, make sure it has "tag-pair": true. Your example worked fine for me.

@jasonblanchard
Copy link

Similar issue here, linter-htmlhint 0.1.1 Atom 1.0.19, getting this behavior (no linting) even if the file extension is .html.

@jasonblanchard
Copy link

fwiw, looks like the linter-htmlhint package installed version 0.9.8 of htmlhint which was bumped 2 days ago htmlhint/HTMLHint@895970d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2, maybe the command output was changed?

@jasonblanchard
Copy link

Confirmed, downgraded to htmlhint 0.9.6 and linter-htmlhint is linting in Atom now.

@devurandom
Copy link

Is a .htmlhintrc file a requirement to use linter-hmtlhint? I would assume that linter-htmlhint manages it's backend programmes itself, so I never have to see any of it...

@johnwebbcole
Copy link
Contributor

I've merged @prosf pr with uses the new json output option on htmlhint 0.9.12. See if 0.2.0 works.

@leosanvieira
Copy link

I also have this issue, linting not working on html files. Atom 1.6.2, linter-htmlhint 1.1.1.

@Arcanemagus
Copy link
Member

@leosanvieira can you poen Atom's Developer Tools and put a breakpoint here to see if the linter is actually being triggered but not giving any output?

@leosanvieira
Copy link

@Arcanemagus I did as you asked and nothing happened, it didn't even get to the breakpoint.

@Arcanemagus
Copy link
Member

If you run the Editor: Log Cursor Scopes command from the Command Palette what do you get?

@leosanvieira
Copy link

image

@Arcanemagus
Copy link
Member

Hmmm, you don't have linter disabled, do you?

@leosanvieira
Copy link

image
No, as you can see above. i also have other linter dependent packages and all of them are working fine.
If it were just that, the solution would be too easy, don't you think?

@Arcanemagus
Copy link
Member

You'd be surprised how often that is the case 😉

What do the linter and linter-htmlhint sections of your config.cson look like?

@leosanvieira
Copy link

"linter-htmlhint": {}

There's only this section.

@cordonblues
Copy link

I am having the same issue. Any new status on this? I am on Windows 10:

  linter: {}
  "linter-htmlhint": {}

linter-eslint and linter-csslint work fine:

2016-04-11

@johnwebbcole
Copy link
Contributor

Try removing
"linter-htmlhint": {}

I think that is turning off all rules.

@cordonblues
Copy link

@johnwebbcole tried that - restarted Atom too, and upgraded to 1.1.2 and restarted - nothing worked

@leosanvieira
Copy link

I installed Atom on another machine today and linter-htmlhint is working now somehow but it only activates when i save the .html file, it does not activate after opening the same file which contains html "errors" and also does not activate after making changes, only after saving as i said before.
Bases on other linter-* plugins, i don't think that is how the default behavior should be like.
Debian Jessie
Atom 1.7.1
linter 1.11.4
linter-htmlhint 1.1.2
There are no sections in config.cson about linter or linter-htmlhint.

@Arcanemagus
Copy link
Member

@leosanvieira There are two general "classes" of linter providers, those that can run on the current file contents, and those that only operate on a file saved to disk. Currently at least this linter belongs to that second class and will only run when the file is saved.

There is an issue open on linter for enabling triggering a lint on file open, you may want to subscribe to that.

@Arcanemagus
Copy link
Member

@Aeoril Were you by chance on the v1.7.0 betas when you posted that? There was a bug with Node process execution on Windows that v1.7.1 (and v1.8.0-beta1) fixed.

@gggritso Are you still having issues?

@gggritso
Copy link
Author

I am not! After updating everything, checking the settings and correcting my .rc everything is working as expected. Thank you for your help!

@Arcanemagus
Copy link
Member

Marking as closed due to a lack of response from @Aeoril.

If you are still having issues with this please file a new issue!

@AtomLinter AtomLinter locked and limited conversation to collaborators Apr 29, 2016
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

7 participants