From adc9ab53d79100113aeafcc2e113f7847dbf380f Mon Sep 17 00:00:00 2001 From: nsnail Date: Thu, 15 Dec 2022 10:00:12 +0800 Subject: [PATCH] .. --- .editorconfig | 23 ++++--- CodeQuality.props | 17 +++++ StyleCopAnalyzers.ruleset | 129 +++++++++++++++-------------------- dot.sln | 1 + dot.sln.DotSettings | 17 ++--- src/Git/TaskStatusColumn.cs | 3 + src/Lang/Str.resx | 1 - src/Lang/Str.tt | 3 +- src/Time/TaskResultColumn.cs | 3 + src/Time/TaskStatusColumn.cs | 3 + src/dot.csproj | 22 ++---- 11 files changed, 110 insertions(+), 112 deletions(-) create mode 100644 CodeQuality.props diff --git a/.editorconfig b/.editorconfig index 960af82..9c1d16a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,23 +1,26 @@ root = true [*] -indent_style = space -indent_size = 4 -end_of_line = lf charset = utf-8 +end_of_line = lf +ij_xml_attribute_wrap = off +ij_xml_text_wrap = off +indent_size = 4 +indent_style = space +insert_final_newline = false trim_trailing_whitespace = true [*.cs] dotnet_analyzer_diagnostic.severity = warning -dotnet_diagnostic.IDE0008.severity = none -dotnet_diagnostic.IDE0055.severity = none -dotnet_diagnostic.IDE0160.severity = none dotnet_diagnostic.CA1707.severity = none -dotnet_diagnostic.IDE0048.severity = none -dotnet_diagnostic.IDE0058.severity = none -dotnet_diagnostic.IDE0017.severity = none dotnet_diagnostic.CA5350.severity = none dotnet_diagnostic.CA5351.severity = none +dotnet_diagnostic.IDE0008.severity = none +dotnet_diagnostic.IDE0017.severity = none +dotnet_diagnostic.IDE0048.severity = none +dotnet_diagnostic.IDE0055.severity = none +dotnet_diagnostic.IDE0058.severity = none +dotnet_diagnostic.IDE0160.severity = none # ReSharper properties @@ -41,8 +44,8 @@ resharper_csharp_outdent_commas = true resharper_csharp_place_type_constraints_on_same_line = false resharper_csharp_stick_comment = false resharper_csharp_wrap_before_comma = true -resharper_indent_nested_foreach_stmt = true resharper_indent_nested_for_stmt = true +resharper_indent_nested_foreach_stmt = true resharper_indent_nested_while_stmt = true resharper_indent_preprocessor_if = usual_indent resharper_indent_preprocessor_other = usual_indent diff --git a/CodeQuality.props b/CodeQuality.props new file mode 100644 index 0000000..df0775d --- /dev/null +++ b/CodeQuality.props @@ -0,0 +1,17 @@ + + + ../StyleCopAnalyzers.ruleset + true + true + true + true + true + true + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file diff --git a/StyleCopAnalyzers.ruleset b/StyleCopAnalyzers.ruleset index 33887e1..f89a00e 100644 --- a/StyleCopAnalyzers.ruleset +++ b/StyleCopAnalyzers.ruleset @@ -6,6 +6,7 @@ + @@ -48,15 +49,15 @@ - + - + - + @@ -64,7 +65,7 @@ - + @@ -72,12 +73,12 @@ - + - + @@ -89,25 +90,20 @@ - - - - + + + + - + - + @@ -115,14 +111,14 @@ - + - + - - + + @@ -134,105 +130,92 @@ - + - + - - - + + + - + - - + + - + - + - + - + - - - + + + - + - - - + + + - + - - - - + + + + - + - + - + - - - + + + - + - - - - - - + + + + + + - + + \ No newline at end of file diff --git a/dot.sln b/dot.sln index 47c43e2..b89461e 100644 --- a/dot.sln +++ b/dot.sln @@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{AD79881E-7 build.cake = build.cake code-format.cmd = code-format.cmd CodeCleanupOnSave.csx = CodeCleanupOnSave.csx + CodeQuality.props = CodeQuality.props Directory.Build.props = Directory.Build.props dot.sln.DotSettings = dot.sln.DotSettings dot.sln.DotSettings.user = dot.sln.DotSettings.user diff --git a/dot.sln.DotSettings b/dot.sln.DotSettings index a095ae7..00bf70a 100644 --- a/dot.sln.DotSettings +++ b/dot.sln.DotSettings @@ -1,14 +1,11 @@ - 1 - 1 + 1 + 1 Required - Required - Required + Required + Required Required <?xml version="1.0" encoding="utf-16"?> <Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> @@ -52,10 +49,8 @@ </Patterns> <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /> <Policy Inspect="True" Prefix="_" Suffix="" Style="AA_BB" /> - <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> + <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> False - HINT + HINT \ No newline at end of file diff --git a/src/Git/TaskStatusColumn.cs b/src/Git/TaskStatusColumn.cs index ce6a13b..a178040 100644 --- a/src/Git/TaskStatusColumn.cs +++ b/src/Git/TaskStatusColumn.cs @@ -28,6 +28,9 @@ internal sealed class TaskStatusColumn : ProgressColumn /// /// Gets or sets the alignment of the task description. /// + /// + /// The alignment of the task description. + /// public Justify Alignment { get; set; } = Justify.Right; /// diff --git a/src/Lang/Str.resx b/src/Lang/Str.resx index 0eaf8e8..cc960be 100644 --- a/src/Lang/Str.resx +++ b/src/Lang/Str.resx @@ -135,7 +135,6 @@ 密码长度 - BitSet 1:[0-9],2:[a-z],4:[A-Z],8:[ascii.0x21-0x2F] diff --git a/src/Lang/Str.tt b/src/Lang/Str.tt index ec10d8f..d526d9e 100644 --- a/src/Lang/Str.tt +++ b/src/Lang/Str.tt @@ -68,7 +68,8 @@ namespace Dot.Lang { <# var xml = new XmlDocument(); xml.Load("Str.resx"); - foreach (XmlNode data in xml.SelectNodes("//root/data")!) { + foreach (XmlNode data in xml.SelectNodes("//root/data")!) + { #> /// /// <#= data.SelectSingleNode("value")?.InnerText #> diff --git a/src/Time/TaskResultColumn.cs b/src/Time/TaskResultColumn.cs index 2f6c41c..5bfc663 100644 --- a/src/Time/TaskResultColumn.cs +++ b/src/Time/TaskResultColumn.cs @@ -10,6 +10,9 @@ internal sealed class TaskResultColumn : ProgressColumn /// /// Gets or sets the alignment of the task description. /// + /// + /// The alignment of the task description. + /// public Justify Alignment { get; set; } = Justify.Right; /// diff --git a/src/Time/TaskStatusColumn.cs b/src/Time/TaskStatusColumn.cs index 1ff326f..206c41a 100644 --- a/src/Time/TaskStatusColumn.cs +++ b/src/Time/TaskStatusColumn.cs @@ -27,6 +27,9 @@ internal sealed class TaskStatusColumn : ProgressColumn /// /// Gets or sets the alignment of the task description. /// + /// + /// The alignment of the task description. + /// public Justify Alignment { get; set; } = Justify.Right; /// diff --git a/src/dot.csproj b/src/dot.csproj index 54a7b5e..765b9c4 100644 --- a/src/dot.csproj +++ b/src/dot.csproj @@ -1,19 +1,12 @@ - Exe - net7.0-windows;net7.0 - true - Dot + true false true - true - true - true - true - true - true - true - ../StyleCopAnalyzers.ruleset + Exe + Dot + net7.0-windows;net7.0 + true $(DefineConstants);NET7_0_WINDOWS @@ -22,10 +15,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - @@ -34,5 +23,6 @@ Str.Designer.cs + \ No newline at end of file