mirror of
https://github.com/zealdocs/zeal.git
synced 2026-08-29 08:34:50 +08:00
chore(tools): show [X/N] progress in verbose mode
This commit is contained in:
@@ -38,8 +38,11 @@ if ($Fix) {
|
||||
}
|
||||
|
||||
$failed = $false
|
||||
$total = @($files).Count
|
||||
$i = 0
|
||||
foreach ($file in $files) {
|
||||
Write-Verbose "Processing $file"
|
||||
$i++
|
||||
Write-Verbose "[$i/$total] Processing $file"
|
||||
& clang-format @formatArgs $file
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
$failed = $true
|
||||
|
||||
@@ -101,8 +101,11 @@ if (-not $files) {
|
||||
$counts = @{}
|
||||
|
||||
try {
|
||||
$total = @($files).Count
|
||||
$i = 0
|
||||
foreach ($file in $files) {
|
||||
Write-Verbose "Processing $file"
|
||||
$i++
|
||||
Write-Verbose "[$i/$total] Processing $file"
|
||||
& clang-tidy @tidyArgs --quiet $file 2>&1 | ForEach-Object {
|
||||
$line = "$_"
|
||||
$line
|
||||
|
||||
+3
-2
@@ -78,9 +78,11 @@ if (-not $files) {
|
||||
|
||||
$failed = $false
|
||||
try {
|
||||
$total = @($files).Count
|
||||
$i = 0
|
||||
foreach ($file in $files) {
|
||||
Write-Verbose "Processing $file"
|
||||
$i++
|
||||
Write-Verbose "[$i/$total] Processing $file"
|
||||
$perFileArgs = $clazyArgs
|
||||
if ($Fix) {
|
||||
$perFileArgs = $perFileArgs + @("--export-fixes=$fixesDir/$i.yaml")
|
||||
@@ -89,7 +91,6 @@ try {
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
$failed = $true
|
||||
}
|
||||
$i++
|
||||
}
|
||||
|
||||
if ($Fix) {
|
||||
|
||||
Reference in New Issue
Block a user