Skip to content

Commit

Permalink
Merge pull request #3491 from bjornhellander/feature/test11
Browse files Browse the repository at this point in the history
Added a new test project for c# 11
  • Loading branch information
sharwell committed May 2, 2022
2 parents 5143909 + 6dc6195 commit e0ee7b2
Show file tree
Hide file tree
Showing 268 changed files with 3,481 additions and 45 deletions.
2 changes: 1 addition & 1 deletion StyleCop.Analyzers/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.46" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.304" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.0.1" PrivateAssets="all" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ private static SyntaxTriviaList RemoveHeaderDecorationLines(SyntaxTriviaList tri
for (int i = 0; i < trivia.Count; i++)
{
var triviaLine = trivia[i];
if (triviaLine.Kind() == SyntaxKind.SingleLineCommentTrivia && triviaLine.ToFullString().Contains(settings.DocumentationRules.HeaderDecoration))
if (triviaLine.IsKind(SyntaxKind.SingleLineCommentTrivia) && triviaLine.ToFullString().Contains(settings.DocumentationRules.HeaderDecoration))
{
decorationRemovalList.Add(i);

// also remove the line break
if (i + 1 < trivia.Count && trivia[i + 1].Kind() == SyntaxKind.EndOfLineTrivia)
if (i + 1 < trivia.Count && trivia[i + 1].IsKind(SyntaxKind.EndOfLineTrivia))
{
decorationRemovalList.Add(i + 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
[assembly: InternalsVisibleTo("StyleCop.Analyzers.Test.CSharp8, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
[assembly: InternalsVisibleTo("StyleCop.Analyzers.Test.CSharp9, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
[assembly: InternalsVisibleTo("StyleCop.Analyzers.Test.CSharp10, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
[assembly: InternalsVisibleTo("StyleCop.Analyzers.Test.CSharp11, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
[assembly: InternalsVisibleTo("StyleCopTester, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11
{
using StyleCop.Analyzers.Test.CSharp10;

public class AnalyzerConfigurationTestsCSharp11 : AnalyzerConfigurationTestsCSharp10
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class CSharp11InheritdocCodeFixProviderUnitTests : CSharp10InheritdocCodeFixProviderUnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class CSharp11NoXmlFileHeaderUnitTests : CSharp10NoXmlFileHeaderUnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1600CSharp11UnitTests : SA1600CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1601CSharp11UnitTests : SA1601CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1602CSharp11UnitTests : SA1602CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1603CSharp11UnitTests : SA1603CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1604CSharp11UnitTests : SA1604CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1605CSharp11UnitTests : SA1605CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1606CSharp11UnitTests : SA1606CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1607CSharp11UnitTests : SA1607CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1608CSharp11UnitTests : SA1608CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1609CSharp11UnitTests : SA1609CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1610CSharp11UnitTests : SA1610CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1611CSharp11UnitTests : SA1611CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1612CSharp11UnitTests : SA1612CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1613CSharp11UnitTests : SA1613CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1614CSharp11UnitTests : SA1614CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1615CSharp11UnitTests : SA1615CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1616CSharp11UnitTests : SA1616CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1617CSharp11UnitTests : SA1617CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1618CSharp11UnitTests : SA1618CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1619CSharp11UnitTests : SA1619CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1620CSharp11UnitTests : SA1620CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1621CSharp11UnitTests : SA1621CSharp10UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

#nullable disable

namespace StyleCop.Analyzers.Test.CSharp11.DocumentationRules
{
using StyleCop.Analyzers.Test.CSharp10.DocumentationRules;

public class SA1622CSharp11UnitTests : SA1622CSharp10UnitTests
{
}
}
Loading

0 comments on commit e0ee7b2

Please sign in to comment.