Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PhpStorm instructions #5

Merged
merged 2 commits into from
Dec 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ The following config should do php linting as well as code sniffing
" Set phpcs args
let g:syntastic_php_phpcs_args="--standard=/path/to/common-standards/Barracuda"

### PhpStorm
To get set up just follow the instructions at (https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm)

In summary the steps are:
- In the PhpStorm settings, search for "Code Sniffer" or find it at Languages & Frameworks > PHP > Code Sniffer
- Under Configuration make sure "Local" is selected and click the menu button
- Set your code sniffer phpcs path to the location where you installed the code sniffer files above
- Click the "Verify" button to make sure code sniffer is working
- In settings, search for "Inspections" or find it under Editor > Inspections
- Within Inspections look for the "PHP Code Sniffer Validation" option. Enable it.
- You should see an option named "Coding standard." Select "Custom" and then use the menu button to input the directory you installed the Barracuda standards repo to.

You should now be able to run code sniffer by going to Code > Inspect Code in the PhpStorm menu!

TODO
----
- require newline or opening brace before // comments
Expand Down