Skip to content

Commit 6d7a535

Browse files
authored
chore: Cleanup .props file (#476)
Signed-off-by: André Silva <[email protected]> <!-- Please use this template for your pull request. --> <!-- Please use the sections that you need and delete other sections --> ## This PR <!-- add the description of the PR here --> This pull request introduces several changes to improve project configuration and clean up unused code. The most significant updates include enabling implicit usings globally, removing redundant `Nullable` and `ImplicitUsings` properties from specific project files, and cleaning up unused `using` directives across multiple source files. ### Project configuration improvements: * Enabled `ImplicitUsings` globally in `build/Common.props` to streamline code and reduce boilerplate. Removed redundant `TreatWarningsAsErrors` configuration for the Release build. [[1]](diffhunk://#diff-3e9cdf5c2ef721be7342fcd07bd9e3567805d13357c97221e15137225f64e063R10) [[2]](diffhunk://#diff-3e9cdf5c2ef721be7342fcd07bd9e3567805d13357c97221e15137225f64e063L21-L24) * Added conditional `Using` directives for test projects in `build/Common.tests.props`, ensuring proper dependencies for E2E tests. ### Code cleanup: * Removed redundant `Nullable` and `ImplicitUsings` properties from `OpenFeature.DependencyInjection.csproj` and `OpenFeature.Hosting.csproj` as these are now handled globally. [[1]](diffhunk://#diff-55279cca9fb64343216b7896e3aa5ea96521b091ba68f0b06a2e9430b0a35962L5-L6) [[2]](diffhunk://#diff-1ceba8f8b16fba8e2b45f9f2f2c78e2e92129949e560f4346df2dd99fdbbd5f4L5-L6) * Cleaned up unused `using` directives across multiple source files, including `Api.cs`, `AsyncLocalTransactionContextPropagator.cs`, and various exception classes, to improve readability and maintainability. [[1]](diffhunk://#diff-dc150fbd3b7be797470374ee7e38c7ab8a31eb9b6b7a52345e05114c2d32a15eL1-L6) [[2]](diffhunk://#diff-d9ca58e32d696079f875c51837dfc6ded087b06eb3aef3513f5ea15ebc22c700L1) [[3]](diffhunk://#diff-a7a382f3d0da52015d1b9e03802692a86c61e7b57580747f31fae37d8dcc5cd6L1) [[4]](diffhunk://#diff-b9fdde9b61e62d7c474069ea5fc2a43d123ab86d93cb9a6d0673254a64536722L1) [[5]](diffhunk://#diff-bb4aadb03ea44e3b6b74b83f12b2b1a258e13836bcf815f996addcd5537a478fL1) [[6]](diffhunk://#diff-89efe60a8b640cc303a38e5b01bc27ad40599e364ff2654a57b7e42138056cdaL1) [[7]](diffhunk://#diff-7a8cbfba7673f1b69d3d927f60eb4ab0aa548403a118fad9eb43b9a22875dc02L1) [[8]](diffhunk://#diff-48ae8447bc31a75ecf4bba768a7b68244fbbc9dd5480db9114d9c74fb10fe2efL1) [[9]](diffhunk://#diff-9a3b5bf7bf3351a6161fc6dd75830bfbaab7aca730cf3f0ae6cd120a76b2f1b1L1) [[10]](diffhunk://#diff-c4388b2e7252e2e3ac0967dbfdd4647a924cdfc54da229667a0db3613b243a7eL1) [[11]](diffhunk://#diff-44c88ae43caf99ee733ec911fa85454a96c57d07fc57d2fadd44e12cd7d31cd4L1) [[12]](diffhunk://#diff-f563baadcf750bb66efaea76d7ec4783320e6efdc45c468effb531c948a2292cL1-L4) [[13]](diffhunk://#diff-f94bf65f426e13a14f798a8db21a5c9dd3306f5941bde1aba79af3e41421bfc0L1-L3) [[14]](diffhunk://#diff-96ebc8fc507d0a19d55b9a5cb57b72a0e8058e09f31ee7d0b39e99b00c5029d8L2-L4) [[15]](diffhunk://#diff-d69e6a4b3c0fb22dcb05a1104cd353a597bc8f54bb29c458ed41d394d8f1c12aL1-L4) [[16]](diffhunk://#diff-ac87556ad78da36624700cf5bea44dc7cf279c59bb486203b6af9689427a8c9cL1) --------- Signed-off-by: André Silva <[email protected]>
1 parent 9742a0d commit 6d7a535

File tree

77 files changed

+6
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+6
-197
lines changed

build/Common.props

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<!-- Workaround for IDE0005 (Remove unnecessary usings/imports); see https://github.com/dotnet/roslyn/issues/41640 -->
88
<NoWarn>EnableGenerateDocumentationFile</NoWarn>
99
<Nullable>enable</Nullable>
10+
<ImplicitUsings>enable</ImplicitUsings>
1011
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1112
<NuGetAudit>true</NuGetAudit>
1213
<NuGetAuditMode>all</NuGetAuditMode>
@@ -18,10 +19,6 @@
1819
<DebugSymbols>true</DebugSymbols>
1920
</PropertyGroup>
2021

21-
<PropertyGroup Condition="'$(Configuration)'=='Release'">
22-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
23-
</PropertyGroup>
24-
2522
<ItemGroup>
2623
<PackageReference Include="System.Collections.Immutable" Condition="'$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0'" />
2724
<PackageReference Include="System.Threading.Channels" Condition="'$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0'" />

build/Common.tests.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
<Content Include="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenFeature.slnx'))\build\xunit.runner.json">
1414
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1515
</Content>
16+
<Using Include="Xunit" />
17+
</ItemGroup>
18+
19+
<ItemGroup Condition="$(MSBuildProjectName.Contains('E2E'))">
20+
<Using Include="Reqnroll" />
1621
</ItemGroup>
1722

1823
<ItemGroup>

src/OpenFeature.DependencyInjection/OpenFeature.DependencyInjection.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;net8.0;net9.0;net462</TargetFrameworks>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
75
<RootNamespace>OpenFeature.DependencyInjection</RootNamespace>
86
</PropertyGroup>
97

src/OpenFeature.Hosting/OpenFeature.Hosting.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
75
<RootNamespace>OpenFeature</RootNamespace>
86
</PropertyGroup>
97

src/OpenFeature/Api.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
21
using System.Collections.Concurrent;
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Threading;
6-
using System.Threading.Tasks;
72
using Microsoft.Extensions.Logging;
83
using OpenFeature.Constant;
94
using OpenFeature.Error;

src/OpenFeature/AsyncLocalTransactionContextPropagator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Threading;
21
using OpenFeature.Model;
32

43
namespace OpenFeature;

src/OpenFeature/Error/FeatureProviderException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using OpenFeature.Constant;
32

43
namespace OpenFeature.Error;

src/OpenFeature/Error/FlagNotFoundException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Diagnostics.CodeAnalysis;
32
using OpenFeature.Constant;
43

src/OpenFeature/Error/GeneralException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Diagnostics.CodeAnalysis;
32
using OpenFeature.Constant;
43

src/OpenFeature/Error/InvalidContextException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Diagnostics.CodeAnalysis;
32
using OpenFeature.Constant;
43

0 commit comments

Comments
 (0)