diff --git a/.editorconfig b/.editorconfig index 29efc99..c4cd3eb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,7 +10,7 @@ insert_final_newline = true trim_trailing_whitespace = true # C#関連ファイル -[*.{cs,tt,xaml,razor,cshtml,sln}] +[*.{cs,tt,xaml,axaml,razor,cshtml,sln}] charset = utf-8-bom end_of_line = crlf @@ -18,6 +18,11 @@ end_of_line = crlf [*.sln] indent_style = tab +# Visual Studio XML ソリューションファイル +[*.slnx] +end_of_line = crlf +indent_size = 2 + # C#プロジェクトファイル # EditorConfigなしだとUTF-8(WPFプロジェクトはBOM付き)のCRLFになる。 [*.csproj] @@ -51,9 +56,3 @@ trim_trailing_whitespace = false # C# 生成コード [{*Generated,**/Generated/**}.cs] generated_code = true - -# Program.cs -# 理由: トップレベルステートメントで誤検知するため。 -# https://github.com/dotnet/roslyn-analyzers/issues/6141 -[Program.cs] -dotnet_diagnostic.CA1852.severity = none diff --git a/.gitattributes b/.gitattributes index 6980067..0b0405f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,10 +2,12 @@ *.cs text eol=crlf *.tt text eol=crlf *.xaml text eol=crlf +*.axaml text eol=crlf *.razor text eol=crlf *.cshtml text eol=crlf *.csproj text eol=crlf *.sln text eol=crlf +*.slnx text eol=crlf PSScriptAnalyzerSettings.psd1 linguist-vendored Source/Common/* linguist-vendored */wwwroot/* linguist-vendored diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 20c135e..7a9f659 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,14 +2,11 @@ version: 2 updates: - package-ecosystem: nuget directory: / - open-pull-requests-limit: 10 + open-pull-requests-limit: 99 schedule: interval: daily labels: - dependencies - ignore: - - dependency-name: Microsoft.SourceLink.GitHub - - dependency-name: StyleCop.Analyzers - package-ecosystem: github-actions directory: / diff --git a/.github/dotfiles.json b/.github/dotfiles.json index cba1cde..ce6d443 100644 --- a/.github/dotfiles.json +++ b/.github/dotfiles.json @@ -1,3 +1,3 @@ { - "hash": "9ba280023bd46042eaa00534ce57776471a35333" + "hash": "63c5086b3c460079eca487acab1e702cb5f779d7" } diff --git a/.github/workflows/build-dotnet.yml b/.github/workflows/build-dotnet.yml index 12e8b58..a9cbe5d 100644 --- a/.github/workflows/build-dotnet.yml +++ b/.github/workflows/build-dotnet.yml @@ -6,10 +6,12 @@ on: - '**/*.cs' - '**/*.tt' - '**/*.xaml' + - '**/*.axaml' - '**/*.razor' - '**/*.cshtml' - '**/*.csproj' - '**/*.sln' + - '**/*.slnx' - '**/*.props' - '**/*.targets' - '**/.editorconfig' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 43607ce..e4ddec9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,8 @@ jobs: uses: finphie/Actions/.github/workflows/release.yml@main permissions: contents: write + id-token: write + attestations: write with: version: ${{ needs.check.outputs.version }} tag: ${{ needs.check.outputs.tag }} @@ -48,6 +50,8 @@ jobs: uses: finphie/Actions/.github/workflows/deploy-docker.yml@main permissions: packages: write + id-token: write + attestations: write with: version: ${{ needs.check.outputs.version }} version-major: ${{ needs.check.outputs.version-major }} diff --git a/.github/workflows/normalize.yml b/.github/workflows/normalize.yml new file mode 100644 index 0000000..0642401 --- /dev/null +++ b/.github/workflows/normalize.yml @@ -0,0 +1,13 @@ +name: Normalize line endings + +on: + pull_request: + +permissions: + contents: write + +jobs: + main: + name: Main + if: github.event.pull_request.user.login == 'dependabot[bot]' + uses: finphie/Actions/.github/workflows/normalize.yml@main diff --git a/.globalconfig b/.globalconfig index 14e8996..52544b7 100644 --- a/.globalconfig +++ b/.globalconfig @@ -35,6 +35,7 @@ dotnet_style_null_propagation = true dotnet_style_object_initializer = true dotnet_style_operator_placement_when_wrapping = beginning_of_line dotnet_style_prefer_auto_properties = true +dotnet_style_prefer_collection_expression = when_types_loosely_match dotnet_style_prefer_compound_assignment = true dotnet_style_prefer_conditional_expression_over_assignment = true dotnet_style_prefer_conditional_expression_over_return = true @@ -53,6 +54,7 @@ dotnet_code_quality_unused_parameters = all # 抑制の設定 dotnet_remove_unnecessary_suppression_exclusions = none +dotnet_diagnostic.IDE0079.severity = warning # 改行設定 dotnet_style_allow_multiple_blank_lines_experimental = false @@ -69,7 +71,7 @@ csharp_style_var_when_type_is_apparent = true csharp_style_expression_bodied_accessors = when_on_single_line csharp_style_expression_bodied_constructors = when_on_single_line csharp_style_expression_bodied_indexers = when_on_single_line -csharp_style_expression_bodied_lambdas = when_on_single_line +csharp_style_expression_bodied_lambdas = when_on_single_line:warning # 重大度を省略すると動作しない。 csharp_style_expression_bodied_local_functions = when_on_single_line csharp_style_expression_bodied_methods = when_on_single_line csharp_style_expression_bodied_operators = when_on_single_line @@ -89,12 +91,15 @@ csharp_style_conditional_delegate_call = true # 修飾子設定 csharp_prefer_static_local_function = true csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async +csharp_style_prefer_readonly_struct = true +csharp_style_prefer_readonly_struct_member = true # コード ブロックの設定 csharp_prefer_braces = true csharp_prefer_simple_using_statement = true csharp_style_namespace_declarations = file_scoped csharp_style_prefer_method_group_conversion = true +csharp_style_prefer_primary_constructors = true csharp_style_prefer_top_level_statements = true # 式レベルの設定 @@ -107,6 +112,7 @@ csharp_style_prefer_local_over_anonymous_function = true csharp_style_prefer_null_check_over_type_check = true csharp_style_prefer_range_operator = true csharp_style_prefer_tuple_swap = true +csharp_style_prefer_unbound_generic_type_in_nameof = true csharp_style_prefer_utf8_string_literals = true csharp_style_throw_expression = true csharp_style_unused_value_assignment_preference = discard_variable @@ -117,6 +123,8 @@ csharp_using_directive_placement = outside_namespace # 改行設定 csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false +csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false +csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false csharp_style_allow_embedded_statements_on_same_line_experimental = false @@ -318,114 +326,156 @@ dotnet_analyzer_diagnostic.severity = warning # デフォルトのapi_surfaceを変更 dotnet_code_quality.api_surface = all -# Validate platform compatibility -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416 -# 理由: .NET 5未満でも有効化するため。 +# プラットフォームの互換性を検証する +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416 +# 理由: .NET 5未満でも有効化する。 dotnet_code_quality.enable_platform_analyzer_on_pre_net5_target = true -# Do not expose generic lists -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002 +# ジェネリック リストを公開しません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002 # 理由: 内部ではListを利用したい場合がある。 dotnet_code_quality.CA1002.api_surface = public -# Do not declare visible instance fields -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051 +# 一般的な例外の種類はキャッチしません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031 +dotnet_code_quality.CA1031.disallowed_symbol_names = T:System.NullReferenceException + +# 空のインターフェイスは使用しないでください +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1040 +# 理由: コンパイル時にインターフェイスをマーカーとして、型の識別を行いたい場合があるため。 +dotnet_diagnostic.CA1040.severity = none + +# 参照可能なインスタンス フィールドを宣言しません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051 # 構造体ではプロパティではなくフィールドにしたい場合がある。 dotnet_code_quality.CA1051.exclude_structs = true -# Identifiers should not contain type names -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720 +# 識別子には型名を含めないでください +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720 # 理由: 内部では識別子に型名を利用したい場合がある。 dotnet_code_quality.CA1720.api_surface = public -# Mark assemblies with CLSCompliantAttribute -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1014 -# https://github.com/dotnet/runtime/issues/44194 -# 理由: CLSに準拠する必要性を感じない。 -# AllEnabledByDefaultを設定しただけでは有効にならないので不要かも。 -dotnet_diagnostic.CA1014.severity = none - -# Identifiers should have correct prefix -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1715 -# 理由: IDE1006(命名スタイル)と重複。 +# 識別子は正しいプレフィックスを含んでいなければなりません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1715 +# 理由: IDE1006と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules dotnet_diagnostic.CA1715.severity = none -# Identifiers should not match keywords -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716 -# 理由: 言語キーワードと重複してもエスケープすれば回避できる。 +# 識別子はキーワードと同一にすることはできません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716 +# 理由: キーワードと重複しても逐語的・エスケープ識別子を使用すれば問題ない。 dotnet_diagnostic.CA1716.severity = none -# Do not directly await a Task -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007 +# タスクを直接待機しないでください +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007 # 理由: デフォルトで有効にならない規則。 dotnet_diagnostic.CA2007.severity = warning dotnet_code_quality.CA2007.output_kind = ConsoleApplication, DynamicallyLinkedLibrary -# 'type': base type 'type' is not CLS-compliant -# https://docs.microsoft.com/dotnet/csharp/language-reference/compiler-messages/cs3009 -# 理由: CLSに準拠する必要性を感じない。 +# 演算子オーバーロードには名前付けされた代替が存在します +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2225 +# 理由: 代替メソッドを定義する必要性がない。 +dotnet_diagnostic.CA2225.severity = none + +# 基本型 'type' は CLS に準拠していません +# https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/cs3009 +# 理由: CLSに準拠する必要性がない。 dotnet_diagnostic.CA3009.severity = none ## Microsoft.VisualStudio.Threading.Analyzers ## +# Call async methods when in an async method +# https://github.com/Microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD103.md +# 理由: CA1849と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1849 +dotnet_diagnostic.VSTHRD103.severity = none + # Use .ConfigureAwait(bool). -# https://github.com/microsoft/vs-threading/blob/master/doc/analyzers/VSTHRD111.md -# 理由: CA2007(Do not directly await a Task)と重複。 -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007 +# https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD111.md +# 理由: CA2007と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007 dotnet_diagnostic.VSTHRD111.severity = none # Use Async suffix for async methods -# https://github.com/microsoft/vs-threading/blob/master/doc/analyzers/VSTHRD200.md -# 理由: IDE1006(命名スタイル)と重複。 +# https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD200.md +# 理由: IDE1006と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules dotnet_diagnostic.VSTHRD200.severity = none ## StyleCop.Analyzers ## # Naming Rules # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/NamingRules.md -# 理由: IDE1006(命名スタイル)と重複。 +# 理由: IDE1006と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules dotnet_analyzer_diagnostic.category-StyleCop.CSharp.NamingRules.severity = none -# A field name in C# contains an underscore. -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1310.md -# 理由: IDE1006(命名スタイル)で指定できない規則。 -dotnet_diagnostic.SA1310.severity = warning - -# Element names within a tuple type should have the correct casing. -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1316.md -# 理由: IDE1006(命名スタイル)で指定できない規則。 -dotnet_diagnostic.SA1316.severity = warning - # A call to an instance member of the local class or a base class is not prefixed with 'this.', within a C# code file. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1101.md -# 理由: IDE0009(this and Me preferences)と重複。IDE0003を優先させる。 -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009 +# 理由: IDE0009と重複。IDE0003を優先させる。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009 dotnet_diagnostic.SA1101.severity = none +# A C# statement contains parenthesis which are unnecessary and should be removed. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1119.md +# 理由: IDE0047と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 +dotnet_diagnostic.SA1119.severity = none + +# An element of a tuple was referenced by its metadata name when an element name is available. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1142.md +# 理由: IDE0033と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0033 +dotnet_diagnostic.SA1142.severity = none + # A C# using directive is placed outside of a namespace element. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md -# 理由: IDE0065('using' directive placement)と重複。 +# 理由: IDE0065と重複。 # http://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0065 dotnet_diagnostic.SA1200.severity = none # The partial element does not have an access modifier defined. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1205.md -# 理由: IDE0040(Add accessibility modifiers)とinternal classの場合に競合する。 -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040 +# 理由: IDE0040とinternal classの場合に競合する。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040 dotnet_diagnostic.SA1205.severity = none +# A field name in C# contains an underscore. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1310.md +# 理由: IDE1006で指定できない規則。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules +dotnet_diagnostic.SA1310.severity = warning + +# Element names within a tuple type should have the correct casing. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1316.md +# 理由: IDE1006で指定できない規則。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules +dotnet_diagnostic.SA1316.severity = warning + # The access modifier for a C# element has not been explicitly defined. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1400.md -# 理由: IDE0040(Add accessibility modifiers)と重複。 -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040 +# 理由: IDE0040と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040 dotnet_diagnostic.SA1400.severity = none # A field within a C# class has an access modifier other than private. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md -# 理由: CA1051(Do not declare visible instance fields)と重複。 -# https://docs.microsoft.com/ja-jp/dotnet/fundamentals/code-analysis/quality-rules/ca1051 +# 理由: CA1051と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051 dotnet_diagnostic.SA1401.severity = none +# A C# statement contains a complex arithmetic expression which omits parenthesis around operators. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1407.md +# 理由: IDE0048と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 +dotnet_diagnostic.SA1407.severity = none + +# A C# statement contains a complex conditional expression which omits parenthesis around operators. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1408.md +# 理由: IDE0048と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 +dotnet_diagnostic.SA1408.severity = none + # The last statement in a multi-line C# initializer or list is missing a trailing comma. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1413.md # 理由: 末尾にカンマを付けたくない。 @@ -441,6 +491,11 @@ dotnet_diagnostic.SA1623.severity = none # 理由: 日本語でコメントを書きたい。 dotnet_diagnostic.SA1629.severity = none +# A C# code file is missing a standard file header. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md +# 理由: ファイルヘッダーは不要。 +dotnet_diagnostic.SA1633.severity = none + # The XML documentation header for a C# constructor does not contain the appropriate summary text. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1642.md # 理由: 日本語でコメントを書きたい。 @@ -451,7 +506,478 @@ dotnet_diagnostic.SA1642.severity = none # 理由: 日本語でコメントを書きたい。 dotnet_diagnostic.SA1643.severity = none -# A C# code file is missing a standard file header. -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md -# 理由: ファイルヘッダーは不要。 -dotnet_diagnostic.SA1633.severity = none +## Roslynator.Analyzers ## + +# Roslynator.AnalyzersやRoslynator.Formatting.Analyzersのデフォルトを分析なしとする。 +# 理由: Microsoft.CodeAnalysis.NetAnalyzersやStyleCop.Analyzersなどとの重複が多いため。 +dotnet_analyzer_diagnostic.category-roslynator.severity = none + +# Merge 'else' with nested 'if' +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1006 +dotnet_diagnostic.RCS1006.severity = warning + +# Use explicitly/implicitly typed array +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1014 +dotnet_diagnostic.RCS1014.severity = warning +roslynator_array_creation_type_style = implicit +roslynator_use_collection_expression = true + +# Remove unnecessary braces in switch section +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1031 +dotnet_diagnostic.RCS1031.severity = warning + +# Remove redundant parentheses +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1032 +# 理由: IDE0047と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 +dotnet_diagnostic.RCS1032.severity = none + +# Remove redundant 'sealed' modifier +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1034 +dotnet_diagnostic.RCS1034.severity = warning + +# Remove enum default underlying type +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1042 +dotnet_diagnostic.RCS1042.severity = warning + +# Remove 'partial' modifier from type with a single part +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1043 +dotnet_diagnostic.RCS1043.severity = warning + +# Non-asynchronous method name should not end with 'Async' +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1047 +# 理由: IDE1006で指定できない規則。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/naming-rules +dotnet_diagnostic.RCS1047.severity = warning + +# Use lambda expression instead of anonymous method +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1048 +dotnet_diagnostic.RCS1048.severity = warning + +# Simplify boolean comparison +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1049 +dotnet_diagnostic.RCS1049.severity = warning + +# Include/omit parentheses when creating new object +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1050 +dotnet_diagnostic.RCS1050.severity = warning +roslynator_object_creation_parentheses_style = omit + +# Use compound assignment +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1058 +# 理由: IDE0054やIDE0074と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0054-ide0074 +dotnet_diagnostic.RCS1058.severity = none + +# Merge 'if' with nested 'if' +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1061 +dotnet_diagnostic.RCS1061.severity = warning + +# Simplify logical negation +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1068 +dotnet_diagnostic.RCS1068.severity = warning + +# Remove redundant base constructor call +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1071 +dotnet_diagnostic.RCS1071.severity = warning + +# Remove redundant constructor +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1074 +dotnet_diagnostic.RCS1074.severity = warning + +# Optimize LINQ method call +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1077 +dotnet_diagnostic.RCS1077.severity = warning + +# Throwing of new NotImplementedException +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1079 +dotnet_diagnostic.RCS1079.severity = warning + +# Use --/++ operator instead of assignment +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1089 +# 理由: IDE0054と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0054-ide0074 +dotnet_diagnostic.RCS1089.severity = none + +# File contains no code +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1093 +dotnet_diagnostic.RCS1093.severity = warning + +# Use 'HasFlag' method or bitwise operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1096 +dotnet_diagnostic.RCS1096.severity = warning +roslynator_enum_has_flag_style = method + +# Remove redundant 'ToString' call +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1097 +dotnet_diagnostic.RCS1097.severity = warning + +# Default label should be the last label in a switch section +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1099 +dotnet_diagnostic.RCS1099.severity = warning + +# Unnecessary interpolation +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1105 +dotnet_diagnostic.RCS1105.severity = warning + +# Remove redundant 'ToCharArray' call +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1107 +dotnet_diagnostic.RCS1107.severity = warning + +# Combine 'Enumerable.Where' method chain +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1112 +dotnet_diagnostic.RCS1112.severity = warning + +# Use 'string.IsNullOrEmpty' method +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1113 +dotnet_diagnostic.RCS1113.severity = warning + +# Remove redundant delegate creation +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1114 +dotnet_diagnostic.RCS1114.severity = warning + +# Mark local variable as const +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1118 +dotnet_diagnostic.RCS1118.severity = warning + +# Inline local variable +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1124 +# 理由: 一時変数にしたい場合もある。また、Visual Studioの「インラインの一時変数」と重複。 +# https://learn.microsoft.com/visualstudio/ide/reference/inline-temporary-variable +dotnet_diagnostic.RCS1124.severity = none + +# Bitwise operation on enum without Flags attribute +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1130 +dotnet_diagnostic.RCS1130.severity = warning + +# Remove redundant overriding member +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1132 +dotnet_diagnostic.RCS1132.severity = warning + +# Remove redundant Dispose/Close call +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1133 +dotnet_diagnostic.RCS1133.severity = warning + +# Remove redundant statement +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1134 +dotnet_diagnostic.RCS1134.severity = warning + +# Merge switch sections with equivalent content +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1136 +dotnet_diagnostic.RCS1136.severity = warning + +# Use conditional access +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1146 +dotnet_diagnostic.RCS1146.severity = warning + +# Remove redundant cast +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1151 +dotnet_diagnostic.RCS1151.severity = warning + +# Sort enum members +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1154 +dotnet_diagnostic.RCS1154.severity = warning + +# Avoid chain of assignments +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1162 +dotnet_diagnostic.RCS1162.severity = warning + +# Unused type parameter +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1164 +# https://github.com/dotnet/roslyn/issues/44330 +dotnet_diagnostic.RCS1164.severity = warning + +# Use read-only auto-implemented property +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1170/ +dotnet_diagnostic.RCS1170.severity = warning + +# Use 'is' operator instead of 'as' operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1172 +dotnet_diagnostic.RCS1172.severity = warning + +# Remove redundant async/await +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1174 +dotnet_diagnostic.RCS1174.severity = warning + +# Convert comment to documentation comment +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1181 +dotnet_diagnostic.RCS1181.severity = warning + +# Remove redundant base interface +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1182 +dotnet_diagnostic.RCS1182.severity = warning + +# Join string expressions +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1190 +dotnet_diagnostic.RCS1190.severity = warning + +# Declare enum value as combination of names +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1191 +dotnet_diagnostic.RCS1191.severity = warning + +# Unnecessary usage of verbatim string literal +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1192 +# 理由: Visual Studioのリファクタリングと重複。ただし、警告レベルの設定ができないため有効にする。 +# https://learn.microsoft.com/visualstudio/ide/reference/convert-between-regular-string-verbatim-string +dotnet_diagnostic.RCS1192.severity = warning + +# Overriding member should not change 'params' modifier +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1193 +dotnet_diagnostic.RCS1193.severity = warning + +# Use ^ operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1195 +dotnet_diagnostic.RCS1195.severity = warning + +# Call extension method as instance method +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1196 +dotnet_diagnostic.RCS1196.severity = warning + +# Unnecessary null check +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1199 +dotnet_diagnostic.RCS1199.severity = warning + +# Use EventArgs.Empty +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1204 +dotnet_diagnostic.RCS1204.severity = warning + +# Order named arguments according to the order of parameters +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1205 +dotnet_diagnostic.RCS1205.severity = warning + +# Use conditional access instead of conditional expression +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1206/ +# 理由: IDE0031ではNull許容型のValueプロパティアクセスの簡略化設定ができない。 +dotnet_diagnostic.RCS1206.severity = warning + +# Reduce 'if' nesting +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1208 +dotnet_diagnostic.RCS1208.severity = warning + +# Remove redundant assignment +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1212 +dotnet_diagnostic.RCS1212.severity = warning + +# Unnecessary interpolated string +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1214 +dotnet_diagnostic.RCS1214.severity = warning + +# Expression is always equal to true/false +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1215 +dotnet_diagnostic.RCS1215.severity = warning + +# Unnecessary unsafe context +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1216 +dotnet_diagnostic.RCS1216.severity = warning + +# Simplify code branching +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1218 +dotnet_diagnostic.RCS1218.severity = warning + +# Merge preprocessor directives +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1222 +dotnet_diagnostic.RCS1222.severity = warning + +# Validate arguments correctly +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1227 +dotnet_diagnostic.RCS1227.severity = warning + +# Unnecessary explicit use of enumerator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1230 +dotnet_diagnostic.RCS1230.severity = warning + +# Use short-circuiting operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1233 +dotnet_diagnostic.RCS1233.severity = warning + +# Optimize method call +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1235 +dotnet_diagnostic.RCS1235.severity = warning + +# Use exception filter +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1236 +dotnet_diagnostic.RCS1236.severity = warning + +# Use 'for' statement instead of 'while' statement +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1239/ +dotnet_diagnostic.RCS1239.severity = warning + +# Operator is unnecessary +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1240 +dotnet_diagnostic.RCS1240.severity = warning + +# Use element access +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1246 +dotnet_diagnostic.RCS1246.severity = warning + +# Fix documentation comment tag +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1247 +dotnet_diagnostic.RCS1247.severity = warning + +# Normalize null check +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1248 +dotnet_diagnostic.RCS1248.severity = warning +roslynator_null_check_style = pattern_matching + +# Unnecessary null-forgiving operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1249 +dotnet_diagnostic.RCS1249.severity = warning + +# Remove unnecessary braces from record declaration +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1251 +dotnet_diagnostic.RCS1251.severity = warning + +# Normalize usage of infinite loop +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1252 +dotnet_diagnostic.RCS1252.severity = warning +roslynator_infinite_loop_style = while + +# Format documentation comment summary +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1253 +dotnet_diagnostic.RCS1253.severity = warning +roslynator_doc_comment_summary_style = multi_line + +# Normalize format of enum flag value +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1254 +dotnet_diagnostic.RCS1254.severity = warning +roslynator_enum_flag_value_style = shift_operator + +# Invalid argument null check +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1256 +dotnet_diagnostic.RCS1256.severity = warning + +# Use enum field explicitly +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1257 +dotnet_diagnostic.RCS1257.severity = warning + +# Unnecessary enum flag +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1258 +dotnet_diagnostic.RCS1258.severity = warning + +# Add/remove trailing comma +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260 +dotnet_diagnostic.RCS1260.severity = warning +roslynator_trailing_comma_style = omit + +# Resource can be disposed asynchronously +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1261 +dotnet_diagnostic.RCS1261.severity = warning + +# Unnecessary raw string literal +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1262 +dotnet_diagnostic.RCS1262.severity = warning + +# Remove redundant catch block +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1265 +dotnet_diagnostic.RCS1265.severity = warning + +# Use raw string literal +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1266 +dotnet_diagnostic.RCS1266.severity = warning + +# Use string interpolation instead of 'string.Concat' +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1267 +dotnet_diagnostic.RCS1267.severity = warning + +# Simplify numeric comparison +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1268 +dotnet_diagnostic.RCS1268.severity = warning + +## Roslynator.Formatting.Analyzers ## + +# Add blank line before using directive list +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0006/ +dotnet_diagnostic.RCS0006.severity = warning + +# Add blank line between declarations +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0010 +# 理由: SA1516はフィールド同士やEnumメンバー同士の分析対象外。 +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1516.md +dotnet_diagnostic.RCS0010.severity = warning + +# Add/remove blank line between single-line accessors +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0011 +dotnet_diagnostic.RCS0011.severity = warning +roslynator_blank_line_between_single_line_accessors = false + +# Add/remove blank line between using directives +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0015 +dotnet_diagnostic.RCS0015.severity = warning +roslynator_blank_line_between_using_directives = never + +# Place new line after/before binary operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0027 +dotnet_diagnostic.RCS0027.severity = warning +roslynator_binary_operator_new_line = before + +# Remove new line before base list +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0039 +dotnet_diagnostic.RCS0039.severity = warning + +# Remove new line between 'if' keyword and 'else' keyword +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0041 +dotnet_diagnostic.RCS0041.severity = warning + +# Put auto-accessors on a single line +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0042 +# 理由: IDE0055は複数行のコードブロックでは発生しない。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options#csharp_preserve_single_line_blocks +# https://github.com/dotnet/roslyn/issues/25957 +dotnet_diagnostic.RCS0042.severity = warning + +# Add blank line after top comment +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0049 +dotnet_diagnostic.RCS0049.severity = warning + +# Place new line after/before equals token +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0052。 +dotnet_diagnostic.RCS0052.severity = warning +roslynator_equals_token_new_line = after + +# Fix formatting of a list +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0053 +# 理由: SA1116やSA1117は、各引数を改行かつインデントずれ(なし・スペース3つなど)の場合に分析対象外。 +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1116.md +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1117.md +dotnet_diagnostic.RCS0053.severity = warning + +# Fix formatting of a call chain +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0054 +dotnet_diagnostic.RCS0054.severity = warning + +# Fix formatting of a binary expression chain +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0055 +dotnet_diagnostic.RCS0055.severity = warning + +# Place new line after/before null-conditional operator +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0059 +dotnet_diagnostic.RCS0059.severity = warning +roslynator_null_conditional_operator_new_line = before + +# Add/remove blank line between switch sections +# https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0061/ +# 理由: SA1513と競合するが、case内でブロックを使用することはあまりないため許容。 +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1513.md +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3568 +dotnet_diagnostic.RCS0061.severity = warning +roslynator_blank_line_between_switch_sections = omit + +## IDisposableAnalyzers ## + +# Dispose created +# https://github.com/DotNetAnalyzers/IDisposableAnalyzers/blob/master/documentation/IDISP001.md +# 理由: CA2000と重複。 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2000 +dotnet_diagnostic.IDISP001.severity = none + +## DotNetAnalyzers.DocumentationAnalyzers ## + +# Render documentation as Markdown. +# https://github.com/DotNetAnalyzers/DocumentationAnalyzers/blob/master/docs/DOC900.md +# 理由: リファクタリング設定なので警告レベルではなく非表示にする。 +dotnet_diagnostic.DOC900.severity = silent + +# Convert a line or block comment to a documentation comment. +# https://github.com/DotNetAnalyzers/DocumentationAnalyzers/blob/master/docs/DOC901.md +# 理由: RCS1181と一部重複。 +dotnet_diagnostic.DOC901.severity = none diff --git a/.markdownlint.yml b/.markdownlint.yml index e59c158..5b60855 100644 --- a/.markdownlint.yml +++ b/.markdownlint.yml @@ -1,59 +1,60 @@ -default: true -heading-increment: true -first-heading-h1: false +$schema: "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json" + heading-style: style: atx ul-style: style: dash -list-indent: true -ul-start-left: true -ul-indent: - indent: 2 no-trailing-spaces: - br_spaces: 2 - list_item_empty_lines: false -no-hard-tabs: true -no-reversed-links: true -no-multiple-blanks: - maximum: 1 + br_spaces: 0 +no-hard-tabs: + spaces_per_tab: 2 line-length: false -commands-show-output: true -no-missing-space-atx: true -no-multiple-space-atx: true -blanks-around-headings: - lines_above: 1 - lines_below: 1 -heading-start-left: true -no-duplicate-heading: false -single-title: true +no-duplicate-heading: + siblings_only: true no-trailing-punctuation: punctuation: .,;:!?。,;:!?、 -no-multiple-space-blockquote: true -no-blank-blockquote: true +no-blanks-blockquote: false ol-prefix: style: one -list-marker-space: - ul_single: 1 - ol_single: 1 - ul_multi: 1 - ol_multi: 1 -blanks-around-fences: true -blanks-around-lists: true -no-inline-html: true -no-bare-urls: true +no-inline-html: + allowed_elements: + - details + - summary hr-style: style: --- no-emphasis-as-heading: false -no-space-in-emphasis: true -no-space-in-code: true -no-space-in-links: true -fenced-code-language: true -first-line-heading: - level: 1 -no-empty-links: true +fenced-code-language: + allowed_languages: + - text + - csharp + - razor + - typescript + - javascript + - python + - html + - css + - markdown + - xml + - json + - yaml + - shell + - powershell + - batch + - bash + - editorconfig + - dockerfile + language_only: true required-headings: false -proper-names: true -no-alt-text: true code-block-style: style: fenced -single-trailing-newline: true +emphasis-style: + style: asterisk +strong-style: + style: asterisk +link-image-style: + collapsed: false + full: false + shortcut: false + url_inline: false +table-pipe-style: + style: leading_and_trailing diff --git a/.yamllint.yml b/.yamllint.yml index 15f230d..aabda5f 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -1,6 +1,8 @@ extends: default rules: + comments: + min-spaces-from-content: 1 document-start: present: false empty-lines: diff --git a/Build/Common/Analyzers/Analyzers.Trimming.props b/Build/Common/Analyzers/Analyzers.Trimming.props deleted file mode 100644 index 2fbe82a..0000000 --- a/Build/Common/Analyzers/Analyzers.Trimming.props +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - true - - - true - false - - - false - - - diff --git a/Build/Common/Analyzers/Analyzers.Trimming.targets b/Build/Common/Analyzers/Analyzers.Trimming.targets new file mode 100644 index 0000000..566ba34 --- /dev/null +++ b/Build/Common/Analyzers/Analyzers.Trimming.targets @@ -0,0 +1,29 @@ + + + + + + + true + + + true + + + true + true + true + false + + + false + + + diff --git a/Build/Common/Analyzers/Analyzers.props b/Build/Common/Analyzers/Analyzers.props index 1785ff9..684fb15 100644 --- a/Build/Common/Analyzers/Analyzers.props +++ b/Build/Common/Analyzers/Analyzers.props @@ -8,15 +8,4 @@ true - - - all - runtime; build; native; contentfiles; analyzers - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/Build/Common/Exe.Platform.props b/Build/Common/Exe.Platform.props index 09b2ced..c0df447 100644 --- a/Build/Common/Exe.Platform.props +++ b/Build/Common/Exe.Platform.props @@ -12,13 +12,15 @@ - true + true + Windows true + Windows @@ -26,24 +28,43 @@ true + MAUI + + + + + + true + Browser + + + + + + + true + Server true + Server - + - true + true + Avalonia true + Console diff --git a/Build/Common/Exe.props b/Build/Common/Exe.props index 57ff400..b0e4a1b 100644 --- a/Build/Common/Exe.props +++ b/Build/Common/Exe.props @@ -1,17 +1,20 @@ - + - + + + diff --git a/Build/Common/Exe.targets b/Build/Common/Exe.targets index dfdfa00..0d220b6 100644 --- a/Build/Common/Exe.targets +++ b/Build/Common/Exe.targets @@ -22,7 +22,7 @@ これにより、リリース先ディレクトリ内にはシンボルファイルが生成されるが、発行先ディレクトリにはコピーされなくなる。 PrepareForPublishターゲットは、パッケージ作成と発行時に実行される。 - このファイル自体は、発行対象プロジェクトでのみインポートされるが、コンソールアプリケーションでは、.NETツールとしてパッケージが作成される。 + このファイル自体は、発行対象プロジェクトでのみインポートされる。 .NETツールではシンボルを含めたいため、発行時のみに限定する必要がある _IsPublishingは、発行時に発行対象プロジェクトでのみtrueとなるプロパティ。(参照されているプロジェクトでは、発行時でもtrueにならない。) 本来は参照するべきではないプロパティだが、他に良い方法がないため妥協している。 diff --git a/Build/Common/Library.targets b/Build/Common/Library.targets index a32e407..72bb0dd 100644 --- a/Build/Common/Library.targets +++ b/Build/Common/Library.targets @@ -6,15 +6,13 @@ <_BuildCommonPlatformLibraryDirectory>$(BuildCommonPlatformDirectory)Library/ - <_IsGenerator>$(MSBuildProjectName.EndsWith('Generator')) - <_IsGeneratorInternal>$(MSBuildProjectName.EndsWith('Generator.Internal')) - <_IsDefaultLibrary Condition="'$(_IsGenerator)' != 'true' and '$(_IsGeneratorInternal)' != 'true'">true + <_IsGenerator Condition="$(MSBuildProjectName.EndsWith('.Generator')) or $(MSBuildProjectName.EndsWith('.Generator.Internal'))">true + <_IsDefaultLibrary Condition="'$(_IsGenerator)' != 'true'">true - diff --git a/Build/Common/Pack/SourceLink.targets b/Build/Common/Pack/SourceLink.targets index 9a2ba6c..97e07ab 100644 --- a/Build/Common/Pack/SourceLink.targets +++ b/Build/Common/Pack/SourceLink.targets @@ -5,23 +5,11 @@ --> - true + true - $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) - - - - - - - - - - - diff --git a/Build/Common/Platform/AspNet/AspNet.props b/Build/Common/Platform/AspNet/AspNet.props index 1c9c78c..1883946 100644 --- a/Build/Common/Platform/AspNet/AspNet.props +++ b/Build/Common/Platform/AspNet/AspNet.props @@ -3,13 +3,9 @@ true - DynamicPgoNoTrimming + ReadyToRun - - - - diff --git a/Build/Common/Platform/AspNet/BlazorServer.props b/Build/Common/Platform/AspNet/BlazorServer.props new file mode 100644 index 0000000..3375ec0 --- /dev/null +++ b/Build/Common/Platform/AspNet/BlazorServer.props @@ -0,0 +1,11 @@ + + + + + true + ReadyToRunNoTrimming + + + + + diff --git a/Build/Common/Platform/AspNet/BlazorWebAssembly.props b/Build/Common/Platform/AspNet/BlazorWebAssembly.props index 028a6c5..c0457bd 100644 --- a/Build/Common/Platform/AspNet/BlazorWebAssembly.props +++ b/Build/Common/Platform/AspNet/BlazorWebAssembly.props @@ -22,21 +22,13 @@ true - - true + + true true - - - - - - - - diff --git a/Build/Common/Platform/Console/Benchmark.targets b/Build/Common/Platform/Console/Benchmark.targets index b99e476..a88a80f 100644 --- a/Build/Common/Platform/Console/Benchmark.targets +++ b/Build/Common/Platform/Console/Benchmark.targets @@ -6,7 +6,7 @@ - + diff --git a/Build/Common/Platform/Console/Console.Default.props b/Build/Common/Platform/Console/Console.Default.props index b4315b9..5a4f955 100644 --- a/Build/Common/Platform/Console/Console.Default.props +++ b/Build/Common/Platform/Console/Console.Default.props @@ -8,15 +8,11 @@ Native AOT: 起動速度を優先する場合 Dynamic PGO: 実行速度を優先する場合 --> - DynamicPgo + ReadyToRun NativeAot Tool - - - - diff --git a/Build/Common/Platform/Gui/Android.props b/Build/Common/Platform/Gui/Android.props index cdc08dd..fc0d20e 100644 --- a/Build/Common/Platform/Gui/Android.props +++ b/Build/Common/Platform/Gui/Android.props @@ -2,8 +2,8 @@ @@ -27,25 +27,22 @@ true - + true + + true + Full true - r8 - - + true - - false - - diff --git a/Build/Common/Platform/Gui/Avalonia.props b/Build/Common/Platform/Gui/Avalonia.props new file mode 100644 index 0000000..368cece --- /dev/null +++ b/Build/Common/Platform/Gui/Avalonia.props @@ -0,0 +1,24 @@ + + + + + true + app.manifest + + NativeAot + true + true + + + true + + + x86-x64-v3 + + + + + diff --git a/Build/Common/Platform/Gui/Maui.props b/Build/Common/Platform/Gui/Maui.props index 749a643..2b3f91c 100644 --- a/Build/Common/Platform/Gui/Maui.props +++ b/Build/Common/Platform/Gui/Maui.props @@ -4,6 +4,10 @@ 対応プラットフォームは、Windows/Androidのみ。 --> + + <_TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) + + true @@ -12,22 +16,20 @@ csprojまたはDirectory.Build.propsでの設定必須。 --> true - - - - - + + true + + + true + - - + + - + $(TargetPlatformMinVersion) - - - false diff --git a/Build/Common/Platform/Gui/WinUI.props b/Build/Common/Platform/Gui/WinUI.props deleted file mode 100644 index bc4c1cd..0000000 --- a/Build/Common/Platform/Gui/WinUI.props +++ /dev/null @@ -1,71 +0,0 @@ - - - - - true - ReadyToRun - 10.0.19041.0 - - - x64;arm64 - - - x64 - arm64 - - - true - - - None - - - true - - - - - - - - - - false - - - false - - - partial - - - - - - - - - diff --git a/Build/Common/Platform/Gui/WinUi.Shared.props b/Build/Common/Platform/Gui/WinUi.Shared.props new file mode 100644 index 0000000..6499762 --- /dev/null +++ b/Build/Common/Platform/Gui/WinUi.Shared.props @@ -0,0 +1,37 @@ + + + + + NativeAot + true + + 10.0.19041.0 + + + x86-x64-v3 + + + true + + + None + + + false + + + + + diff --git a/Build/Common/Platform/Gui/WinUi.props b/Build/Common/Platform/Gui/WinUi.props new file mode 100644 index 0000000..5d2b656 --- /dev/null +++ b/Build/Common/Platform/Gui/WinUi.props @@ -0,0 +1,21 @@ + + + + + true + app.manifest + + + 10.0.26100.38 + + + + + + + + + diff --git a/Build/Common/Platform/Gui/Wpf.props b/Build/Common/Platform/Gui/Wpf.props index 591cc52..9a5877c 100644 --- a/Build/Common/Platform/Gui/Wpf.props +++ b/Build/Common/Platform/Gui/Wpf.props @@ -6,10 +6,6 @@ ReadyToRunNoTrimming - - - - diff --git a/Build/Common/Platform/Gui/Xamarin.props b/Build/Common/Platform/Gui/Xamarin.props index ab95d0d..44b91fe 100644 --- a/Build/Common/Platform/Gui/Xamarin.props +++ b/Build/Common/Platform/Gui/Xamarin.props @@ -2,8 +2,11 @@ - $(AssemblyTitle) - net.finphie.$(AssemblyTitle.ToLower()) + net.$(Authors).$(MSBuildProjectName.ToLower()) + + + + diff --git a/Build/Common/Platform/Library/Generator.Internal.targets b/Build/Common/Platform/Library/Generator.Internal.targets index 12ac716..366dc45 100644 --- a/Build/Common/Platform/Library/Generator.Internal.targets +++ b/Build/Common/Platform/Library/Generator.Internal.targets @@ -1,20 +1,45 @@ - + + + $(NoWarn);CA1062 + true + + + true + + + $(GetTargetPathDependsOn);_GetDependencyTargetPaths - + + + + + + + + + + + + + diff --git a/Build/Common/Platform/Library/Generator.Package.targets b/Build/Common/Platform/Library/Generator.Package.targets new file mode 100644 index 0000000..cd32845 --- /dev/null +++ b/Build/Common/Platform/Library/Generator.Package.targets @@ -0,0 +1,36 @@ + + + + + <_GeneratorInternalProjectName>$(MSBuildProjectName).Internal + + + + true + + + true + + + $(MSBuildProjectName.Substring(0, $(MSBuildProjectName.LastIndexOf('.')))) + + + + + + + + + + + + + + + + + + diff --git a/Build/Common/Platform/Library/Generator.targets b/Build/Common/Platform/Library/Generator.targets index b5e224b..347aa82 100644 --- a/Build/Common/Platform/Library/Generator.targets +++ b/Build/Common/Platform/Library/Generator.targets @@ -1,36 +1,17 @@ - + - <_GeneratorInternalProjectName>$(MSBuildProjectName).Internal - - - - true + <_IsGeneratorInternal>$(MSBuildProjectName.EndsWith('.Generator.Internal')) + <_MainLogicProjectName Condition="'$(_IsGeneratorInternal)' != 'true'">$(MSBuildProjectName.Substring(0, $(MSBuildProjectName.LastIndexOf('.Generator')))) + <_MainLogicProjectName Condition="'$(_IsGeneratorInternal)' == 'true'">$(MSBuildProjectName.Substring(0, $(MSBuildProjectName.LastIndexOf('.Generator.Internal')))) - - true - - - $(MSBuildProjectName.Substring(0, $(MSBuildProjectName.LastIndexOf('.')))) + $(SourceDirectory)$(_MainLogicProjectName)/$(_MainLogicProjectName).csproj + $(SourceDirectory)$(_MainLogicProjectName)/bin/$(Configuration)/netstandard2.0/$(_MainLogicProjectName).dll + true - - - - - - - - - - - + + diff --git a/Build/Common/Platform/Library/Library.Default.targets b/Build/Common/Platform/Library/Library.Default.targets index 719bfac..b27de05 100644 --- a/Build/Common/Platform/Library/Library.Default.targets +++ b/Build/Common/Platform/Library/Library.Default.targets @@ -10,7 +10,12 @@ $(MSBuildProjectName.Substring(0, $(MSBuildProjectName.LastIndexOf('.')))) - + + + + + $(NoWarn);CP0001 + true - + + all + runtime; build; native; contentfiles; analyzers + diff --git a/Build/Common/Publish/NativeAot.props b/Build/Common/Publish/NativeAot.props index 3213c53..dc4b3ce 100644 --- a/Build/Common/Publish/NativeAot.props +++ b/Build/Common/Publish/NativeAot.props @@ -3,24 +3,22 @@ Native AOT関連の設定 実行ファイル作成のみに対応。(ネイティブライブラリ作成には未対応。) https://learn.microsoft.com/dotnet/core/deploying/native-aot/ - https://github.com/dotnet/runtime/blob/v7.0.0/src/coreclr/nativeaot/docs/optimizing.md + https://github.com/dotnet/runtime/blob/v8.0.0/src/coreclr/nativeaot/docs/optimizing.md https://github.com/dotnet/corert/blob/master/Documentation/using-corert/optimizing-corert.md --> - - <_TargetOS Condition="$(RuntimeIdentifier.StartsWith('win'))">windows - <_TargetOS Condition="$(RuntimeIdentifier.StartsWith('osx'))">osx - <_TargetOS Condition="'$(_TargetOS)' == ''">linux - - true + + false + true + Size Size @@ -30,7 +28,10 @@ true - false + true + + + false @@ -40,20 +41,6 @@ false - - - false - - - - <_PublishFilePath>$(PublishDir)/$(MSBuildProjectName) - - - - - - - diff --git a/Build/Common/Publish/Publish.props b/Build/Common/Publish/Publish.props index 108b533..55f21a8 100644 --- a/Build/Common/Publish/Publish.props +++ b/Build/Common/Publish/Publish.props @@ -1,34 +1,20 @@ - + - - - - - - - - - - - - - - - + + @@ -36,18 +22,19 @@ + - + - + diff --git a/Build/Common/Publish/Trimming.props b/Build/Common/Publish/Trimming.props index 2aa247c..ce248c6 100644 --- a/Build/Common/Publish/Trimming.props +++ b/Build/Common/Publish/Trimming.props @@ -2,7 +2,7 @@ @@ -25,6 +25,9 @@ true + + + false diff --git a/Build/Common/Shared.targets b/Build/Common/Shared.targets index 156014a..d4996a9 100644 --- a/Build/Common/Shared.targets +++ b/Build/Common/Shared.targets @@ -1,9 +1,26 @@ - - + + + <_TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) + + + + + true + + + + + + + diff --git a/Directory.Build.props b/Directory.Build.props index 752fb35..ee3de0f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -26,6 +26,7 @@ $(BuildCommonDirectory)Pack/ $(BuildCommonDirectory)Publish/ $(BuildCommonDirectory)Platform/ + $(MSBuildThisFileDirectory)Source/ @@ -37,7 +38,7 @@ - + diff --git a/Directory.Build.targets b/Directory.Build.targets index 6b9f877..e6e5d28 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -2,8 +2,12 @@ - - + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..4f142fb --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,40 @@ + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/.editorconfig b/Source/.editorconfig index b7096c5..9db19e7 100644 --- a/Source/.editorconfig +++ b/Source/.editorconfig @@ -1,5 +1,5 @@ -# C# ベンチマークファイル -[{*Benchmark*/**,*Benchmark*}.cs] +# C#ベンチマークファイル(プロジェクト全体) +[*.Benchmarks/**.cs] # 公開されている型またはメンバー 'Type_or_Member' の XML コメントがありません # https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/cs1591 @@ -8,51 +8,46 @@ dotnet_diagnostic.CS1591.severity = none ## Microsoft.CodeAnalysis.NetAnalyzers ## -# Do not declare static members on generic types -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1000 -# 理由: ベンチマークを取る場合がある。 +# ジェネリック型の静的メンバーを宣言しません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1000 +# 理由: ベンチマーク対象にする場合がある。 dotnet_diagnostic.CA1000.severity = none -# Validate arguments of public methods -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062 +# パブリック メソッドの引数の検証 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062 # 理由: 引数を検証する必要はない。 dotnet_diagnostic.CA1062.severity = none -# Normalize strings to uppercase -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1308 -# 理由: ベンチマークを取る場合がある。 +# 文字列を大文字に標準化します +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1308 +# 理由: ベンチマーク対象にする場合がある。 dotnet_diagnostic.CA1308.severity = none -# Identifiers should not contain underscores -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707 -# 理由: 識別子にアンダースコアを使いたい。 -dotnet_diagnostic.CA1707.severity = none - -# Initialize reference type static fields inline -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810 +# 参照型の静的フィールドをインラインで初期化します +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810 # 理由: 静的コンストラクターを使用しても問題ない。 dotnet_diagnostic.CA1810.severity = none -# Mark members as static -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822 -# 理由: ベンチマークプロジェクト。 -dotnet_diagnostic.CA1822.severity = none +# プロパティは、配列を返すことはできません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1819 +# 理由: ベンチマーク対象にする場合がある。 +dotnet_diagnostic.CA1819.severity = none -# Do not use insecure randomness -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394 -# 理由: ベンチマークを取る場合がある。 +# 'CompositeFormat' を使用する +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1863 +# 理由: ベンチマーク対象にする場合がある。 +dotnet_diagnostic.CA1863.severity = none + +# 安全でないランダム度を使用しません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394 +# 理由: 暗号強度の低い擬似乱数ジェネレーターを使用しても問題ない。 dotnet_diagnostic.CA5394.severity = none ## StyleCop.Analyzers ## -# Two or more fields were declared in the same field declaration syntax. -# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1132.md -# 理由: ベンチマークプロジェクト。 -dotnet_diagnostic.SA1132.severity = none - # A Code Analysis SuppressMessage attribute does not include a justification. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1404.md -# 理由: ベンチマークプロジェクト。 +# 理由: 警告抑制理由の表記は必要ない。 dotnet_diagnostic.SA1404.severity = none # A C# code element is missing a documentation header. @@ -69,3 +64,56 @@ dotnet_diagnostic.SA1601.severity = none # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1602.md # 理由: ドキュメンテーションコメントを使用しない。 dotnet_diagnostic.SA1602.severity = none + +## IDisposableAnalyzers ## + +# Prefer using +# https://github.com/DotNetAnalyzers/IDisposableAnalyzers/blob/master/documentation/IDISP017.md +# 理由: 明示的にDisposeメソッドを呼び出す場合がある。 +dotnet_diagnostic.IDISP017.severity = none + +# C#ベンチマークファイル +[{*Benchmark,*Benchmark.*}.cs] + +# null非許容の変数には、コンストラクターの終了時にnull以外の値が入っていなければなりません +# https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/nullable-warnings#nonnullable-reference-not-initialized +# 理由: GlobalSetupなどで別途初期化する。 +dotnet_diagnostic.CS8618.severity = none + +## Microsoft.CodeAnalysis.NetAnalyzers ## + +# Consider making public types internal (public 型を internal にすることを検討する) +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1515 +# 理由: ベンチマーク対象クラスはpublicにする必要がある。 +dotnet_diagnostic.CA1515.severity = none + +# 識別子はアンダースコアを含むことはできません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707 +# 理由: 識別子にアンダースコアを使いたい。 +dotnet_diagnostic.CA1707.severity = none + +# メンバーを static に設定します +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822 +# 理由: ベンチマーク対象メソッドはインスタンスメソッドにする必要がある。 +dotnet_diagnostic.CA1822.severity = none + +## StyleCop.Analyzers ## + +# Two or more fields were declared in the same field declaration syntax. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1132.md +# 理由: 複数のフィールドを同時に宣言したい場合がある。 +dotnet_diagnostic.SA1132.severity = none + +# A C# code file contains more than one unique type. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1402.md +# 理由: 1ファイルに収めたい場合がある。 +dotnet_diagnostic.SA1402.severity = none + +[Program.cs] + +## StyleCop.Analyzers ## + +# The file name of a C# code file does not match the first type declared in the file. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1649.md +# 理由: トップレベルステートメントでは、ファイル名と型名が異なる場合がある。 +dotnet_diagnostic.SA1649.severity = none diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index a29de99..cce0486 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -1,14 +1,3 @@ - - - - - true - - - - - - - + diff --git a/Source/Directory.Build.targets b/Source/Directory.Build.targets index d9ee5b3..2f4c180 100644 --- a/Source/Directory.Build.targets +++ b/Source/Directory.Build.targets @@ -1,7 +1,3 @@ - - - - - + diff --git a/Source/Source.props b/Source/Source.props new file mode 100644 index 0000000..a29de99 --- /dev/null +++ b/Source/Source.props @@ -0,0 +1,14 @@ + + + + + + true + + + + + + + + diff --git a/Source/Source.targets b/Source/Source.targets new file mode 100644 index 0000000..7446ffc --- /dev/null +++ b/Source/Source.targets @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/Tests/.editorconfig b/Tests/.editorconfig index 25e2978..da8bfba 100644 --- a/Tests/.editorconfig +++ b/Tests/.editorconfig @@ -1,37 +1,25 @@ # C#ファイル(テストプロジェクト全体) [*.cs] -# 公開されている型またはメンバー 'Type_or_Member' の XML コメントがありません -# https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/cs1591 -# 理由: ドキュメンテーションコメントを使用しない。 -dotnet_diagnostic.CS1591.severity = none - ## Microsoft.CodeAnalysis.NetAnalyzers ## -# Validate arguments of public methods -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062 +# パブリック メソッドの引数の検証 +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062 # 理由: 引数を検証する必要はない。 dotnet_diagnostic.CA1062.severity = none -# Initialize reference type static fields inline -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810 -# 理由: 静的コンストラクターを使用しても問題ない。 -dotnet_diagnostic.CA1810.severity = none +# 安全でないランダム度を使用しません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394 +# 理由: 暗号強度の低い擬似乱数ジェネレーターを使用しても問題ない。 +dotnet_diagnostic.CA5394.severity = none # C#テスト関連ファイル [{*Test,*TestData}.cs] -## Microsoft.CodeAnalysis.NetAnalyzers ## - -# Nested types should not be visible -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1034 -# 理由: 入れ子にしたクラスを使いたい。 -dotnet_diagnostic.CA1034.severity = none - -# Identifiers should not contain underscores -# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707 -# 理由: 識別子にアンダースコアを使いたい。 -dotnet_diagnostic.CA1707.severity = none +# 公開されている型またはメンバー 'Type_or_Member' の XML コメントがありません +# https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/cs1591 +# 理由: ドキュメンテーションコメントを使用しない。 +dotnet_diagnostic.CS1591.severity = none ## StyleCop.Analyzers ## @@ -49,3 +37,36 @@ dotnet_diagnostic.SA1601.severity = none # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1602.md # 理由: ドキュメンテーションコメントを使用しない。 dotnet_diagnostic.SA1602.severity = none + +# C#テストファイル +[*Test.cs] + +## 名前付けルール ## + +# 非同期メソッド名の末尾にAsync付与を強制しない。 +# 理由: Asyncを付ける必要がない。 +dotnet_naming_rule.async_methods_should_be_ends_with_async.severity = none + +## Microsoft.CodeAnalysis.NetAnalyzers ## + +# Consider making public types internal (public 型を internal にすることを検討する) +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1515 +# 理由: テストクラスはpublicにする必要がある。 +dotnet_diagnostic.CA1515.severity = none + +# 識別子はアンダースコアを含むことはできません +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707 +# 理由: 識別子にアンダースコアを使いたい。 +dotnet_diagnostic.CA1707.severity = none + +# タスクを直接待機しないでください +# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007 +# 理由: ConfigureAwait(false)を呼び出すと問題が発生する場合がある。 +dotnet_diagnostic.CA2007.severity = none + +## StyleCop.Analyzers ## + +# A C# code file contains more than one unique type. +# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1402.md +# 理由: 1ファイルに収めたい場合がある。 +dotnet_diagnostic.SA1402.severity = none diff --git a/Tests/Directory.Build.props b/Tests/Directory.Build.props index d7acf9b..59aa298 100644 --- a/Tests/Directory.Build.props +++ b/Tests/Directory.Build.props @@ -1,32 +1,3 @@ - - - - <_IsTest>$(MSBuildProjectName.EndsWith('Tests')) - - - - - - - - - $(NoWarn);SA0001 - - - - - - - - - - - - + diff --git a/Tests/Directory.Build.targets b/Tests/Directory.Build.targets new file mode 100644 index 0000000..e85d67b --- /dev/null +++ b/Tests/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/Tests/Tests.props b/Tests/Tests.props new file mode 100644 index 0000000..3673cea --- /dev/null +++ b/Tests/Tests.props @@ -0,0 +1,44 @@ + + + + + <_IsTest>$(MSBuildProjectName.EndsWith('Tests')) + + + + + + + + + $(NoWarn);SA0001 + + + true + true + + + true + + + + + + + + diff --git a/Tests/Tests.targets b/Tests/Tests.targets new file mode 100644 index 0000000..888dc08 --- /dev/null +++ b/Tests/Tests.targets @@ -0,0 +1,8 @@ + + + + + $(MSBuildProjectName.EndsWith('Tests')) + + + diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..77ad409 --- /dev/null +++ b/nuget.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + +