Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 deletion src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ public function printProgress(File $file, $numFiles, $numProcessed)
$errors = $file->getErrorCount();
$warnings = $file->getWarningCount();
$fixable = $file->getFixableCount();
$fixed = $file->getFixedCount();
$fixed = ($file->getFixedErrorCount() + $file->getFixedWarningCount());

if (PHP_CODESNIFFER_CBF === true) {
// Files with fixed errors or warnings are F (green).
Expand Down
7 changes: 7 additions & 0 deletions tests/EndToEnd/phpcbf_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ function test_phpcbf_returns_error_on_issues() {
assert_contains "A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE" "$OUTPUT"
}

function test_phpcbf_progressbar_shows_fixes_with_parallel_on() {
OUTPUT="$( { bin/phpcbf --no-colors --parallel=10 --no-cache --suffix=.fixed --standard=tests/EndToEnd/Fixtures/endtoend.xml.dist tests/EndToEnd/Fixtures/ClassWithStyleError.inc; } 2>&1 )"
assert_successful_code

assert_contains "F 1 / 1 (100%)" "$OUTPUT"
}

function test_phpcbf_bug_1112() {
# See https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/1112
if [[ "$(uname)" == "Darwin" ]]; then
Expand Down
Loading