lomadurov / netbeans-jslint

JSLint plugin for NetBeans. JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool.
http://plugins.netbeans.org/plugin/40893/?show=true
MIT License
32 stars 7 forks source link

red underline mark is out of place #7

Open JamesSwift opened 11 years ago

JamesSwift commented 11 years ago

When JSLint highlights errors in my code they are always a few columns out. I suspect this might be because my tabs are set to be 8 columns instead of the default 4. If this is the case, is it possible to make JSLint reference the user's setting?

See the screenshot for details (ignore the poor code, I'm in the process of rewriting).

screenshot from 2013-10-30 16 57 15

lomadurov commented 11 years ago

indentation

JamesSwift commented 11 years ago

Thanks. I Hadn't spotted that. Is there any way to automate the integration?

JamesSwift commented 11 years ago

That doesn't work quite how I expected it to. To get my line to line up I need to set the indentation to 1. If I set it to 0 it appears in the same place as when it is set to 4.

How exactly is the Indentation used in calculating the offset?

lomadurov commented 11 years ago

Option "Indent": the number of spaces used for indentation in library jslint. http://www.jslint.com/lint.html#options (Default 4)

In what environment do you test?

JamesSwift commented 11 years ago

I'm working in netbeans 7.4 on Ubuntu gnome 13.10. On 31 Oct 2013 04:40, "Stanislav Lomadurov" notifications@github.com wrote:

Option "Indent": the number of spaces used for indentation in library jslint. http://www.jslint.com/lint.html#options (Default 4)

In what environment do you test?

— Reply to this email directly or view it on GitHubhttps://github.com/lomatek/netbeans-jslint/issues/7#issuecomment-27460819 .

lomadurov commented 11 years ago

I don't found mistakes (latest Linux mint, Netbeans 7.4, gnome) You can give me your settings of Netbeans (export in "Options" dialog)?

JamesSwift commented 11 years ago

Will do, when I'm back home. Its odd behaviour, but I couldn't make up my mind if it was a bug or not. I take it you think it is? On 31 Oct 2013 09:46, "Stanislav Lomadurov" notifications@github.com wrote:

I don't found mistakes (latest Linux mint, Netbeans 7.4, gnome) You can give me your settings of Netbeans (export in "Options" dialog)?

— Reply to this email directly or view it on GitHubhttps://github.com/lomatek/netbeans-jslint/issues/7#issuecomment-27473016 .

lomadurov commented 11 years ago

Also please install update plugin 1.0.5 http://plugins.netbeans.org/download/plugin/2754

JamesSwift commented 11 years ago

So, now I've upgraded, JSLint gives me an error on every line: use spaces not tabs.

I didn't know JSLint enforced spaces, it never used to. I hate using them, it's just a waste of bandwidth.

Settings: https://drive.google.com/file/d/0B4OvcDwgRpmqSlpoUEcyTTNQYlU/edit?usp=sharing

lomadurov commented 11 years ago

Look at this https://github.com/douglascrockford/JSLint/pull/138

JamesSwift commented 11 years ago

So, is the behaviour I described earlier considered intended? On 31 Oct 2013 13:58, "Stanislav Lomadurov" notifications@github.com wrote:

Look at this douglascrockford/JSLint#138https://github.com/douglascrockford/JSLint/pull/138

— Reply to this email directly or view it on GitHubhttps://github.com/lomatek/netbeans-jslint/issues/7#issuecomment-27487478 .