Created
August 14, 2024 18:11
-
-
Save sebastienros/b2e88eb460396e07c8bdeeb725645a22 to your computer and use it in GitHub Desktop.
Patch format files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d1449e14b396fa7b29f55ff7e1e1f4ebe8f69ad3 Mon Sep 17 00:00:00 2001 | |
From: Sebastien Ros <[email protected]> | |
Date: Wed, 14 Aug 2024 11:09:27 -0700 | |
Subject: [PATCH] Patch format files | |
--- | |
.editorconfig | 6 ++++-- | |
.gitattributes | 4 ---- | |
Directory.Packages.props | 1 + | |
src/OrchardCore.Build/OrchardCore.Commons.props | 5 ++++- | |
4 files changed, 9 insertions(+), 7 deletions(-) | |
diff --git a/.editorconfig b/.editorconfig | |
index e591a9cd54..2cf117a4d8 100644 | |
--- a/.editorconfig | |
+++ b/.editorconfig | |
@@ -1,7 +1,6 @@ | |
root = true | |
[*] | |
-end_of_line = crlf | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 | |
@@ -32,7 +31,10 @@ dotnet_sort_system_directives_first = true | |
# Code-block preferences | |
csharp_prefer_braces = true | |
csharp_prefer_simple_using_statement = true | |
-csharp_style_namespace_declarations = file_scoped:suggestion | |
+csharp_style_namespace_declarations = file_scoped:warning | |
+# Note that currently both IDE* rules and csharp_style_* rules are necessary, because only IDE rules will be enforced | |
+# during build, see: https://github.com/dotnet/roslyn/issues/44201. | |
+dotnet_diagnostic.IDE0161.severity = warning | |
# Range operator | |
csharp_style_prefer_range_operator = false:warning | |
diff --git a/.gitattributes b/.gitattributes | |
index b175f24ba0..afbe3b25f1 100644 | |
--- a/.gitattributes | |
+++ b/.gitattributes | |
@@ -1,7 +1,3 @@ | |
* text=auto | |
**/wwwroot/Scripts/* linguist-vendored | |
- | |
-# Keep LF line endings in webroot assets files. Otherwise, building them under Windows would change the line endings to CLRF and cause changes without actually editing the source files. | |
-**/wwwroot/**/*.js text eol=lf | |
-**/wwwroot/**/*.css text eol=lf | |
diff --git a/Directory.Packages.props b/Directory.Packages.props | |
index a3effff50d..674edaf3f9 100644 | |
--- a/Directory.Packages.props | |
+++ b/Directory.Packages.props | |
@@ -56,6 +56,7 @@ | |
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.1" /> | |
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" /> | |
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" /> | |
+ <PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.10.0"/> | |
<PackageVersion Include="MimeKit" Version="4.7.1" /> | |
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" /> | |
<PackageVersion Include="Moq" Version="4.20.70" /> | |
diff --git a/src/OrchardCore.Build/OrchardCore.Commons.props b/src/OrchardCore.Build/OrchardCore.Commons.props | |
index 1b3d5fcbd2..8679acba8d 100644 | |
--- a/src/OrchardCore.Build/OrchardCore.Commons.props | |
+++ b/src/OrchardCore.Build/OrchardCore.Commons.props | |
@@ -13,7 +13,6 @@ | |
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> | |
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> | |
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | |
- | |
<!-- Common NuGet properties--> | |
<OCFrameworkDescription>Orchard Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core.</OCFrameworkDescription> | |
<OCCMSDescription>Orchard Core CMS is a Web Content Management System (CMS) built on top of the Orchard Core Framework.</OCCMSDescription> | |
@@ -48,6 +47,10 @@ | |
</ItemGroup> | |
<ItemGroup> | |
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle"> | |
+ <PrivateAssets>all</PrivateAssets> | |
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | |
+ </PackageReference> | |
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" /> | |
</ItemGroup> | |
-- | |
2.45.2.windows.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment