benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
814 stars 126 forks source link

feature request: list errors in dialog/file #124

Closed daithi-coombes closed 9 years ago

daithi-coombes commented 9 years ago

Maybe this ability is already there, but if not then I think it would be a great help. Currently I have my Packages/User/phpcs.sublime-settings with:

    // Show the errors in the status bar
    "phpcs_show_errors_in_status": true,

    // Show the errors in the quick panel so you can then goto line
    "phpcs_show_quick_panel": true,

Currently I can only see the error in the status bar, which is cut of from the window width. New with sublime and not 100% sure what the quick panel is. If I goto Tools->PHP Code Sniffer then I get the following list in a dialog:

So give the above I think the plugin is working, so this is a feature request. Would like to see something like:

FILE: /path/to/code/myfile.php
--------------------------------------------------------------------------------
FOUND 5 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
  2 | ERROR | Missing file doc comment
 20 | ERROR | PHP keywords must be lowercase; expected "false" but found "FALSE"
 47 | ERROR | Line not indented correctly; expected 4 spaces but found 1
 51 | ERROR | Missing function doc comment
 88 | ERROR | Line not indented correctly; expected 9 spaces but found 6
--------------------------------------------------------------------------------

... clicking on the line number would jump to that line

daithi-coombes commented 9 years ago

... looking to learn more about the sublime api and development, so if my above suggestion isn't implemented I'd like to give it a shot

benmatselby commented 9 years ago

That is what the quick panel does.. If you have the quick panel settings on, then when you sniff the file it should pull all errors out of the report and produce you a list that allows you to jump to the error.

Other than that, if you turn debug "show_debug": true on you can see all the output from the commands in the console.