SublimePHPCoverage icon indicating copy to clipboard operation
SublimePHPCoverage copied to clipboard

Project settings not taking effect

Open cabdesigns opened this issue 9 years ago • 5 comments

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.

cabdesigns avatar Mar 18 '15 12:03 cabdesigns

+1

macintoshplus avatar Mar 25 '15 09:03 macintoshplus

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!

bradfeehan avatar Mar 30 '15 04:03 bradfeehan

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/"]
        },
       ...

jhoff avatar Mar 29 '17 15:03 jhoff

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?

diogocavilha avatar Oct 17 '17 11:10 diogocavilha

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

ericktucto avatar Dec 08 '18 23:12 ericktucto