Skip to content

Commit 440bdc6

Browse files
authored
Merge pull request #1 from itmo-is-dev/feat/must-be-partial
Feat/must be partial
2 parents 23c5d10 + aed9269 commit 440bdc6

28 files changed

+727
-51
lines changed

Directory.Packages.props

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageVersion Include="Ben.Demystifier" Version="0.4.1" />
7+
<PackageVersion Include="coverlet.collector" Version="3.2.0" />
8+
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
9+
<PackageVersion Include="Lokad.ILPack" Version="0.2.0" />
10+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
11+
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.5.0" />
12+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.1" />
13+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.1" />
14+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.5.0" />
15+
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.5.0" />
16+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0"/>
17+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
18+
<PackageVersion Include="PolySharp" Version="1.13.1" />
19+
<PackageVersion Include="Sigil" Version="5.0.0" />
20+
<PackageVersion Include="System.Reflection.Emit" Version="4.7.0" />
21+
<PackageVersion Include="System.Reflection.Emit.ILGeneration" Version="4.7.0" />
22+
<PackageVersion Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
23+
<PackageVersion Include="xunit" Version="2.4.2" />
24+
<PackageVersion Include="Xunit.DependencyInjection.Demystifier" Version="8.0.1" />
25+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
26+
</ItemGroup>
27+
</Project>

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 ITMO is DEV
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NuGet.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="local-Analyzers.MustBePartial" value="src/analyzers/SourceKit.Analyzers.MustBePartial/bin/Release"/>
5+
<add key="local-Analyzers.MustBePartial.Annotations" value="src/analyzers/SourceKit.Analyzers.MustBePartial.Annotations/bin/Release"/>
6+
</packageSources>
7+
</configuration>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SourceKit

SourceKit.Sample/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[*.cs]
2+
3+
dotnet_diagnostic.SK1000.severity = warning
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using SourceKit.Analyzers.MustBePartial.Annotations;
2+
3+
namespace SourceKit.Sample.Analyzers.MustBePartial;
4+
5+
[DerivativesMustBePartial]
6+
public interface IPartialBase { }
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace SourceKit.Sample.Analyzers.MustBePartial;
2+
3+
public class NonPartialDerivative : IPartialBase
4+
{
5+
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace SourceKit.Sample.Analyzers.MustBePartial;
2+
3+
public partial class PartialDerivative : IPartialBase
4+
{
5+
6+
}

SourceKit.Sample/Class1.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using System.Runtime.CompilerServices;
54
using SourceKit.Sample.Models;
65

76
namespace SourceKit.Sample;

SourceKit.Sample/Playground.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ public class Playground
88
private static IEnumerable<int> A(IEnumerable<int> e)
99
=> e.Where(x => new[] { x }.Where(y => y > 1).Any());
1010

11-
public static void A()
11+
public static void Main()
1212
{
13-
var x = new int[,]
14-
{
15-
};
1613
}
1714
}

0 commit comments

Comments
 (0)