Files
Misaki.HighPerformance/Misaki.HighPerformance.Analyzer/Misaki.HighPerformance.Analyzer.Package/Misaki.HighPerformance.Analyzer.Package.csproj
Misaki 27dfa67784
Some checks failed
Publish NuGet Packages / publish (pull_request) Has been cancelled
Add Roslyn analyzer and code fix for unique ownership
Introduce a Roslyn analyzer to enforce unique ownership semantics for structs marked with the `[NonCopyable]` attribute. Added a corresponding code fix to resolve violations by suggesting the use of `Share()` or other ownership transfer methods.

Key changes:
- Added `StructCopyCodeAnalyzer` to detect invalid struct copies.
- Implemented `StructCopyCodeFixProvider` to provide code fixes.
- Created `Misaki.HighPerformance.Analyzer` and `CodeFixes` projects.
- Added unit tests for the analyzer and code fixes.
- Introduced `UniquePtr<T>` and `SharedPtr<T>` for pointer ownership.
- Added a Visual Studio extension project and packaging support.
- Updated `UnsafeUtility` to use `nint`/`nuint` for indices.
2025-11-22 18:20:03 +09:00

41 lines
1.7 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>False</IncludeBuildOutput>
<SuppressDependenciesWhenPacking>True</SuppressDependenciesWhenPacking>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<AssemblyVersion>1.0.0</AssemblyVersion>
</PropertyGroup>
<PropertyGroup>
<PackageId>Misaki.HighPerformance.Analyzer</PackageId>
<Version>$(AssemblyVersion)</Version>
<Authors>Misaki</Authors>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Description>Misaki.HighPerformance.Analyzer</Description>
<PackageTags>Misaki.HighPerformance.Analyzer, analyzers</PackageTags>
<DevelopmentDependency>True</DevelopmentDependency>
<NoPackageAnalysis>True</NoPackageAnalysis>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);_AddAnalyzersToOutput</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Misaki.HighPerformance.Analyzer.CodeFixes\Misaki.HighPerformance.Analyzer.CodeFixes.csproj" />
<ProjectReference Include="..\Misaki.HighPerformance.Analyzer\Misaki.HighPerformance.Analyzer.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="tools\*.ps1" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="" />
</ItemGroup>
<Target Name="_AddAnalyzersToOutput">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)\Misaki.HighPerformance.Analyzer.dll" PackagePath="analyzers/dotnet/cs" />
<TfmSpecificPackageFile Include="$(OutputPath)\Misaki.HighPerformance.Analyzer.CodeFixes.dll" PackagePath="analyzers/dotnet/cs" />
</ItemGroup>
</Target>
</Project>