up
Some checks failed
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled

This commit is contained in:
StellaOps Bot
2025-11-27 23:44:42 +02:00
parent ef6e4b2067
commit 3b96b2e3ea
298 changed files with 47516 additions and 1168 deletions

View File

@@ -1,4 +1,4 @@
global using System;
global using System;
global using System.Collections.Generic;
global using System.IO;
global using System.IO.Compression;
@@ -11,3 +11,5 @@ global using System.Threading;
global using System.Threading.Tasks;
global using StellaOps.Scanner.Analyzers.Lang;
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("StellaOps.Scanner.Analyzers.Lang.Node.Tests")]

View File

@@ -21,14 +21,8 @@ internal static class NodePhase22SampleLoader
var fixturePath = Environment.GetEnvironmentVariable(EnvKey);
if (string.IsNullOrWhiteSpace(fixturePath))
{
// Only load from the fixture root if explicitly present; do not fallback to docs/samples
fixturePath = Path.Combine(rootPath, DefaultFileName);
if (!File.Exists(fixturePath))
{
// fallback to docs sample if tests point to repo root
var repoRoot = FindRepoRoot(rootPath);
var fromDocs = Path.Combine(repoRoot, "docs", "samples", "scanner", "node-phase22", DefaultFileName);
fixturePath = File.Exists(fromDocs) ? fromDocs : fixturePath;
}
}
if (!File.Exists(fixturePath))
@@ -103,20 +97,4 @@ internal static class NodePhase22SampleLoader
return records;
}
private static string FindRepoRoot(string start)
{
var current = new DirectoryInfo(start);
while (current is not null && current.Exists)
{
if (File.Exists(Path.Combine(current.FullName, "README.md")))
{
return current.FullName;
}
current = current.Parent;
}
return start;
}
}