Look into ignored files in csharpier-repos
The list of files that won't compile or have too deep of recursion in csharpier-repos was ignored. At some point we should review these to see if there are any legit problems in them.
Can this be refactored to not be recursive?
Theoretically. But I haven't been able to wrap my head around how. See https://github.com/belav/csharpier/issues/2 The only failures because of deep recursion have come from files specifically designed to cause recursive code to fail. It doesn't seem worth it to rewrite everything just to get some test files to format.
Easy way to get links to files after saving the output to C:\Users\bela\Documents\errors.txt
$compileErrors = @()
$recursionError = @()
$fileEncoding = @()
foreach ($line in Get-Content "C:\Users\bela\Documents\errors.txt") {
$line = $line.Replace("Error ", "").Replace("Warning", "")
if ($line.EndsWith(" - Unable to detect file encoding. Defaulting to System.Text.UTF8Encoding+UTF8EncodingSealed.")) {
$fileEncoding += $line.Substring(0, $line.IndexOf(" "))
}
elseif ($line.EndsWith(" - We can't handle this deep of recursion yet.")) {
$recursionError += $line.Substring(0, $line.IndexOf(" "))
}
elseif ($line.EndsWith(" - Failed to compile so was not formatted.")) {
$compileErrors += $line.Substring(0, $line.IndexOf(" "))
}
else {
Write-Host $line
}
}
Write-Output "Compilation Errors"
foreach($line in $compileErrors | Sort-Object) {
Write-Output $("https://github.com/belav/csharpier-repos/tree/main/" + $line)
}