Fixing bug with range ignore + regions #1109
Annotations
3 errors and 2 warnings
Run dotnet test CSharpier.sln --configuration Release --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" -- RunConfiguration.CollectSourceInformation=true:
Src/CSharpier/DocPrinter/DocPrinter.cs#L162
'Stack<Indent>' does not contain a definition for 'TryPop' and no accessible extension method 'TryPop' accepting a first argument of type 'Stack<Indent>' could be found (are you missing a using directive or an assembly reference?)
|
Run dotnet test CSharpier.sln --configuration Release --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" -- RunConfiguration.CollectSourceInformation=true:
Src/CSharpier.Tests/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests.cs#L272
Expected normalizedCode to be "public class ClassName
{
#region Region
public int LongUglyMethod() => 42;
#endregion
}
public class ClassName
{
#region Region
public int LongUglyMethod() => 42;
#endregion
}
#region class
public class ClassName
{
#region method
public void Method()
{
#region content
#endregion
}
#endregion
}
#endregion
public class ClassName
{
#region Region
private int x; // trailing comment here shouldn't give extra indent to the endregion after it
#endregion
private int y;
string RegionsIndentAndNewLineProperly =
#region one
@"using System;"
#endregion one
;
}
class ClassName
{
#region Region
// csharpier-ignore-start
public string Field;
// csharpier-ignore-end
#endregion
}
" with a length of 813, but "public class ClassName
{
#region Region
public int LongUglyMethod() => 42;
#endregion
}
public class ClassName
{
#region Region
public int LongUglyMethod() => 42;
#endregion
}
#region class
public class ClassName
{
#region method
public void Method()
{
#region content
#endregion
}
#endregion
}
#endregion
public class ClassName
{
#region Region
private int x; // trailing comment here shouldn't give extra indent to the endregion after it
#endregion
private int y;
string RegionsIndentAndNewLineProperly =
#region one
@"using System;"
#endregion one
;
}
class ClassName
{
#region Region
// csharpier-ignore-start
public string Field;
// csharpier-ignore-end
#endregion
}
" has a length of 809, differs near "
" (index 687).
|
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/setup-dotnet@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Loading