This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235540

Summary: On-the-fly check for CodeSniffer/Mess Detector
Product: php Reporter: lordnelson
Component: CodeAssignee: Tomas Mysik <tmysik>
Status: NEW ---    
Severity: normal CC: obrejla
Priority: P4    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description lordnelson 2013-09-05 05:14:42 UTC
CodeSniffer should be integrated into "Hints" (or similar) so that style violations are detected on the fly and no manual inspection is necessary. I think this would help a lot to make Netbeans up to par with other IDEs

If I can help to make this happen, please let me know...
Comment 1 Tomas Mysik 2013-09-05 05:29:28 UTC
Ondro, do you think it is doable?

Thanks.
Comment 2 Ondrej Brejla 2013-09-05 08:18:06 UTC
I don't think that it's a good idea. Running external tool after almost every keystroke is not good imho...
Comment 3 Tomas Mysik 2013-09-05 08:24:08 UTC
I thought so... Even on file save, it would be bad from performance point of view (but still much better than on each keystroke).

No easy way to this -> P4, sorry.
Comment 4 lordnelson 2013-09-05 17:30:14 UTC
> I don't think that it's a good idea. Running external tool after almost every keystroke is not good imho...

well, it works pretty well in Emacs with flycheck (https://github.com/flycheck/flycheck) and phpstorm also supports on-the-fly checking with CodeSniffer:

> The on-the-fly code check is activated upon every update in the file thus making it extremely easy to get rid of problems reported by PHP Code Sniffer.

http://www.jetbrains.com/phpstorm/webhelp/using-php-code-sniffer-tool.html

I'm a bit sad to see that reaction because it's really important in our workflow to have immediate feedback from CodeSniffer.

Maybe I can implement it myself? Where can I get some guidance to do that?
Comment 5 Tomas Mysik 2013-09-06 05:12:00 UTC
(In reply to lordnelson from comment #4)
> Maybe I can implement it myself? Where can I get some guidance to do that?

Sure, you can! Perhaps you can start looking at [1]. Ondra (on CC) will give you more advices.

Thanks.
[1] org.netbeans.spi.editor.document.OnSaveTask