Skip to content

Commit 0a06ec9

Browse files
authored
Fix global code validation script (#1121)
Update validatecode.ps1
1 parent 1a650ba commit 0a06ec9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Pipelines/Scripts/validatecode.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,12 @@ function CheckForMetaFile {
183183
[string]$FileName
184184
)
185185
process {
186-
if (-not $FileName.EndsWith("~") -and -not (Test-Path ($FileName + ".meta"))) {
186+
$isIgnoredByUnity = $FileName -match "~([\\/]|$)" -or
187+
$FileName -match "[\\/]\." -or
188+
$FileName -match "[\\/]cvs([\\/]|$)" -or
189+
$FileName.EndsWith(".tmp")
190+
191+
if (-not $isIgnoredByUnity -and -not (Test-Path ($FileName + ".meta"))) {
187192
Write-Warning "Meta file missing for $FileName. Please be sure to check it in alongside this file."
188193
$true;
189194
}

0 commit comments

Comments
 (0)