You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
--------------------------------
|
|
VIM - PHP_CodeSniffer Plugin
|
|
--------------------------------
|
|
|
|
Introduction
|
|
---------------------------------
|
|
vim-phpcs is a small plugin that will run PHP_CodeSniffer on the current file, and run the results in a vim window.
|
|
|
|
Requirements
|
|
---------------------------------
|
|
To use this plugin, you need:
|
|
- Vim
|
|
- PHP_CodeSniffer 1.3+ (earlier versions may work but that depends on the return format of the code sniffer report).
|
|
|
|
Installation of plugin.
|
|
---------------------------------
|
|
1. Obtain a copy of this plugin and place phpcs.vim in your Vim plugin
|
|
directory and vim-phpcs.txt in the docs/ directory.
|
|
2. Add "let Vimphpcs_Standard='STANDARDNAME'" to your .vimrc file.
|
|
(where STANDARDNAME is the name/path of the standard)
|
|
3. Restart Vim.
|
|
4. You can now use the ":CodeSniff" command to run PHP_CodeSniffer
|
|
and display the results.
|
|
|
|
Usage.
|
|
--------------------------------
|
|
To use this plugin on the current file, simply type:
|
|
:CodeSniff (which shows both errors and warnings)
|
|
:CodeSniffErrorOnly (which only shows errors)
|
|
|
|
Version history
|
|
--------------------------------
|
|
0.1 - First release
|
|
0.2 - Added a check for the code sniffer binary and the standard as a config option (so you do not have to modify the plugin).
|