bradfeehan / SublimePHPCoverage

A plugin for Sublime Text 2 and 3, which visualises PHP code coverage data in the editor.
MIT License
57 stars 10 forks source link

Project settings not taking effect #24

Open cabdesigns opened 9 years ago

cabdesigns commented 9 years ago

Had real trouble getting this to work. Had my .sublime-project config setup with everything as described in README, but then worked out they weren't being taken into account.

First realised debug property wasn't used, and then worked out report_path also not working.

{
    "settings": {
        "someotherplugin": {
            // config
        },
        "phpcoverage": {
            "report_path": "target/logs/clover.xml",
            "debug": true
            }
    }
}

Unsure if this is just a bad project config, or there is a bug with project configs not being taken into consideration.

Putting the config direct into the SublimePHPCoverage.sublime-settings was the only way to get it to work.

macintoshplus commented 9 years ago

+1

bradfeehan commented 9 years ago

Sorry guys, I hardly use this project any more :disappointed: I've stopped developing in both PHP and Sublime since I wrote it!

I'd be happy to accept a pull request that fixes it though!

jhoff commented 7 years ago

Little late to the party, but this does actually work. It's just a little finicky. See my example .sublime-project below.

Three things in order for this to take effect - 1) Make sure you have opened your code as a project, not just the directory. Sublime doesn't auto-detect that it's a project. 2) You'll have to restart sublime after making any changes, as far as I can tell. 3) Unlike other packages, these need to be under the "settings" property in .sublime-project ( see below ).

It does work, it just doesn't want to auto-refresh when you make config changes so it needs a little help.

{
    "folders":
    [
        {
            "path": "."
        }
    ],
    "settings": {
        "phpcoverage": {
            "report_path": "coverage/clover.xml"
        }
    },
    "SublimeLinter": {
        "paths": {
            "osx": ["/usr/local/bin/"]
        },
       ...
diogocavilha commented 7 years ago

Hi.

My console shows this error:

Traceback (most recent call last):
  File "/opt/sublime_text_3/sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "SublimePHPCoverage in /home/diogo/.config/sublime-text-3/Installed Packages/PHP Code Coverage.sublime-package", line 105, in run
  File "/home/diogo/.config/sublime-text-3/Installed Packages/PHP Code Coverage.sublime-package/php_coverage/command.py", line 55, in should_include
  File "/home/diogo/.config/sublime-text-3/Installed Packages/PHP Code Coverage.sublime-package/php_coverage/matcher.py", line 18, in should_include
  File "/home/diogo/.config/sublime-text-3/Installed Packages/PHP Code Coverage.sublime-package/php_coverage/matcher.py", line 24, in included
  File "/home/diogo/.config/sublime-text-3/Installed Packages/PHP Code Coverage.sublime-package/php_coverage/matcher.py", line 37, in match
  File "./python3.3/re.py", line 161, in search
TypeError: expected string or buffer

I've checked the file /opt/sublime_text_3/sublime_plugin.py on line 818 but I don't know how to solve the problem. Any of you guys had the same problem?

ericktucto commented 5 years ago

Hello, I have a similar problem

seleccion_041

I want to use the xml file of the following route /tmp/clover.xml, but the plugin only working with the xml file of the following route build/logs/clover.xml

The purpose of this is: to have my git repository clean