eclipsesource / jshint-eclipse

JSHint integration for the Eclipse IDE
http://github.eclipsesource.com/jshint-eclipse/
146 stars 31 forks source link

Current page error finiky #92

Open christierney402 opened 10 years ago

christierney402 commented 10 years ago

I opened a random .js file in a legacy project and every row except one threw an error.

Now, in the Problems view, which I have set to display only current selection, there are 0 items.

As you can see in my image, the first row is a comment, but there first error in the massive list, when I hover over the gutter icon, is "Expected an assignment or function call and instead saw an expression." The second one is "missing a semicolon" and so forth.

Now when I hit "Ctrl-S" for save, all but three disappear.

The comment's info is now "This character may get deleted by one or more browsers". Also, the Problems view is showing the correct 3 items.

Now this leads to me wonder if there is BOM in there. I opened the properties of the file and it says under Text file encoding, "Default (determined from content: UTF-8)" and "Byte Order Mark is UTF-8 (BOM)".

So I'm not positive, but I think the linter doesn't take into account files that contain BOM until it is saved, which I'm assuming Eclipse removes something it doesn't like.

2014-05-17_1336

gerrard1984 commented 10 years ago

I have the same problem, anybody know how to fix it ?

ralfstx commented 10 years ago

I can't reproduce it. Can provide an input file that leads to this error? Which exact version of jshint-eclipse do you use?

gerrard1984 commented 10 years ago

Eclipse Version: Kepler Service Release 2 Build id: 20140224-0627 Jslint Plugin: 2.1.10/ I am trying to enclose a js file, unfortunately it doesn't support it, how can i share a js file to you ?

ralfstx commented 10 years ago

Jslint Plugin: 2.1.10/

Are you using JSLint or JSHint? Please check your version of JSHint Eclipse (Help > Installation Details in Eclipse).

how can i share a js file to you ?

http://web.appstorm.net/roundups/communication-roundups/10-easy-sites-for-file-sharing/

gerrard1984 commented 10 years ago

Hi, I am using Jshint with build in library V2.1.10 . Eclipse Version: Kepler Service Release 2 Build id: 20140224-0627 1

I create a dropbox link shared the project files to you. https://www.dropbox.com/s/a22966frg6wb19i/testproject.zip#

How to reproduce it ? 1:Create a javascript project include all the enclosed folders, enable jshint and select analyse all files. 2 2: My config { "bitwise": false, "camelcase": true, "curly": true, "eqeqeq": true, "es3": false, "forin": false, "immed": true, "jquery": true, "latedef": true, "newcap": false, "noarg": true, "noempty": true, "nonew": true, "plusplus": false, "undef": true, "unused": "var", "strict": false, "trailing": false } 3: The result as below, almost error in every line, all mis-detected error... 3

4: Now, I am trying to delete any line , or add a while space in any line, press 'ctrl+s' save it, it works fine. 6

gerrard1984 commented 10 years ago

If I create a project include only one folder e.g folder 'channelEdit', (any folder if fine), It works fine. It's really weird.... 5

ralfstx commented 10 years ago

Thanks for the example. I can reproduce the issue with a plain Kepler SR2 Eclipse with jshint-eclipse 0.9.9 installed. Will investigate.

gerrard1984 commented 10 years ago

Hi ralfstx: Any update on this issue?