Bug #19691 [Fbk->Csd]: SubversionPropertiesSniff fails to find missing properties
| From: | gsherwood at squiz dot net | Date: | Tue, 04 Dec 2012 00:02:42 +0000 |
| Subject: | Bug #19691 [Fbk->Csd]: SubversionPropertiesSniff fails to find missing properties | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9389@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19691&edit=1
ID: 19691
Updated by: gsherwood@squiz.net
Reported By: kevin dot winahradsky at gmail dot com
Summary: SubversionPropertiesSniff fails to find missing
properties
-Status: Feedback
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Linux
Package Version: 1.4.1
PHP Version: 5.3.10
Assigned To: squiz
Roadmap Versions:
New Comment:
-Status: Feedback
+Status: Closed
Previous Comments:
------------------------------------------------------------------------
[2012-11-06 21:12:40] squiz
Thanks Kevin. I didn't read the code properly.
I committed a new fix:
https://github.com/squizlabs/PHP_CodeSniffer/commit/70836241a584d8ddcecfc3f5db
09d10827982da0
------------------------------------------------------------------------
[2012-11-06 08:28:03] kwinahradsky
Changing it to something like "$allProperties = $properties +
$this->properties;" and then iterating over $allProperties in the
foreach loop is what seems to be working for me.
------------------------------------------------------------------------
[2012-11-06 04:46:08] squiz
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
I didn't write this one, so I really have no idea why that line is in
there. But it doesn't
make any sense to me either.
I've removed it and pushed a commit:
https://github.com/squizlabs/PHP_CodeSniffer/commit/8787a9dbb9b038fbafd1c78da
45846253e9b56f6
If you remove that line, does the sniff work for you?
------------------------------------------------------------------------
[2012-11-05 17:14:38] kwinahradsky
Description:
------------
The "$properties += $this->properties;" line in the process function of
the Generic_Sniffs_VersionControl_SubversionPropertiesSniff class causes
properties you are looking for to be added to the properties that exist.
This causes the test for missing properties to fail as the code now
thinks the file has all the properties you are looking for it to have
when it really doesn't.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19691&edit=1