Skip to content

Commit

Permalink
Cleanup csproj files (#1865)
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma authored May 19, 2024
1 parent 396f9b7 commit 5ff5589
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 21 deletions.
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseArtifactsOutput>true</UseArtifactsOutput>

<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>

</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Jint.Benchmark/Jint.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CS8002</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Include=".\Scripts\*.*" CopyToOutputDirectory="PreserveNewest" />
Expand Down
3 changes: 1 addition & 2 deletions Jint.Tests.CommonScripts/Jint.Tests.CommonScripts.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand Down
7 changes: 1 addition & 6 deletions Jint.Tests.PublicInterface/Jint.Tests.PublicInterface.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net462</TargetFrameworks>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>..\Jint\Jint.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<IsPackable>false</IsPackable>
Expand All @@ -17,10 +16,6 @@
<ProjectReference Include="..\Jint\Jint.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.CSharp" Condition=" '$(TargetFramework)' == 'net462' " />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Acornima.Extras" />
<PackageReference Include="Flurl.Http.Signed" />
Expand Down
1 change: 0 additions & 1 deletion Jint.Tests.Test262/Jint.Tests.Test262.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<!--<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);net461</TargetFrameworks>-->
<AssemblyOriginatorKeyFile>..\Jint\Jint.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<IsPackable>false</IsPackable>
Expand Down
4 changes: 0 additions & 4 deletions Jint.Tests/Jint.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
<ProjectReference Include="..\Jint\Jint.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.CSharp" Condition=" '$(TargetFramework)' == 'net462' " />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Acornima.Extras" />
<PackageReference Include="FluentAssertions" />
Expand Down
4 changes: 1 addition & 3 deletions Jint.Tests/Parser/JavascriptParserTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Jint.Runtime;

namespace Jint.Tests.Parsing;
namespace Jint.Tests.Parsing;

public class JavascriptParserTests
{
Expand Down
2 changes: 2 additions & 0 deletions Jint.Tests/Runtime/InteropTests.MemberAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ public void CanAccessBaseClassStaticFields()

private class BaseClassWithStatics
{
#pragma warning disable CS0414 // Field is assigned but its value is never used
public static int a = 42;
#pragma warning restore CS0414 // Field is assigned but its value is never used
}

private class InheritingFromClassWithStatics : BaseClassWithStatics
Expand Down
1 change: 0 additions & 1 deletion Jint.Tests/Runtime/InteropTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Jint.Native;
using Jint.Native.Symbol;
using Jint.Runtime;
using Jint.Runtime.Interop;
using Jint.Tests.Runtime.Converters;
Expand Down
2 changes: 2 additions & 0 deletions Jint/AstExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace Jint
{
public static class AstExtensions
{
#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value
internal static readonly SourceLocation DefaultLocation;
#pragma warning restore CS0649 // Field is never assigned to, and will always have its default value

public static JsValue GetKey<T>(this T property, Engine engine) where T : IProperty => GetKey(property.Key, engine, property.Computed);

Expand Down
2 changes: 0 additions & 2 deletions Jint/Jint.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<SignAssembly>true</SignAssembly>
<IsPackable>true</IsPackable>

<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

Expand Down
2 changes: 2 additions & 0 deletions Jint/Native/Generator/GeneratorInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ internal sealed class GeneratorInstance : ObjectInstance
{
internal GeneratorState _generatorState;
private ExecutionContext _generatorContext;
#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value
private readonly JsValue? _generatorBrand;
#pragma warning restore CS0649 // Field is never assigned to, and will always have its default value
private JintStatementList _generatorBody = null!;

public JsValue? _nextValue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Numerics;
using System.Text.RegularExpressions;
using Jint.Native;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Jint.Native;
using Jint.Runtime.Environments;
using Environment = Jint.Runtime.Environments.Environment;

namespace Jint.Runtime.Interpreter.Expressions
{
Expand Down

0 comments on commit 5ff5589

Please sign in to comment.