You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
501 B

3 weeks ago
# 全工程 BOM 扫描(AGENTS.md:批量编辑 .java 后、mvn compile 前必跑)
$hits = Get-ChildItem -Path 'd:\code\crm-backend-matt' -Recurse -Filter *.java |
Where-Object { $_.FullName -notmatch '\\target\\' } |
Where-Object {
$b = [IO.File]::ReadAllBytes($_.FullName)
$b.Length -ge 3 -and $b[0] -eq 0xEF -and $b[1] -eq 0xBB -and $b[2] -eq 0xBF
}
if ($hits) { $hits | ForEach-Object { Write-Output ("BOM: " + $_.FullName) } }
else { Write-Output "BOM files: 0" }