dinhquochan / nova-phpcs

PHP CodeSniffer for Nova. NOTICE: This extension is archived. Move to https://extensions.panic.com/extensions/com.thorlaksson/com.thorlaksson.phpcs/
MIT License
4 stars 2 forks source link

Noob question here. How do I know its running? #5

Closed greggh closed 3 years ago

greggh commented 4 years ago

I am in a laravel project, and have a php file open. I have the debug pane up. Nova says the file is a PHP-HTML file, I don't see just PHP by itself as a syntax option. I guess thats ok?

But what I really want to know is this: when is phpcs run? Do I have to trigger it? I don't see any output anywhere, or any option to run it.

adriannier commented 3 years ago

@greggh Did you try to enter the absolute path for phpcs in the preferences? The steps that finally lead me to having issues displayed in Nova’s sidebar where:

  1. Open Terminal.app
  2. Enter which phpcs | tr -d '\n' | pbcopy to copy the absolute path for phpcs
  3. Open Nova.app
  4. Select Extensions Library from the Extensions menu
  5. Click phpcs in the sidebar showing installed extensions
  6. Switch to Preferences in the navigation bar on the right
  7. Paste the copied path in the Executable path field
  8. Re-launch Nova.app
greggh commented 3 years ago

Where should I actually see any output from phpcs? The description of the extension doesn't explain at all where I am supposed to see anything, or what I am supposed to see.

@adriannier Thank you for the response! I set it to the full path now. Just wondering where I am actually supposed to see the results. In phpStorm it's in the debug/terminal and in the editor.

adriannier commented 3 years ago

@greggh Try this article to find out how to add the tab for Issues to your sidebar: https://library.panic.com/nova/sidebar/

My initial tests with phpcs weren’t that good though. Sometimes issues disappear when the code is fixed, sometimes the issues linger on no matter what you do to the code.