-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructured PHPCS Integration (#39)
Since PHPCS can't reliably detect the FQN of the report class, I've restructured the PHPCS integration so that it will ensure only a single class file is ever loaded when including the report. This will ensure we always load the correct report file. This commit also comes with some changes to the build process. We don't need to reference the report files anymore, since we aren't going to require Webpack to compile the assets to find the reports.
- Loading branch information
1 parent
a3d0ab3
commit 4d2ca5d
Showing
25 changed files
with
1,265 additions
and
429 deletions.
There are no files selected for viewing
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
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
File renamed without changes
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
8 changes: 4 additions & 4 deletions
8
phpcs-reports/includes/VSCodeFixer.php → assets/phpcs-integration/Extension/Fixer.php
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
20 changes: 8 additions & 12 deletions
20
phpcs-reports/CodeAction.php → ...phpcs-integration/Handlers/CodeAction.php
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
20 changes: 8 additions & 12 deletions
20
phpcs-reports/Diagnostic.php → ...phpcs-integration/Handlers/Diagnostic.php
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
20 changes: 8 additions & 12 deletions
20
phpcs-reports/Format.php → assets/phpcs-integration/Handlers/Format.php
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,21 @@ | ||
<?php | ||
|
||
namespace VSCode\PHP_CodeSniffer\Handlers; | ||
|
||
use VSCode\PHP_CodeSniffer\Extension\File; | ||
|
||
/** | ||
* The interface for all PHPCS handlers. | ||
*/ | ||
interface Handler | ||
{ | ||
/** | ||
* Executes a handler. | ||
* | ||
* @param array $report The PHPCS report we're processing. | ||
* @param File $file The file we're reporting on. | ||
* @param array|null $data The data object passed from VS Code. | ||
* @return bool True if we have processed the file, otherwise false. | ||
*/ | ||
public function execute($report, File $file, $data); | ||
} |
Oops, something went wrong.