Skip to content

Commit 1dd0ffe

Browse files
Add Roslyn analyzers for string optimization patterns
- Implemented 8 diagnostic rules (OPENTXT001-008) for detecting inefficient string patterns - Created analyzers for: Substring, Split, string concatenation, IndexOf+Substring, Trim+Equals - Added code fix provider for Split patterns - Comprehensive test suite with smart detection tests to prevent false positives - Extensive documentation: README, EXAMPLES, CONTRIBUTING, TESTING_STRATEGY, QUICK_REFERENCE - Integrated into solution with proper NuGet package configuration - Analyzers use semantic analysis for type safety and context-aware suggestions
1 parent abdc3ee commit 1dd0ffe

24 files changed

Lines changed: 3748 additions & 0 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<LangVersion>latest</LangVersion>
6+
<Nullable>enable</Nullable>
7+
<IsPackable>false</IsPackable>
8+
<IsTestProject>true</IsTestProject>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.1" />
13+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.1" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
15+
<PackageReference Include="xunit" Version="2.6.2" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
<PrivateAssets>all</PrivateAssets>
19+
</PackageReference>
20+
<PackageReference Include="coverlet.collector" Version="6.0.0">
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
<PrivateAssets>all</PrivateAssets>
23+
</PackageReference>
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<ProjectReference Include="..\Analyzers\Open.Text.Analyzers.csproj" />
28+
</ItemGroup>
29+
30+
</Project>

0 commit comments

Comments
 (0)