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
|
$failed = $false
|
||||||
|
$total = @($files).Count
|
||||||
|
$i = 0
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
Write-Verbose "Processing $file"
|
$i++
|
||||||
|
Write-Verbose "[$i/$total] Processing $file"
|
||||||
& clang-format @formatArgs $file
|
& clang-format @formatArgs $file
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
$failed = $true
|
$failed = $true
|
||||||
|
|||||||
@@ -101,8 +101,11 @@ if (-not $files) {
|
|||||||
$counts = @{}
|
$counts = @{}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$total = @($files).Count
|
||||||
|
$i = 0
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
Write-Verbose "Processing $file"
|
$i++
|
||||||
|
Write-Verbose "[$i/$total] Processing $file"
|
||||||
& clang-tidy @tidyArgs --quiet $file 2>&1 | ForEach-Object {
|
& clang-tidy @tidyArgs --quiet $file 2>&1 | ForEach-Object {
|
||||||
$line = "$_"
|
$line = "$_"
|
||||||
$line
|
$line
|
||||||
|
|||||||
+3
-2
@@ -78,9 +78,11 @@ if (-not $files) {
|
|||||||
|
|
||||||
$failed = $false
|
$failed = $false
|
||||||
try {
|
try {
|
||||||
|
$total = @($files).Count
|
||||||
$i = 0
|
$i = 0
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
Write-Verbose "Processing $file"
|
$i++
|
||||||
|
Write-Verbose "[$i/$total] Processing $file"
|
||||||
$perFileArgs = $clazyArgs
|
$perFileArgs = $clazyArgs
|
||||||
if ($Fix) {
|
if ($Fix) {
|
||||||
$perFileArgs = $perFileArgs + @("--export-fixes=$fixesDir/$i.yaml")
|
$perFileArgs = $perFileArgs + @("--export-fixes=$fixesDir/$i.yaml")
|
||||||
@@ -89,7 +91,6 @@ try {
|
|||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
$failed = $true
|
$failed = $true
|
||||||
}
|
}
|
||||||
$i++
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Fix) {
|
if ($Fix) {
|
||||||
|
|||||||
Reference in New Issue
Block a user