File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,18 +243,21 @@ try {
243243 $errors = [Collections.Generic.List [string ]]::new()
244244 foreach ($path in $canonical ) {
245245 $relative = $path.Substring (' scripts/' .Length)
246- $matches = @ ($catalog.categories | Where-Object {
246+ $categoryMatches = @ ($catalog.categories | Where-Object {
247247 $category = $_
248248 @ ($category.patterns | Where-Object {
249249 $relative -match (ConvertTo-HBRegex - Pattern $_ )
250250 }).Count -gt 0
251251 })
252252 if ($path -in @ ($catalog.excluded )) { continue }
253- if ($matches .Count -ne 1 ) {
254- $errors.Add (" $path must match exactly one category; matched $ ( $matches .Count ) ." )
253+ if ($categoryMatches .Count -ne 1 ) {
254+ $errors.Add (" $path must match exactly one category; matched $ ( $categoryMatches .Count ) ." )
255255 continue
256256 }
257- $assignments.Add ([pscustomobject ]@ { Path = $path ; CategoryId = $matches [0 ].id })
257+ $assignments.Add ([pscustomobject ]@ {
258+ Path = $path
259+ CategoryId = $categoryMatches [0 ].id
260+ })
258261 }
259262 foreach ($excluded in @ ($catalog.excluded )) {
260263 if ($excluded -notin $canonical ) {
You can’t perform that action at this time.
0 commit comments