Skip to content

Commit

Permalink
update to fody 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Mar 31, 2018
1 parent 04be101 commit 4781eba
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Fody" Version="2.4.1" />
<PackageReference Include="JetBrains.Annotations" Version="11.1.0" />
<PackageReference Include="JetBrainsAnnotations.Fody" Version="2.0.0" />
</ItemGroup>

</Project>
</Project>
16 changes: 4 additions & 12 deletions AssemblyWithExternalAnnotations/BaseClassWithAttributes.cs
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
namespace AssemblyWithExternalAnnotations
{
using JetBrains.Annotations;

public abstract class BaseClassWithAttributes
{
public abstract void MethodWithNotNullParameter(string canBeNull, [NotNull] string arg);
public abstract void MethodWithNotNullParameter(string canBeNull, string arg);

[NotNull]
public abstract string MethodWithNotNullReturnValue(string arg);

[NotNull]
public abstract string NotNullProperty { get; set; }
}

public interface BaseInterfaceWithAttributes
{
void MethodWithNotNullParameter(string canBeNull, [NotNull] string arg);
void MethodWithNotNullParameter(string canBeNull, string arg);

[NotNull]
string MethodWithNotNullReturnValue(string arg);

[NotNull]
string NotNullProperty { get; set; }
}

public interface InheritedInterface : BaseInterfaceWithAttributes
{

}

public interface InterfaceWithAttributes
{
void MethodWithNotNullParameter(string canBeNull, [NotNull] string arg);
void MethodWithNotNullParameter(string canBeNull, string arg);

[NotNull]
string MethodWithNotNullReturnValue(string arg);

[NotNull]
string NotNullProperty { get; set; }
}
}
4 changes: 0 additions & 4 deletions AssemblyWithExternalAnnotations/FodyWeavers.xml

This file was deleted.

2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>latest</LangVersion>
<Version>1.7.1</Version>
<Version>1.8.0</Version>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion NullGuard.Fody/NullGuard.Fody.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FodyHelpers" Version="2.4.1" />
<PackageReference Include="FodyHelpers" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\NullGuard\ValidationFlags.cs">
Expand Down
4 changes: 2 additions & 2 deletions NullGuard/NullGuard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="2.4.1" PrivateAssets="None" />
<PackageReference Include="FodyPackaging" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="Fody" Version="3.0.0" PrivateAssets="None" />
<PackageReference Include="FodyPackaging" Version="3.0.0" PrivateAssets="All" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions Tests/ApprovedTests.SpecialClass_debug.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.field private int32 '<>1__state'
.field private int32 '<>2__current'
.field private int32 '<>l__initialThreadId'
.field private int32 '<i>5__1'
.field private int32 end
.field public int32 '<>3__end'
.field private int32 '<i>5__2'
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
Expand Down Expand Up @@ -61,11 +61,11 @@
IL_0012: stfld int32 SpecialClass/'<CountTo>d__0'::'<>1__state'
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_0019: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_001e: br.s IL_004c
IL_0020: ldarg.0
IL_0021: ldarg.0
IL_0022: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_0022: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_0027: stfld int32 SpecialClass/'<CountTo>d__0'::'<>2__current'
IL_002c: ldarg.0
IL_002d: ldc.i4.1
Expand All @@ -76,15 +76,15 @@
IL_0036: ldc.i4.m1
IL_0037: stfld int32 SpecialClass/'<CountTo>d__0'::'<>1__state'
IL_003c: ldarg.0
IL_003d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_003d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_0042: stloc.1
IL_0043: ldarg.0
IL_0044: ldloc.1
IL_0045: ldc.i4.1
IL_0046: add
IL_0047: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_0047: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_004c: ldarg.0
IL_004d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_004d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_0052: ldarg.0
IL_0053: ldfld int32 SpecialClass/'<CountTo>d__0'::end
IL_0058: blt.s IL_0020
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="ApprovalTests" Version="3.*" Condition="$(TargetFramework) == 'net46'" />
<PackageReference Include="ApprovalUtilities" Version="3.*" Condition="$(TargetFramework) == 'net46'" />
<PackageReference Include="ObjectApproval" Version="2.2.0" Condition="$(TargetFramework) == 'net46'" />
<PackageReference Include="FodyHelpers" Version="2.4.1" />
<PackageReference Include="FodyHelpers" Version="3.0.0" />
<PackageReference Include="Xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<Reference Include="Microsoft.CSharp" />
Expand Down
2 changes: 1 addition & 1 deletion TestsCommon/TestsCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<DisableFody>true</DisableFody>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FodyHelpers" Version="2.4.1" />
<PackageReference Include="FodyHelpers" Version="3.0.0" />
<PackageReference Include="Xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<Reference Include="Microsoft.CSharp" />
Expand Down
12 changes: 6 additions & 6 deletions TestsExplicit/ApprovedTests.SpecialClass.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.field private int32 '<>1__state'
.field private int32 '<>2__current'
.field private int32 '<>l__initialThreadId'
.field private int32 '<i>5__1'
.field private int32 end
.field public int32 '<>3__end'
.field private int32 '<i>5__2'
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
Expand Down Expand Up @@ -61,11 +61,11 @@
IL_0012: stfld int32 SpecialClass/'<CountTo>d__0'::'<>1__state'
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_0019: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_001e: br.s IL_004c
IL_0020: ldarg.0
IL_0021: ldarg.0
IL_0022: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_0022: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_0027: stfld int32 SpecialClass/'<CountTo>d__0'::'<>2__current'
IL_002c: ldarg.0
IL_002d: ldc.i4.1
Expand All @@ -76,15 +76,15 @@
IL_0036: ldc.i4.m1
IL_0037: stfld int32 SpecialClass/'<CountTo>d__0'::'<>1__state'
IL_003c: ldarg.0
IL_003d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_003d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_0042: stloc.1
IL_0043: ldarg.0
IL_0044: ldloc.1
IL_0045: ldc.i4.1
IL_0046: add
IL_0047: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_0047: stfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_004c: ldarg.0
IL_004d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__1'
IL_004d: ldfld int32 SpecialClass/'<CountTo>d__0'::'<i>5__2'
IL_0052: ldarg.0
IL_0053: ldfld int32 SpecialClass/'<CountTo>d__0'::end
IL_0058: blt.s IL_0020
Expand Down
2 changes: 1 addition & 1 deletion TestsExplicit/TestsExplicit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="ApprovalTests" Version="3.*" Condition="$(TargetFramework) == 'net46'" />
<PackageReference Include="ApprovalUtilities" Version="3.*" Condition="$(TargetFramework) == 'net46'" />
<PackageReference Include="ObjectApproval" Version="2.1.0" Condition="$(TargetFramework) == 'net46'" />
<PackageReference Include="FodyHelpers" Version="2.4.1" />
<PackageReference Include="FodyHelpers" Version="3.0.0" />
<PackageReference Include="Xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<Reference Include="Microsoft.Build.Utilities.v4.0" />
Expand Down

0 comments on commit 4781eba

Please sign in to comment.