diff --git a/.editorconfig b/.editorconfig index ed9afcb4..098f0142 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,17 @@ -[*.cs] +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.cs] +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false + +[*.cs] # IDE0022: Use block body for method csharp_style_expression_bodied_methods = when_on_single_line:silent diff --git a/Directory.Packages.props b/Directory.Packages.props index 2081aa66..53873452 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,4 +1,4 @@ -<Project> +<Project> <PropertyGroup> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> </PropertyGroup> @@ -25,4 +25,4 @@ <PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" /> <PackageVersion Include="xunit.analyzers" Version="1.17.0" /> </ItemGroup> -</Project> \ No newline at end of file +</Project> diff --git a/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj b/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj index d55d5fc1..839c1df7 100644 --- a/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj +++ b/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj @@ -1,9 +1,9 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <TargetFramework>net9.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <OutputType>Exe</OutputType> + <TargetFramework>net9.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <OutputType>Exe</OutputType> <NoWarn>$(NoWarn);NU5104</NoWarn> <IsPackable>false</IsPackable> <LangVersion>preview</LangVersion> diff --git a/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj b/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj index b8fa2c4d..b388fd8d 100644 --- a/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj +++ b/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj @@ -1,39 +1,39 @@ <Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks> - <LangVersion>latest</LangVersion> - <PackageIcon>logo_64x64.png</PackageIcon> - <IsPackable>true</IsPackable> - <!-- Ignore: The target framework '...' is out of support and will not receive security updates in the future --> - <NoWarn>$(NoWarn);NETSDK1138</NoWarn> - </PropertyGroup> - - <ItemGroup> - <None Include="../Assets/logo_64x64.png" Pack="true" Visible="false" PackagePath="" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\Fluid\Fluid.csproj" /> - <ProjectReference Include="..\Fluid.ViewEngine\Fluid.ViewEngine.csproj" /> - </ItemGroup> - - <ItemGroup Condition="'$(TargetFramework)'=='net6.0'"> - <FrameworkReference Include="Microsoft.AspNetCore.App" Version="6.0.0" /> - </ItemGroup> - - <ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> - <FrameworkReference Include="Microsoft.AspNetCore.App" Version="8.0.0" /> - </ItemGroup> - - <ItemGroup Condition="'$(TargetFramework)'=='net9.0'"> - <FrameworkReference Include="Microsoft.AspNetCore.App" Version="9.0.0" /> - </ItemGroup> - - <ItemGroup> - <Compile Include="..\Fluid\ExceptionHelper.cs"> - <Link>ExceptionHelper.cs</Link> - </Compile> - </ItemGroup> + <PropertyGroup> + <TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks> + <LangVersion>latest</LangVersion> + <PackageIcon>logo_64x64.png</PackageIcon> + <IsPackable>true</IsPackable> + <!-- Ignore: The target framework '...' is out of support and will not receive security updates in the future --> + <NoWarn>$(NoWarn);NETSDK1138</NoWarn> + </PropertyGroup> + + <ItemGroup> + <None Include="../Assets/logo_64x64.png" Pack="true" Visible="false" PackagePath="" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Fluid\Fluid.csproj" /> + <ProjectReference Include="..\Fluid.ViewEngine\Fluid.ViewEngine.csproj" /> + </ItemGroup> + + <ItemGroup Condition="'$(TargetFramework)'=='net6.0'"> + <FrameworkReference Include="Microsoft.AspNetCore.App" Version="6.0.0" /> + </ItemGroup> + + <ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> + <FrameworkReference Include="Microsoft.AspNetCore.App" Version="8.0.0" /> + </ItemGroup> + + <ItemGroup Condition="'$(TargetFramework)'=='net9.0'"> + <FrameworkReference Include="Microsoft.AspNetCore.App" Version="9.0.0" /> + </ItemGroup> + + <ItemGroup> + <Compile Include="..\Fluid\ExceptionHelper.cs"> + <Link>ExceptionHelper.cs</Link> + </Compile> + </ItemGroup> </Project> diff --git a/Fluid/Fluid.csproj b/Fluid/Fluid.csproj index 27157f27..14cb2939 100644 --- a/Fluid/Fluid.csproj +++ b/Fluid/Fluid.csproj @@ -1,68 +1,56 @@ <Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - <LangVersion>latest</LangVersion> - <IsPackable>true</IsPackable> - <ImplicitUsings>true</ImplicitUsings> - <GenerateDocumentationFile>true</GenerateDocumentationFile> - <!-- Ingore missing comments errors and obsolete TFMs --> - <NoWarn>$(NoWarn);CS1591;NETSDK1138</NoWarn> - - <AnalysisLevel>latest-Recommended</AnalysisLevel> - <NoWarn>$(NoWarn);CA1016</NoWarn> - <!-- CA1016: Mark assemblies with AssemblyVersionAttribute --> - <NoWarn>$(NoWarn);CA1051</NoWarn> - <!-- CA1051: Do not declare visible instance fields --> - <NoWarn>$(NoWarn);CA1200</NoWarn> - <!-- CA1200: Avoid using cref tags with a prefix --> - <NoWarn>$(NoWarn);CA1304</NoWarn> - <!-- CA1304: Specify CultureInfo --> - <NoWarn>$(NoWarn);CA1305</NoWarn> - <!-- CA1305: Specify IFormatProvider --> - <NoWarn>$(NoWarn);CA1310</NoWarn> - <!-- CA1310: Specify StringComparison --> - <NoWarn>$(NoWarn);CA1711</NoWarn> - <!-- CA1711: Identifiers should not have incorrect suffix --> - <NoWarn>$(NoWarn);CA1716</NoWarn> - <!-- CA1716: Identifiers should not match keywords --> - <NoWarn>$(NoWarn);CA1720</NoWarn> - <!-- CA1720: Identifier contains type name --> - <NoWarn>$(NoWarn);CA1805</NoWarn> - <!-- CA1805: Do not initialize unnecessarily --> - <NoWarn>$(NoWarn);CA1863</NoWarn> - <!-- CA1863: Cache a 'CompositeFormat' for repeated use in this formatting operation --> - <NoWarn>$(NoWarn);CA2012</NoWarn> - <!-- CA2012: Use ValueTasks correctly --> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Parlot" /> - <PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" /> - <PackageReference Include="TimeZoneConverter" /> - </ItemGroup> - - <ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'"> - <PackageReference Include="System.Text.Json" /> - <PackageReference Include="Microsoft.CSharp" /> - <PackageReference Include="System.Reflection.Emit.Lightweight" /> - </ItemGroup> - - <!-- Keep specific targets since it removes some dependencies --> - <ItemGroup Condition="'$(TargetFramework)'=='net6.0'"> - </ItemGroup> - - <ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> - </ItemGroup> - - <ItemGroup Condition="'$(TargetFramework)'=='net9.0'"> - </ItemGroup> - - <PropertyGroup> - <PackageReadmeFile>README.md</PackageReadmeFile> - </PropertyGroup> - <ItemGroup> - <None Include="..\README.md" Pack="true" PackagePath="\" /> - </ItemGroup> + <PropertyGroup> + <TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <LangVersion>latest</LangVersion> + <IsPackable>true</IsPackable> + <ImplicitUsings>true</ImplicitUsings> + <GenerateDocumentationFile>true</GenerateDocumentationFile> + <!-- Ingore missing comments errors and obsolete TFMs --> + <NoWarn>$(NoWarn);CS1591;NETSDK1138</NoWarn> + + <AnalysisLevel>latest-Recommended</AnalysisLevel> + <NoWarn>$(NoWarn);CA1016</NoWarn> <!-- CA1016: Mark assemblies with AssemblyVersionAttribute --> + <NoWarn>$(NoWarn);CA1051</NoWarn> <!-- CA1051: Do not declare visible instance fields --> + <NoWarn>$(NoWarn);CA1200</NoWarn> <!-- CA1200: Avoid using cref tags with a prefix --> + <NoWarn>$(NoWarn);CA1304</NoWarn> <!-- CA1304: Specify CultureInfo --> + <NoWarn>$(NoWarn);CA1305</NoWarn> <!-- CA1305: Specify IFormatProvider --> + <NoWarn>$(NoWarn);CA1310</NoWarn> <!-- CA1310: Specify StringComparison --> + <NoWarn>$(NoWarn);CA1711</NoWarn> <!-- CA1711: Identifiers should not have incorrect suffix --> + <NoWarn>$(NoWarn);CA1716</NoWarn> <!-- CA1716: Identifiers should not match keywords --> + <NoWarn>$(NoWarn);CA1720</NoWarn> <!-- CA1720: Identifier contains type name --> + <NoWarn>$(NoWarn);CA1805</NoWarn> <!-- CA1805: Do not initialize unnecessarily --> + <NoWarn>$(NoWarn);CA1863</NoWarn> <!-- CA1863: Cache a 'CompositeFormat' for repeated use in this formatting operation --> + <NoWarn>$(NoWarn);CA2012</NoWarn> <!-- CA2012: Use ValueTasks correctly --> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Parlot" /> + <PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" /> + <PackageReference Include="TimeZoneConverter" /> + </ItemGroup> + + <ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'"> + <PackageReference Include="System.Text.Json" /> + <PackageReference Include="Microsoft.CSharp" /> + <PackageReference Include="System.Reflection.Emit.Lightweight" /> + </ItemGroup> + + <!-- Keep specific targets since it removes some dependencies --> + <ItemGroup Condition="'$(TargetFramework)'=='net6.0'"> + </ItemGroup> + + <ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> + </ItemGroup> + + <ItemGroup Condition="'$(TargetFramework)'=='net9.0'"> + </ItemGroup> + + <PropertyGroup> + <PackageReadmeFile>README.md</PackageReadmeFile> + </PropertyGroup> + <ItemGroup> + <None Include="..\README.md" Pack="true" PackagePath="\" /> + </ItemGroup> </Project> diff --git a/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj b/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj index 9a4e7a53..fabaf3e1 100644 --- a/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj +++ b/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj @@ -1,35 +1,35 @@ <Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFrameworks>net8.0;net9.0</TargetFrameworks> - <LangVersion>9</LangVersion> - <IsPackable>true</IsPackable> - <PackageIcon>logo_64x64.png</PackageIcon> - <PackageId>MinimalApis.LiquidViews</PackageId> - <Description>MinimalApis.LiquidViews is a view engine for ASP.NET Core Minimal APIs based on the Liquid templating language.</Description> - </PropertyGroup> + <PropertyGroup> + <TargetFrameworks>net8.0;net9.0</TargetFrameworks> + <LangVersion>9</LangVersion> + <IsPackable>true</IsPackable> + <PackageIcon>logo_64x64.png</PackageIcon> + <PackageId>MinimalApis.LiquidViews</PackageId> + <Description>MinimalApis.LiquidViews is a view engine for ASP.NET Core Minimal APIs based on the Liquid templating language.</Description> + </PropertyGroup> - <ItemGroup> - <None Include="../Assets/logo_64x64.png" Pack="true" Visible="false" PackagePath="" /> - </ItemGroup> + <ItemGroup> + <None Include="../Assets/logo_64x64.png" Pack="true" Visible="false" PackagePath="" /> + </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Fluid.ViewEngine\Fluid.ViewEngine.csproj" /> - </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Fluid.ViewEngine\Fluid.ViewEngine.csproj" /> + </ItemGroup> - <ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> - <FrameworkReference Include="Microsoft.AspNetCore.App" VersionOverride="8.0.0" /> - </ItemGroup> + <ItemGroup Condition="'$(TargetFramework)'=='net8.0'"> + <FrameworkReference Include="Microsoft.AspNetCore.App" VersionOverride="8.0.0" /> + </ItemGroup> - <ItemGroup Condition="'$(TargetFramework)'=='net9.0'"> - <FrameworkReference Include="Microsoft.AspNetCore.App" VersionOverride="9.0.0" /> - </ItemGroup> + <ItemGroup Condition="'$(TargetFramework)'=='net9.0'"> + <FrameworkReference Include="Microsoft.AspNetCore.App" VersionOverride="9.0.0" /> + </ItemGroup> - <PropertyGroup> - <PackageReadmeFile>README.md</PackageReadmeFile> - </PropertyGroup> - <ItemGroup> - <None Include="README.md" Pack="true" PackagePath="\" /> - </ItemGroup> + <PropertyGroup> + <PackageReadmeFile>README.md</PackageReadmeFile> + </PropertyGroup> + <ItemGroup> + <None Include="README.md" Pack="true" PackagePath="\" /> + </ItemGroup> </Project>