This repository has been archived by the owner on May 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed handling the "exclude-pattern" parameter on Windows
As of squizlabs/PHP_CodeSniffer#1488, Filter::accept() doesn't strictly check the real path of the files, so intstead of using reflection and calling its protected methods, we can use the filter itself. Closes #4.
- Loading branch information
Showing
9 changed files
with
77 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/main.php b/main.php | ||
`--- /dev/null | ||
+++ b/main.php | ||
@@ -0,0 +1,5 @@ | ||
+<?php | ||
+ | ||
+if ( ! isset($foo)) { | ||
+ $foo = 'bar'; | ||
+} | ||
diff --git a/excluded/excluded.php b/excluded/excluded.php | ||
`--- /dev/null | ||
+++ b/excluded/excluded.php | ||
@@ -0,0 +1,5 @@ | ||
+<?php | ||
+ | ||
+if ( ! isset($foo)) { | ||
+ $foo = 'bar'; | ||
+} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
FILE: main.php | ||
---------------------------------------------------------------------- | ||
FOUND 1 ERROR AFFECTING 1 LINE | ||
---------------------------------------------------------------------- | ||
3 | ERROR | [x] Expected 0 spaces after opening bracket; 1 found | ||
---------------------------------------------------------------------- | ||
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY | ||
---------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
if ( ! isset($foo)) { | ||
$foo = 'bar'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
if ( ! isset($foo)) { | ||
$foo = 'bar'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<exclude-pattern>excluded/*</exclude-pattern> | ||
<rule ref="PSR2"/> | ||
</ruleset> |