Skip to content

Commit

Permalink
make EnforceCodeStyleInBuild global
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-shirbandi committed Dec 8, 2023
1 parent a30f9f9 commit 6748284
Show file tree
Hide file tree
Showing 38 changed files with 98 additions and 129 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion src/1-BuildingBlocks/Application/Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.BuildingBlocks.Application</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Application</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
Expand Down
5 changes: 2 additions & 3 deletions src/1-BuildingBlocks/Contracts/Contracts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.BuildingBlocks.Contracts</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Contracts</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\net6.0\TaskoMask.BuildingBlocks.Contracts.xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
Expand All @@ -16,7 +15,7 @@
<DocumentationFile>bin\Debug\net6.0\TaskoMask.BuildingBlocks.Contracts.xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<Compile Update="Resources\ContractsMessages.Designer.cs">
<DependentUpon>ContractsMessages.resx</DependentUpon>
Expand Down
3 changes: 1 addition & 2 deletions src/1-BuildingBlocks/Domain/Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.BuildingBlocks.Domain</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Domain</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MediatR" Version="9.0.0" />
Expand All @@ -14,6 +13,6 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Contracts\Contracts.csproj" />
<ProjectReference Include="..\Contracts\Contracts.csproj" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions src/1-BuildingBlocks/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.BuildingBlocks.Infrastructure</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Infrastructure</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
Expand All @@ -18,6 +17,6 @@
<PackageReference Include="MassTransit.RabbitMQ" Version="8.0.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Application\Application.csproj" />
<ProjectReference Include="..\Application\Application.csproj" />
</ItemGroup>
</Project>
13 changes: 6 additions & 7 deletions src/1-BuildingBlocks/Test/Test.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.BuildingBlocks.Test</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Test</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.BuildingBlocks.Test</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Test</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
Expand Down
7 changes: 3 additions & 4 deletions src/1-BuildingBlocks/Web.MVC/Web.MVC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.BuildingBlocks.Web.MVC</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Web.MVC</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Helpers\**" />
<EmbeddedResource Remove="Helpers\**" />
<None Remove="Helpers\**" />
<Compile Remove="Helpers\**" />
<EmbeddedResource Remove="Helpers\**" />
<None Remove="Helpers\**" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/1-BuildingBlocks/Web/Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.BuildingBlocks.Web</AssemblyName>
<RootNamespace>TaskoMask.BuildingBlocks.Web</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -20,7 +19,7 @@
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Contracts\Contracts.csproj" />
<ProjectReference Include="..\Contracts\Contracts.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<DockerComposeProjectPath>..\..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down Expand Up @@ -39,7 +38,7 @@
<Protobuf Include="..\..\..\..\1-BuildingBlocks\Contracts\Protos\get_project_by_id.proto" GrpcServices="Client" />

</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Infrastructure\Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Web.MVC\Web.MVC.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<DockerComposeProjectPath>..\..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -29,9 +28,9 @@
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Web.MVC\Web.MVC.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<AssemblyName>TaskoMask.Services.Boards.Read.Tests.Integration</AssemblyName>
<RootNamespace>TaskoMask.Services.Boards.Read.Tests.Integration</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Boards.Write.Tests.Base</AssemblyName>
<RootNamespace>TaskoMask.Services.Boards.Write.Tests.Base</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Boards.Write.Tests.Base</AssemblyName>
<RootNamespace>TaskoMask.Services.Boards.Write.Tests.Base</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Boards.Write.Api\Boards.Write.Api.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.Services.Boards.Write.Tests.Integration</AssemblyName>
<RootNamespace>TaskoMask.Services.Boards.Write.Tests.Integration</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.Services.Boards.Write.Tests.Integration</AssemblyName>
<RootNamespace>TaskoMask.Services.Boards.Write.Tests.Integration</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<AssemblyName>TaskoMask.Services.Boards.Write.Tests.Unit</AssemblyName>
<RootNamespace>TaskoMask.Services.Boards.Write.Tests.Unit</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
49 changes: 24 additions & 25 deletions src/2-Services/Identity/Api/Identity.Api/Identity.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Identity.Api</AssemblyName>
<RootNamespace>TaskoMask.Services.Identity.Api</RootNamespace>
<UserSecretsId>755a7a1d-10e7-4626-9a60-81b74933b0b3</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<DockerComposeProjectPath>..\..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Identity.Api</AssemblyName>
<RootNamespace>TaskoMask.Services.Identity.Api</RootNamespace>
<UserSecretsId>755a7a1d-10e7-4626-9a60-81b74933b0b3</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<DockerComposeProjectPath>..\..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="6.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="6.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Web.MVC\Web.MVC.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Web.MVC\Web.MVC.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>TaskoMask.Services.Identity.Tests.Integration</AssemblyName>
<RootNamespace>TaskoMask.Services.Identity.Tests.Integration</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,8 +20,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Identity.Api\Identity.Api.csproj" />
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Identity.Api\Identity.Api.csproj" />
</ItemGroup>

<Target Name="CopyConfig" AfterTargets="AfterBuild">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Identity.Tests.Unit</AssemblyName>
<RootNamespace>TaskoMask.Services.Identity.Tests.Unit</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,8 +19,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Identity.Api\Identity.Api.csproj" />
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Identity.Api\Identity.Api.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<DockerComposeProjectPath>..\..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -28,7 +27,7 @@
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>

<ItemGroup>
<Protobuf Include="..\..\..\..\1-BuildingBlocks\Contracts\Protos\base.proto" GrpcServices="Server" />
<Protobuf Include="..\..\..\..\1-BuildingBlocks\Contracts\Protos\get_organizations_by_owner_id.proto" GrpcServices="Server" />
Expand All @@ -40,5 +39,5 @@
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Infrastructure\Infrastructure.csproj" />
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Web.MVC\Web.MVC.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
<DockerComposeProjectPath>..\..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<AssemblyName>TaskoMask.Services.Owners.Read.IntegrationTests</AssemblyName>
<RootNamespace>TaskoMask.Services.Owners.Read.IntegrationTests</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Owners.Write.Tests.Base</AssemblyName>
<RootNamespace>TaskoMask.Services.Owners.Write.Tests.Base</RootNamespace>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Owners.Write.Api\Owners.Write.Api.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>TaskoMask.Services.Owners.Write.Tests.Base</AssemblyName>
<RootNamespace>TaskoMask.Services.Owners.Write.Tests.Base</RootNamespace>

</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\1-BuildingBlocks\Test\Test.csproj" />
<ProjectReference Include="..\..\Api\Owners.Write.Api\Owners.Write.Api.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<AssemblyName>TaskoMask.Services.Owners.Write.Tests.Integration</AssemblyName>
<RootNamespace>TaskoMask.Services.Owners.Write.Tests.Integration</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<AssemblyName>TaskoMask.Services.Owners.Write.Tests.Unit</AssemblyName>
<RootNamespace>TaskoMask.Services.Owners.Write.Tests.Unit</RootNamespace>
<IsPackable>false</IsPackable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 6748284

Please sign in to comment.