Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ indent_size = 4
insert_final_newline = true
charset = utf-8

# Repo-local CI strictness: set IDE0055 to warning so it can be enforced by
# `EnforceCodeStyleInBuild` (Microsoft Learn: IDE0055 must be warning/error to
# run during build).
Comment on lines +47 to +49
dotnet_diagnostic.IDE0055.severity = warning

# C# naming conventions live in src/Config/NamingConvention.editorconfig
# (single source of truth, dotnet/runtime aligned, shipped with the SDK package).
# Directory.Build.props injects it for this repo's own projects via EditorConfigFiles.
5 changes: 4 additions & 1 deletion tests/ANcpLua.Sdk.Tests/SdkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ public async Task EditorConfigsAreInBinlog()
.BuildAsync();

var files = result.GetBinLogFiles();
foreach (var file in files) TestContext.Current.TestOutputHelper?.WriteLine("Binlog file: " + file);
foreach (var file in files)
{
TestContext.Current.TestOutputHelper?.WriteLine("Binlog file: " + file);
}

Assert.Contains(files, static f => f.EndsWith(".editorconfig", StringComparison.Ordinal));
Assert.Contains(files, f => f == localFile || f == "/private" + localFile);
Expand Down
20 changes: 16 additions & 4 deletions tests/ANcpLua.Sdk.Tests/TemplatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@ private static async Task DotnetNewScaffoldAsync(
"--debug:custom-hive", hive,
"--skipRestore"
};
if (extraArgs is not null) args.AddRange(extraArgs);
if (extraArgs is not null)
{
args.AddRange(extraArgs);
}

var result = await RunDotnetAsync(args, workingDirectory: null);
Assert.True(
Expand Down Expand Up @@ -393,7 +396,10 @@ private async Task<string> ReadEntryAsync(string entryPath)
CreateNoWindow = true,
WorkingDirectory = workingDirectory?.Value ?? Environment.CurrentDirectory
};
foreach (var arg in args) psi.ArgumentList.Add(arg.ToString() ?? "");
foreach (var arg in args)
{
psi.ArgumentList.Add(arg.ToString() ?? "");
}

var result = await psi.RunAsTaskAsync(TestContext.Current.CancellationToken);
return (result.ExitCode, result.Output.ToString());
Expand All @@ -416,7 +422,10 @@ private static FullPath Canonicalize(FullPath path)
try
{
var resolved = new DirectoryInfo(path.Value).ResolveLinkTarget(returnFinalTarget: true)?.FullName;
if (!string.IsNullOrEmpty(resolved)) return FullPath.FromPath(resolved);
if (!string.IsNullOrEmpty(resolved))
{
return FullPath.FromPath(resolved);
}

// No direct symlink on the leaf; walk up to find an ancestor that is one
// (e.g. /var → /private/var) and rebuild the path through the resolved ancestor.
Expand All @@ -430,7 +439,10 @@ private static FullPath Canonicalize(FullPath path)
if (link is not null)
{
var rebuilt = link.FullName;
while (suffix.Count > 0) rebuilt = Path.Combine(rebuilt, suffix.Pop());
while (suffix.Count > 0)
{
rebuilt = Path.Combine(rebuilt, suffix.Pop());
}
return FullPath.FromPath(rebuilt);
}

Expand Down
Loading