Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update PHPCS to 3.5 and update all standards#76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
filipesperandio merged 2 commits intocodeclimate:betafromLaizerox:update-phpcs
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionDockerfile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@ RUN apk add --no-cache git && \
apk del --purge git && \
vendor/bin/phpcs --config-set \
installed_paths \
"/usr/src/app/vendor/drupal/coder/coder_sniffer,/usr/src/app/vendor/escapestudios/symfony2-coding-standard,/usr/src/app/vendor/wp-coding-standards/wpcs,/usr/src/app/vendor/yiisoft/yii2-coding-standards,/usr/src/app/vendor/magento/marketplace-eqp,/usr/src/app/vendor/pheromone/phpcs-security-audit" && \
"/usr/src/app/vendor/drupal/coder/coder_sniffer,/usr/src/app/vendor/escapestudios/symfony2-coding-standard,/usr/src/app/vendor/wp-coding-standards/wpcs,/usr/src/app/vendor/yiisoft/yii2-coding-standards,/usr/src/app/vendor/magento/marketplace-eqp,/usr/src/app/vendor/magento/magento-coding-standard,/usr/src/app/vendor/pheromone/phpcs-security-audit" && \
chown -R app:app . && \
rm -r ~/.composer

Expand Down
28 changes: 22 additions & 6 deletionsRunner.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
<?php

use PHP_CodeSniffer\Files\FileList;
use PHP_CodeSniffer\Reporter;
use PHP_CodeSniffer\Util\Timing;
use PHP_CodeSniffer\Config;
use Stringy\Stringy as S;

class Runner
Expand DownExpand Up@@ -82,7 +86,7 @@ public function run($files)
try {
$resultFile = tempnam(sys_get_temp_dir(), 'phpcodesniffer');

$extra_config_options = array('--report=json', '--report-file=' .$resultFile);
$extra_config_options = array('--report-json='.$resultFile);

if (isset($this->config['config']['standard'])) {
$extra_config_options[] = '--standard=' . $this->config['config']['standard'];
Expand All@@ -106,13 +110,25 @@ public function run($files)
ob_start();

// setup the code sniffer
$cli = new PHP_CodeSniffer_CLI();
$cli->setCommandLineValues($extra_config_options);
$runner = new \PHP_CodeSniffer\Runner();
$runner->config = new Config($extra_config_options);
$runner->init();

// setup the code sniffer
$runner->reporter = new Reporter($runner->config);

// start the code sniffing
PHP_CodeSniffer_Reporting::startTiming();
$cli->checkRequirements();
$cli->process();
Timing::startTiming();
$runner->checkRequirements();

$todo = new FileList($runner->config, $runner->ruleset);
foreach ($todo as $path => $file) {
if ($file->ignored === false) {
$runner->processFile($file);
}
}

$runner->reporter->printReports();

// clean up the output buffers (might be more that one)
while (ob_get_level()) {
Expand Down
14 changes: 8 additions & 6 deletionscomposer.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,25 +4,27 @@
"type": "package",
"package": {
"name": "magento/marketplace-eqp",
"version": "1.0.5",
"version": "4.0.0",
"description": "A set of PHP_CodeSniffer rules and sniffs.",
"license": "MIT",
"source": {
"url": "https://github.com/magento/marketplace-eqp.git",
"type": "git",
"reference": "1.0.5"
"reference": "4.0.0"
}
}
}
},
"require": {
"squizlabs/php_codesniffer": "^2.9.1",
"squizlabs/php_codesniffer": "^3.5",
"barracudanetworks/forkdaemon-php": "^1.0",
"danielstjules/stringy": "^2.3",
"drupal/coder": "^8.2",
"escapestudios/symfony2-coding-standard": "^2.10",
"wp-coding-standards/wpcs": "^1.0.0",
"drupal/coder": "^8.3",
"escapestudios/symfony2-coding-standard": "^3.9",
"wp-coding-standards/wpcs": "^2.1",
"yiisoft/yii2-coding-standards": "^2.0",
"magento/marketplace-eqp": "^4.0",
"magento/magento-coding-standard": "^4.0"
"magento/marketplace-eqp": "^1.0",
"pheromone/phpcs-security-audit": "^1.0"
}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp