A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/signumsoftware/framework/commit/2cbf5c906b2485a252d3db9237e8f131d484f0fc below:

upgrade Signum.Analyzer to 2.0 with nullability temp fix · signumsoftware/framework@2cbf5c9 · GitHub

File tree Expand file treeCollapse file tree 8 files changed

+20

-9

lines changed

Filter options

Expand file treeCollapse file tree 8 files changed

+20

-9

lines changed Original file line number Diff line number Diff line change

@@ -190,6 +190,15 @@ public void ExpressionExplicitCorrect()

190 190

public static int OperationLogs(this Entity e) => 0;", includeExpression: true);

191 191

}

192 192 193 +

[TestMethod]

194 +

public void ExpressionExplicitCorrectNullable()

195 +

{

196 +

TestDiagnostic(null, @"

197 +

static Expression<Func<Entity, string?>> MyExpression;

198 +

[ExpressionField(""MyExpression"")]

199 +

public static string? OperationLogs(this Entity e) => """";", includeExpression: true);

200 +

}

201 + 193 202 194 203

private void TestDiagnostic(string expectedError, string code, bool includeExpression = false, bool staticClass = true, bool assertErrors = true)

195 204

{

Original file line number Diff line number Diff line change

@@ -20,7 +20,7 @@ protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()

20 20

[TestMethod]

21 21

public void CompareLiteAndEntity()

22 22

{

23 -

TestDiagnostic("Impossible to compare Lite<T> and T. Consider using RefersTo method", @"

23 +

TestDiagnostic("Impossible to compare Lite<T> and T. Consider using 'Is' extension method", @"

24 24

Lite<Entity> lite = null;

25 25

Entity entity = null;

26 26

var condition = lite == entity;

Original file line number Diff line number Diff line change

@@ -96,7 +96,8 @@ static void AnalyzeAttributeSymbol(SyntaxNodeAnalysisContext context)

96 96 97 97

if (!expressionType.Equals(fieldSymbol.Type))

98 98

{

99 -

//if (!expressionType.ToString().Equals(fieldSymbol.Type.ToString())) // Till there is an API to express nullability

99 +

if (!expressionType.ToString().Replace("?", "").Equals(

100 +

fieldSymbol.Type.ToString().Replace("?", ""))) // Till there is an API to express nullability

100 101

{

101 102

var minimalParts = expressionType.ToMinimalDisplayString(context.SemanticModel, member.GetLocation().SourceSpan.Start);

102 103

Diagnostic(context, ident, att.GetLocation(), string.Format("type of '{0}' should be '{1}'", fieldName, minimalParts));

Original file line number Diff line number Diff line change

@@ -8,7 +8,7 @@

8 8 9 9

<PropertyGroup>

10 10

<PackageId>Signum.Analyzer</PackageId>

11 -

<PackageVersion>2.0.0-beta</PackageVersion>

11 +

<PackageVersion>2.0.0</PackageVersion>

12 12

<Authors>Olmo del Corral</Authors>

13 13

<PackageProjectUrl>http://www.signumframework.com</PackageProjectUrl>

14 14

<RepositoryUrl>https://github.com/signumsoftware/framework</RepositoryUrl>

@@ -17,9 +17,10 @@

17 17

<Copyright></Copyright>

18 18

<PackageTags>Signum.Analyzer, analyzers</PackageTags>

19 19

<NoPackageAnalysis>true</NoPackageAnalysis>

20 -

<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>

21 -

<Version>2.0.0-beta</Version>

20 +

<PackageLicenseUrl></PackageLicenseUrl>

21 +

<Version>2.0.0</Version>

22 22

<PackageIconUrl>https://raw.githubusercontent.com/signumsoftware/framework/master/SignumLogo.png</PackageIconUrl>

23 +

<PackageLicenseExpression>MIT</PackageLicenseExpression>

23 24

</PropertyGroup>

24 25 25 26

<ItemGroup>

Original file line number Diff line number Diff line change

@@ -10,7 +10,7 @@

10 10

</PropertyGroup>

11 11 12 12

<ItemGroup>

13 -

<PackageReference Include="Signum.Analyzer" Version="1.0.1" />

13 +

<PackageReference Include="Signum.Analyzer" Version="2.0.0" />

14 14

<PackageReference Include="Signum.MSBuildTask" Version="1.0.3" />

15 15

</ItemGroup>

16 16 Original file line number Diff line number Diff line change

@@ -10,7 +10,7 @@

10 10

</PropertyGroup>

11 11 12 12

<ItemGroup>

13 -

<PackageReference Include="Signum.Analyzer" Version="1.0.1" />

13 +

<PackageReference Include="Signum.Analyzer" Version="2.0.0" />

14 14

<PackageReference Include="Signum.MSBuildTask" Version="1.0.3" />

15 15

</ItemGroup>

16 16 Original file line number Diff line number Diff line change

@@ -26,7 +26,7 @@

26 26

</ItemGroup>

27 27 28 28

<ItemGroup>

29 -

<PackageReference Include="Signum.Analyzer" Version="1.0.1" />

29 +

<PackageReference Include="Signum.Analyzer" Version="2.0.0" />

30 30

<PackageReference Include="Signum.TSGenerator" Version="2.0.1" />

31 31

</ItemGroup>

32 32 Original file line number Diff line number Diff line change

@@ -20,7 +20,7 @@

20 20

<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />

21 21

<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="2.2.0" />

22 22

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />

23 -

<PackageReference Include="Signum.Analyzer" Version="1.0.1" />

23 +

<PackageReference Include="Signum.Analyzer" Version="2.0.0" />

24 24

<PackageReference Include="xunit" Version="2.4.1" />

25 25

<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">

26 26

<PrivateAssets>all</PrivateAssets>

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4