Skip to content

Commit 35ab286

Browse files
author
Jon Cairns
committed
Updated version and README
1 parent 4fd426c commit 35ab286

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ You can also run each command separately on demand:
3232
- `:Phpmd` - run mess detector (will ask for a rule XML file if not set)
3333
- `:Phpcc` - show code coverage (will ask for a clover XML file if not set)
3434

35-
If you generate clover code coverage reports with your tests, you can toggle markers to show which lines are covered and which aren't. You can run the command once using `Phpcs` as shown above, or you can configure it to load the markers every time you open a new file - see the configuration section for more information.
35+
### Code Coverage
36+
37+
If you generate clover code coverage reports with your tests, you can toggle markers to show which lines are covered and which aren't. You can run the command once using `Phpcc` as shown above, or you can configure it to load the markers every time you open a new file - see the configuration section for more information.
38+
39+
You can also toggle code coverage (to stop it automatically running on opening a file) with:
40+
41+
```vim
42+
<Leader>qc
43+
```
3644

3745
### Installation
3846

@@ -51,7 +59,9 @@ If you aren't using vundle, you will have to extract the files in each folder to
5159

5260
Each command has it's own configuration settings, which allow you to get the functionality you want.
5361

54-
PHP mess detecotr needs a ruleset XML file (see the [mess detector website][2] for more information) to run, which you will be prompted for the first time the command runs. However, it's much easier to just specify it in your *.vimrc* file:
62+
#### PHP, Mess Detector and Codesniffer
63+
64+
PHP mess detector needs a ruleset XML file (see the [mess detector website][2] for more information) to run, which you will be prompted for the first time the command runs. However, it's much easier to just specify it in your *.vimrc* file:
5565

5666
```vim
5767
let g:phpqa_messdetector_ruleset = "/path/to/phpmd.xml"
@@ -93,10 +103,22 @@ let g:phpqa_codesniffer_autorun = 0
93103
let g:phpqa_codecoverage_autorun = 1
94104
```
95105

96-
For code coverage, you can specify a clover XML file to stop the prompt:
106+
By default, the location list window will open when mess detector/codesniffer violations are found. You can stop this happening by setting this option:
107+
108+
```vim
109+
" Stop the location list opening automatically
110+
let g:phpqa_open_loc = 0
111+
```
112+
113+
#### Code Coverage Configuration
114+
115+
For code coverage, you can specify a clover XML file to stop the prompt appearing each time, and choose to only show markers for lines that aren't covered - by default both covered and uncovered code have markers. Not showing covered line markers is likely to speed things up noticeably when moving between files.
97116

98117
```vim
118+
" Clover code coverage XML file
99119
let g:phpqa_codecoverage_file = "/path/to/clover.xml"
120+
" Show markers for lines that ARE covered by tests (default = 1)
121+
let g:phpqa_codecoverage_showcovered = 0
100122
```
101123

102124
### Acknowlegements

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5
1+
0.6

0 commit comments

Comments
 (0)