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

[1.1.3] Linter does not lint #151

Closed
benjaminRomano opened this issue Jul 22, 2015 · 26 comments
Closed

[1.1.3] Linter does not lint #151

benjaminRomano opened this issue Jul 22, 2015 · 26 comments
Labels

Comments

@benjaminRomano
Copy link

After the new update, I no longer get the error Invalid Result received from JSHint, but now the file does not seem to actually get checked by the linter anymore. This is on a windows environment and I've tried re-installing linter-jshint with no luck.

If you need any other info, please let me know.

@steelbrain
Copy link
Contributor

Did you restart Atom after the upgrade?

@benjaminRomano
Copy link
Author

I've restarted atom and my computer with no luck. When I save, a bunch of new atom processes are created and don't seem to get ended.

@steelbrain
Copy link
Contributor

What CLI args are they spawned with? Does Windows Task Manager show that?

@benjaminRomano
Copy link
Author

I can't check that from the Task manager, but I could put a breakpoint on the code that spawns the process. I put a breakpoint on the execNode function in helpers.coffee and the args created was this ["--reporter", "C:\Users\bhromano.atom\packages\linter-jshint\node_modules\jshint-json\json.js", "--filename", "C:\path\to\my\file.js", "-"]

If you would like me to put a breakpoint somewhere else I could try that.

@steelbrain
Copy link
Contributor

All seems perfect, can you create a dummy js file and point execNode in main.coffee of linter-jshint to it?
and put this in that file

console.log(process.argv)

and then post the output?

@benjaminRomano
Copy link
Author

Sorry. I don't follow. I should create a file with just that one line and have the linter run over the file?

@steelbrain
Copy link
Contributor

A one lined file, and pass it's absolute path instead of jshint exe in linter-jshint

@benjaminRomano
Copy link
Author

I replaced filePath with the dummy file and i got the Invalid result error message

@steelbrain
Copy link
Contributor

Maybe it's a problem with end-of-stream detection, jshint keeps waiting for new input even when we have provided it the whole file, was it working for you before the update?

@benjaminRomano
Copy link
Author

No. I've been receiving the invalid results error since the last version. I've got to get back to some other stuff, but I'll be avaiable to help again in an about an hour or so.

@greven
Copy link

greven commented Jul 23, 2015

I can confirm I have the same problem after the update. The linter stopped working.
Windows 8 x64.
Before the update was getting the 'OS X' bug with the path. No more after the update but again not working.

@steelbrain
Copy link
Contributor

@greven was it working for you before the update?

@greven
Copy link

greven commented Jul 23, 2015

2 Updates before, yes fine, without a problem. 1 Update before I was getting the Path Error bug, even though I could spawn jshint from the cmd line. After this update, no longer get the Path error, but it doesn't work also, i.e., doesn't lint anything, I tried with a .jshintrc file and without, same result.

@steelbrain
Copy link
Contributor

@greven could you please post your process.env.Path, I am gonna create an issue on JSHint repo about this, make sure to remove your personal vars like any google API keys from it.

@benjaminRomano
Copy link
Author

Here is my process.env.Path. I doubt it contains anything useful.

'C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Cl
ient\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\windows\\system32;C:\\windows
;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:
\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program F
iles\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\
\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Inte
l\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Windows K
its\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\
\110\\Tools\\Binn\\;C:\\Program Files\\Microsoft\\Web Platform Installer\\;C:\\P
rogram Files (x86)\\GtkSharp\\2.12\\bin;C:\\Program Files (x86)\\Microsoft SDKs\
\TypeScript\\1.0\\;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C
:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin;C:\\Program Files (x
86)\\nodejs\\;C:\\Program Files\\MongoDB\\Server\\3.0\\bin;C:\\Program Files (x8
6)\\Skype\\Phone\\;C:\\windows\\system32\\config\\systemprofile\\.dnx\\bin;C:\\P
rogram Files\\Microsoft DNX\\Dnvm\\;C:\\Program Files (x86)\\SSH Communications
Security\\SSH Secure Shell;C:\\Users\\Benjamin\\AppData\\Roaming\\npm;C:\\Progra
m Files (x86)\\MySQL\\MySQL Server 5.7\\bin;C:\\Users\\Benjamin\\AppData\\Local\
\atom\\bin;C:\\Program Files (x86)\\Git\\bin'

@steelbrain
Copy link
Contributor

Oh sorry, I meant the whole process.env object.

@benjaminRomano
Copy link
Author

@benjaminRomano
Copy link
Author

I just ran jshint from command line and it hangs when I use these paramters

 ["--reporter", "C:\Users\bhromano.atom\packages\linter-jshint\node_modules\jshint-json\json.js", "--filename", "C:\path\to\my\file.js", "-"]

It runs with these parameters successfully:

 ["--reporter", "C:\Users\bhromano.atom\packages\linter-jshint\node_modules\jshint-json\json.js", "C:\path\to\my\file.js"]

@steelbrain
Copy link
Contributor

That's because we are using stdin and while using stdin, it expects us to write the contents of the file to it, which is what we do.

@greven
Copy link

greven commented Jul 23, 2015

My process.env is here: http://pastebin.com/QHPuqYjy

@benjaminRomano
Copy link
Author

I have a solution for this I believe. It is a problem with atom-linter. I created the issue in that project. steelbrain/atom-linter#21

@steelbrain
Copy link
Contributor

Guys, I need someone to confirm that this patch to ~/.atom/packages/linter-jshint/node_modules/atom-linter/lib/helpers.coffee fixes this problem on windows steelbrain/atom-linter#22

@ghost
Copy link

ghost commented Jul 23, 2015

Yes that worked. Thanks @benjaminRomano and @steelbrain

@vnabet
Copy link

vnabet commented Jul 23, 2015

@steelbrain , It works too ! Thanks.

@steelbrain
Copy link
Contributor

Fixed by steelbrain/atom-linter#22
Gonna push a release shortly

@greven
Copy link

greven commented Jul 23, 2015

I can confirm that last update fixed it for me.
Thanks!

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

No branches or pull requests

5 participants