diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index fbef5d6f1..2854ab770 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -30,7 +30,7 @@ resources:
- repository: rsg
type: github
name: RocketSurgeonsGuild/AzureDevopsTemplates
- ref: refs/tags/v0.13.0
+ ref: refs/tags/v0.13.1
endpoint: github
variables:
@@ -63,9 +63,9 @@ jobs:
Linux:
BuildName: 'Linux'
ImageName: 'ubuntu-latest'
- macOS:
- BuildName: 'macOS'
- ImageName: 'macOS-latest'
+ # macOS:
+ # BuildName: 'macOS'
+ # ImageName: 'macOS-latest'
pool:
vmImage: $(ImageName)
steps:
diff --git a/.build/.build.csproj b/.build/.build.csproj
index b3e4dba53..509faac59 100644
--- a/.build/.build.csproj
+++ b/.build/.build.csproj
@@ -2,18 +2,18 @@
Exe
- net5.0
+ net6.0
false
False
CS0649;CS0169
+ 1
-
diff --git a/.build/Build.cs b/.build/Build.cs
index 836d1713f..51e58f460 100644
--- a/.build/Build.cs
+++ b/.build/Build.cs
@@ -6,7 +6,6 @@
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Tools.MSBuild;
-using Rocket.Surgery.Nuke;
using Rocket.Surgery.Nuke.DotNetCore;
[PublicAPI]
@@ -28,8 +27,7 @@ public partial class Solution : NukeBuild,
IGenerateCodeCoverageReport,
IGenerateCodeCoverageSummary,
IGenerateCodeCoverageBadges,
- IHaveConfiguration,
- ICanLint
+ IHaveConfiguration
{
///
/// Support plugins are available for:
@@ -38,7 +36,10 @@ public partial class Solution : NukeBuild,
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode
///
- public static int Main() => Execute(x => x.Default);
+ public static int Main()
+ {
+ return Execute(x => x.Default);
+ }
[OptionalGitRepository] public GitRepository? GitRepository { get; }
diff --git a/.build/Solution.cs b/.build/Solution.cs
index 47f084d9a..15cf58c19 100644
--- a/.build/Solution.cs
+++ b/.build/Solution.cs
@@ -1,90 +1,160 @@
using System.Collections.Generic;
using System.Linq;
using Nuke.Common.CI.GitHubActions;
-using Rocket.Surgery.Nuke;
+using Nuke.Common.CI.GitHubActions.Configuration;
using Rocket.Surgery.Nuke.ContinuousIntegration;
using Rocket.Surgery.Nuke.DotNetCore;
using Rocket.Surgery.Nuke.GithubActions;
-[AzurePipelinesSteps(
+
+internal class LocalConstants
+{
+ public static string[] PathsIgnore =
+ {
+ ".codecov.yml",
+ ".editorconfig",
+ ".gitattributes",
+ ".gitignore",
+ ".gitmodules",
+ ".lintstagedrc.js",
+ ".prettierignore",
+ ".prettierrc",
+ "LICENSE",
+ "nukeeper.settings.json",
+ "omnisharp.json",
+ "package-lock.json",
+ "package.json",
+ "Readme.md",
+ ".github/dependabot.yml",
+ ".github/labels.yml",
+ ".github/release.yml",
+ ".github/renovate.json",
+ };
+}
+
+[GitHubActionsSteps(
+ "ci-ignore",
+ GitHubActionsImage.WindowsLatest,
+ GitHubActionsImage.UbuntuLatest,
AutoGenerate = false,
- InvokeTargets = new[] { nameof(Default) },
- NonEntryTargets = new[] {
- nameof(ICIEnvironment.CIEnvironment),
- nameof(ITriggerCodeCoverageReports.Trigger_Code_Coverage_Reports),
- nameof(ITriggerCodeCoverageReports.Generate_Code_Coverage_Report_Cobertura),
- nameof(IGenerateCodeCoverageBadges.Generate_Code_Coverage_Badges),
- nameof(IGenerateCodeCoverageReport.Generate_Code_Coverage_Report),
- nameof(IGenerateCodeCoverageSummary.Generate_Code_Coverage_Summary),
- nameof(Default)
- },
- ExcludedTargets = new[]
- { nameof(ICanClean.Clean), nameof(ICanRestoreWithDotNetCore.Restore), nameof(ICanRestoreWithDotNetCore.DotnetToolRestore) },
- Parameters = new[] {
- nameof(IHaveCodeCoverage.CoverageDirectory), nameof(IHaveOutputArtifacts.ArtifactsDirectory), nameof(Verbosity),
- nameof(IHaveConfiguration.Configuration)
- }
+ On = new[] { GitHubActionsTrigger.Push },
+ OnPushTags = new[] { "v*" },
+ OnPushBranches = new[] { "master", "main", "next" },
+ OnPullRequestBranches = new[] { "master", "main", "next" },
+ Enhancements = new[] { nameof(CiIgnoreMiddleware) }
)]
[GitHubActionsSteps(
- "ci", GitHubActionsImage.MacOsLatest, GitHubActionsImage.WindowsLatest, GitHubActionsImage.UbuntuLatest,
+ "ci",
+ GitHubActionsImage.MacOsLatest,
+ GitHubActionsImage.WindowsLatest,
+ GitHubActionsImage.UbuntuLatest,
AutoGenerate = false,
On = new[] { GitHubActionsTrigger.Push },
OnPushTags = new[] { "v*" },
- OnPushBranches = new[] { "master", "next" },
- OnPullRequestBranches = new[] { "master", "next" },
+ OnPushBranches = new[] { "master", "main", "next" },
+ OnPullRequestBranches = new[] { "master", "main", "next" },
InvokedTargets = new[] { nameof(Default) },
- NonEntryTargets = new[] {
+ NonEntryTargets = new[]
+ {
nameof(ICIEnvironment.CIEnvironment),
- nameof(ITriggerCodeCoverageReports.Trigger_Code_Coverage_Reports),
- nameof(ITriggerCodeCoverageReports.Generate_Code_Coverage_Report_Cobertura),
- nameof(IGenerateCodeCoverageBadges.Generate_Code_Coverage_Badges),
- nameof(IGenerateCodeCoverageReport.Generate_Code_Coverage_Report),
- nameof(IGenerateCodeCoverageSummary.Generate_Code_Coverage_Summary),
+ nameof(ITriggerCodeCoverageReports.TriggerCodeCoverageReports),
+ nameof(ITriggerCodeCoverageReports.GenerateCodeCoverageReportCobertura),
+ nameof(IGenerateCodeCoverageBadges.GenerateCodeCoverageBadges),
+ nameof(IGenerateCodeCoverageReport.GenerateCodeCoverageReport),
+ nameof(IGenerateCodeCoverageSummary.GenerateCodeCoverageSummary),
nameof(Default)
},
ExcludedTargets = new[] { nameof(ICanClean.Clean), nameof(ICanRestoreWithDotNetCore.DotnetToolRestore) },
- Enhancements = new[] { nameof(Middleware) }
+ Enhancements = new[] { nameof(CiMiddleware) }
)]
[PrintBuildVersion]
[PrintCIEnvironment]
[UploadLogs]
+[TitleEvents]
public partial class Solution
{
- public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGitHubActionsConfiguration configuration)
+ public static RocketSurgeonGitHubActionsConfiguration CiIgnoreMiddleware(
+ RocketSurgeonGitHubActionsConfiguration configuration
+ )
+ {
+ foreach (var item in configuration.DetailedTriggers.OfType())
+ {
+ item.IncludePaths = LocalConstants.PathsIgnore;
+ }
+
+ configuration.Jobs.RemoveAt(1);
+ ( (RocketSurgeonsGithubActionsJob)configuration.Jobs[0] ).Steps = new List
+ {
+ new RunStep("N/A")
+ {
+ Run = "echo \"No build required\""
+ }
+ };
+
+ return configuration;
+ }
+
+ public static RocketSurgeonGitHubActionsConfiguration CiMiddleware(
+ RocketSurgeonGitHubActionsConfiguration configuration
+ )
{
- var buildJob = configuration.Jobs.First(z => z.Name == "Build");
+ foreach (var item in configuration.DetailedTriggers.OfType())
+ {
+ item.ExcludePaths = LocalConstants.PathsIgnore;
+ }
+
+ var buildJob = configuration.Jobs.OfType().First(z => z.Name == "Build");
+ buildJob.FailFast = false;
var checkoutStep = buildJob.Steps.OfType().Single();
// For fetch all
checkoutStep.FetchDepth = 0;
+ buildJob.Environment["NUGET_PACKAGES"] = "${{ github.workspace }}/.nuget/packages";
buildJob.Steps.InsertRange(
- buildJob.Steps.IndexOf(checkoutStep) + 1, new BaseGitHubActionsStep[] {
- new RunStep("Fetch all history for all tags and branches") {
+ buildJob.Steps.IndexOf(checkoutStep) + 1,
+ new BaseGitHubActionsStep[]
+ {
+ new RunStep("Fetch all history for all tags and branches")
+ {
Run = "git fetch --prune"
},
- new SetupDotNetStep("Use .NET Core 2.1 SDK") {
- DotNetVersion = "2.1.x"
+ new UsingStep("NuGet Cache")
+ {
+ Uses = "actions/cache@v2",
+ With =
+ {
+ ["path"] = "${{ github.workspace }}/.nuget/packages",
+ // keep in mind using central package versioning here
+ ["key"] =
+ "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/Directory.Packages.support.props') }}",
+ ["restore-keys"] = @"|
+ ${{ runner.os }}-nuget-"
+ }
},
- new SetupDotNetStep("Use .NET Core 3.1 SDK") {
+ new SetupDotNetStep("Use .NET Core 3.1 SDK")
+ {
DotNetVersion = "3.1.x"
},
- new SetupDotNetStep("Use .NET Core 5.0 SDK") {
- DotNetVersion = "5.0.x"
+ new SetupDotNetStep("Use .NET Core 6.0 SDK")
+ {
+ DotNetVersion = "6.0.x"
},
}
);
buildJob.Steps.Add(
- new UsingStep("Publish Coverage") {
+ new UsingStep("Publish Coverage")
+ {
Uses = "codecov/codecov-action@v1",
- With = new Dictionary {
+ With = new Dictionary
+ {
["name"] = "actions-${{ matrix.os }}",
- ["fail_ci_if_error"] = "true",
}
}
);
buildJob.Steps.Add(
- new UploadArtifactStep("Publish logs") {
+ new UploadArtifactStep("Publish logs")
+ {
Name = "logs",
Path = "artifacts/logs/",
If = "always()"
@@ -92,7 +162,8 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
);
buildJob.Steps.Add(
- new UploadArtifactStep("Publish coverage data") {
+ new UploadArtifactStep("Publish coverage data")
+ {
Name = "coverage",
Path = "coverage/",
If = "always()"
@@ -100,7 +171,8 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
);
buildJob.Steps.Add(
- new UploadArtifactStep("Publish test data") {
+ new UploadArtifactStep("Publish test data")
+ {
Name = "test data",
Path = "artifacts/test/",
If = "always()"
@@ -108,31 +180,23 @@ public static RocketSurgeonGitHubActionsConfiguration Middleware(RocketSurgeonGi
);
buildJob.Steps.Add(
- new UploadArtifactStep("Publish NuGet Packages") {
+ new UploadArtifactStep("Publish NuGet Packages")
+ {
Name = "nuget",
Path = "artifacts/nuget/",
If = "always()"
}
);
+ buildJob.Steps.Add(
+ new UploadArtifactStep("Publish Docs")
+ {
+ Name = "docs",
+ Path = "artifacts/docs/",
+ If = "always()"
+ }
+ );
- /*
-
- - publish: "${{ parameters.Artifacts }}/logs/"
- displayName: Publish Logs
- artifact: "Logs${{ parameters.Postfix }}"
- condition: always()
-
- - publish: ${{ parameters.Coverage }}
- displayName: Publish Coverage
- artifact: "Coverage${{ parameters.Postfix }}"
- condition: always()
-
- - publish: "${{ parameters.Artifacts }}/nuget/"
- displayName: Publish NuGet Artifacts
- artifact: "NuGet${{ parameters.Postfix }}"
- condition: always()
- */
return configuration;
}
}
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 19029998d..e1a1594e1 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -1,48 +1,54 @@
{
- "version": 1,
- "isRoot": true,
- "tools": {
- "cake.tool": {
- "version": "1.1.0",
- "commands": [
- "dotnet-cake"
- ]
- },
- "gitversion.tool": {
- "version": "5.7.0",
- "commands": [
- "dotnet-gitversion"
- ]
- },
- "dotnet-reportgenerator-globaltool": {
- "version": "4.8.12",
- "commands": [
- "reportgenerator"
- ]
- },
- "codecov.tool": {
- "version": "1.13.0",
- "commands": [
- "codecov"
- ]
- },
- "nuke.globaltool": {
- "version": "5.3.0",
- "commands": [
- "nuke"
- ]
- },
- "nukeeper": {
- "version": "0.34.0",
- "commands": [
- "nukeeper"
- ]
- },
- "jetbrains.resharper.globaltools": {
- "version": "2021.2.1",
- "commands": [
- "jb"
- ]
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-outdated": {
+ "version": "2.11.0",
+ "commands": [
+ "dotnet-outdated"
+ ]
+ },
+ "gitversion.tool": {
+ "version": "5.10.1",
+ "commands": [
+ "dotnet-gitversion"
+ ]
+ },
+ "dotnet-reportgenerator-globaltool": {
+ "version": "5.1.6",
+ "commands": [
+ "reportgenerator"
+ ]
+ },
+ "nuke.globaltool": {
+ "version": "6.0.3",
+ "commands": [
+ "nuke"
+ ]
+ },
+ "codecov.tool": {
+ "version": "1.13.0",
+ "commands": [
+ "codecov"
+ ]
+ },
+ "jetbrains.resharper.globaltools": {
+ "version": "2022.1.1",
+ "commands": [
+ "jb"
+ ]
+ },
+ "dotnet-format": {
+ "version": "5.1.250801",
+ "commands": [
+ "dotnet-format"
+ ]
+ },
+ "nukeeper": {
+ "version": "0.35.0",
+ "commands": [
+ "nukeeper"
+ ]
+ }
}
- }
-}
\ No newline at end of file
+}
diff --git a/.editorconfig b/.editorconfig
index 81d812533..bb7e8b5d2 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,168 +1,1045 @@
-root=true
+root = true
+
+[*.{cs, cshtml}]
+charset = utf-8
+indent_style = space
+indent_size = 4
+max_line_length = 160
+insert_final_newline = true
+
+[*.{js, ts, vue}]
+indent_style = space
+indent_size = 4
+insert_final_newline = true
+max_line_length = 160
+
+[*.{json, xml, yml, yaml}]
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+max_line_length = 160
+
[*]
-charset=utf-8
-indent_style=space
-indent_size=4
-trim_trailing_whitespace=true
-insert_final_newline=true
-max_line_length=180
-end_of_line=crlf
+#### .NET Coding Conventions ####
-# Microsoft .NET properties
-csharp_new_line_before_members_in_object_initializers=false
-csharp_new_line_before_open_brace=types,methods,properties,indexers,events,event_accessors,control_blocks,anonymous_types,object_collections,array_initializers,local_functions
-csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
-csharp_space_between_parentheses=expressions
-csharp_style_expression_bodied_accessors=true:suggestion
-csharp_style_expression_bodied_constructors=true:none
-csharp_style_expression_bodied_indexers=true:none
-csharp_style_expression_bodied_methods=true:none
-csharp_style_expression_bodied_operators=true:none
-csharp_style_expression_bodied_properties=true:suggestion
-csharp_style_var_elsewhere=true:warning
-csharp_style_var_for_built_in_types=true:warning
-csharp_style_var_when_type_is_apparent=true:warning
-dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:warning
-dotnet_style_parentheses_in_other_binary_operators=never_if_unnecessary:warning
-dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:warning
-dotnet_style_predefined_type_for_locals_parameters_members=true:error
-dotnet_style_predefined_type_for_member_access=true:error
-dotnet_style_qualification_for_event=false:warning
-dotnet_style_qualification_for_field=false:warning
-dotnet_style_qualification_for_method=false:warning
-dotnet_style_qualification_for_property=false:warning
-dotnet_style_require_accessibility_modifiers=for_non_interface_members:suggestion
-# Sort using and Import directives with System.* appearing first
-dotnet_sort_system_directives_first=true
-# Suggest more modern language features when available
-dotnet_style_coalesce_expression=true:error
-dotnet_style_collection_initializer=true:suggestion
-dotnet_style_explicit_tuple_names=true:error
-dotnet_style_null_propagation=true:warning
-dotnet_style_object_initializer=true:warning
-
-# Naming Conventions:
-# Pascal Casing
-#dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum
-#dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = *
-#dotnet_naming_style.pascal_case_style.capitalization = pascal_case
-csharp_style_conditional_delegate_call=true:suggestion
-csharp_style_inlined_variable_declaration=true:error
-csharp_style_pattern_matching_over_as_with_null_check=true:error
-csharp_style_pattern_matching_over_is_with_cast_check=true:error
-csharp_style_throw_expression=true:suggestion
-csharp_new_line_before_catch=true
-csharp_new_line_before_else=true
-csharp_new_line_before_finally=true
-csharp_new_line_before_members_in_anonymous_types=true
+# Organize usings
+dotnet_separate_import_directive_groups = false
+dotnet_sort_system_directives_first = true
+
+# this. and Me. preferences
+dotnet_style_qualification_for_event = false:warning
+dotnet_style_qualification_for_field = false:warning
+dotnet_style_qualification_for_method = false:warning
+dotnet_style_qualification_for_property = false:warning
+
+# Language keywords vs BCL types preferences
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# Parentheses preferences
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
+
+# Modifier preferences
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
+
+# Expression-level preferences
+csharp_style_deconstructed_variable_declaration = true:warning
+csharp_style_inlined_variable_declaration = true:warning
+csharp_style_throw_expression = true:warning
+dotnet_style_coalesce_expression = true:warning
+dotnet_style_collection_initializer = true:warning
+dotnet_style_explicit_tuple_names = true:warning
+dotnet_style_null_propagation = true:warning
+dotnet_style_object_initializer = true:warning
+dotnet_style_prefer_auto_properties = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
+dotnet_style_prefer_conditional_expression_over_return = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
+dotnet_style_prefer_inferred_tuple_names = true:warning
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
+
+# Field preferences
+dotnet_style_readonly_field = true:warning
+
+# Parameter preferences
+dotnet_code_quality_unused_parameters = non_public:suggestion
+
+#### C# Coding Conventions ####
+
+# var preferences
+csharp_style_var_elsewhere = true:suggestion
+csharp_style_var_for_built_in_types = true:suggestion
+csharp_style_var_when_type_is_apparent = true:suggestion
+
+# Expression-bodied members
+csharp_style_expression_bodied_accessors = true:suggestion
+csharp_style_expression_bodied_constructors = true:suggestion
+csharp_style_expression_bodied_indexers = true:suggestion
+csharp_style_expression_bodied_lambdas = true:suggestion
+csharp_style_expression_bodied_local_functions = true:suggestion
+csharp_style_expression_bodied_methods = true:suggestion
+csharp_style_expression_bodied_operators = true:suggestion
+csharp_style_expression_bodied_properties = true:suggestion
+
+# Pattern matching preferences
+csharp_style_pattern_matching_over_as_with_null_check = true:warning
+csharp_style_pattern_matching_over_is_with_cast_check = true:warning
+csharp_style_prefer_switch_expression = true:warning
+
+# Null-checking preferences
+csharp_style_conditional_delegate_call = true:warning
+
+# Modifier preferences
+csharp_prefer_static_local_function = true:warning
+csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, static, readonly, override, extern, unsafe, volatile, async:suggestion
+
+# Code-block preferences
+csharp_prefer_braces = true:none
+csharp_prefer_simple_using_statement = true:suggestion
+
+# Expression-level preferences
+csharp_prefer_simple_default_expression = true:warning
+csharp_style_pattern_local_over_anonymous_function = true:warning
+csharp_style_prefer_index_operator = true:warning
+csharp_style_prefer_range_operator = true:warning
+csharp_style_unused_value_assignment_preference = discard_variable:suggestion
+csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
+
+# 'using' directive preferences
+
+#### C# Formatting Rules ####
+
+# New line preferences
+csharp_new_line_before_catch = true
+csharp_new_line_before_else = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_before_members_in_object_initializers = false
+csharp_new_line_before_open_brace = all
+csharp_new_line_between_query_expression_clauses = true
+
+# Indentation preferences
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_case_contents_when_block = true
+csharp_indent_labels = no_change
+csharp_indent_switch_labels = true
+
+# Space preferences
+csharp_space_after_cast = false
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_after_comma = true
+csharp_space_after_dot = false
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_after_semicolon_in_for_statement = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_around_declaration_statements = false
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_before_comma = false
+csharp_space_before_dot = false
+csharp_space_before_open_square_brackets = false
+csharp_space_before_semicolon_in_for_statement = false
+csharp_space_between_empty_square_brackets = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_parentheses = expressions
+csharp_space_between_square_brackets = false
+
+# Wrapping preferences
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = true
+
+#### Naming styles ####
+
+# Naming rules
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.type_parameter_should_be_begins_with_t.severity = suggestion
+dotnet_naming_rule.type_parameter_should_be_begins_with_t.symbols = type_parameter
+dotnet_naming_rule.type_parameter_should_be_begins_with_t.style = begins_with_t
+
+dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
+dotnet_naming_rule.locals_should_be_camel_case.symbols = local
+dotnet_naming_rule.locals_should_be_camel_case.style = camel_case
+
+dotnet_naming_rule.static_field_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.static_field_should_be_pascal_case.symbols = static_field
+dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.const_field_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.const_field_should_be_pascal_case.symbols = const_field
+dotnet_naming_rule.const_field_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.private_field_members_should_be_underscore_camel_case.severity = suggestion
+dotnet_naming_rule.private_field_members_should_be_underscore_camel_case.symbols = private_field
+dotnet_naming_rule.private_field_members_should_be_underscore_camel_case.style = _camel_case
+
+dotnet_naming_rule.field_should_be_camel_case.severity = suggestion
+dotnet_naming_rule.field_should_be_camel_case.symbols = field
+dotnet_naming_rule.field_should_be_camel_case.style = camel_case
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# Symbol specifications
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = *
+dotnet_naming_symbols.interface.required_modifiers =
+
+dotnet_naming_symbols.local.applicable_kinds = local, local_function
+dotnet_naming_symbols.local.applicable_accessibilities = *
+dotnet_naming_symbols.local.required_modifiers =
+dotnet_naming_symbols.type_parameter.applicable_kinds = type_parameter
+dotnet_naming_symbols.type_parameter.applicable_accessibilities = *
+dotnet_naming_symbols.type_parameter.required_modifiers =
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, delegate
+dotnet_naming_symbols.types.applicable_accessibilities = *
+dotnet_naming_symbols.types.required_modifiers =
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = *
+dotnet_naming_symbols.non_field_members.required_modifiers =
+dotnet_naming_symbols.private_field.applicable_kinds = field
+dotnet_naming_symbols.private_field.applicable_accessibilities = private, private_protected
+dotnet_naming_symbols.private_field.required_modifiers =
+dotnet_naming_symbols.field.applicable_kinds = field
+dotnet_naming_symbols.field.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
+dotnet_naming_symbols.field.required_modifiers =
+dotnet_naming_symbols.static_field.applicable_kinds = field
+dotnet_naming_symbols.static_field.applicable_accessibilities =
+dotnet_naming_symbols.static_field.required_modifiers = static
+
+dotnet_naming_symbols.const_field.applicable_kinds = field
+dotnet_naming_symbols.const_field.applicable_accessibilities = *
+dotnet_naming_symbols.const_field.required_modifiers = const
+
+# Naming styles
+
+# dotnet_naming_style.pascal_case.required_prefix =
+# dotnet_naming_style.pascal_case.required_suffix =
+# dotnet_naming_style.pascal_case.word_separator =
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+# dotnet_naming_style.camel_case.required_prefix =
+# dotnet_naming_style.camel_case.required_suffix =
+# dotnet_naming_style.camel_case.word_separator =
+dotnet_naming_style.camel_case.capitalization = camel_case
+
+dotnet_naming_style._camel_case.required_prefix = _
+# dotnet_naming_style._camel_case.required_suffix =
+# dotnet_naming_style._camel_case.word_separator =
+dotnet_naming_style._camel_case.capitalization = camel_case
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+# dotnet_naming_style.begins_with_i.required_suffix =
+# dotnet_naming_style.begins_with_i.word_separator =
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
+
+dotnet_naming_style.begins_with_t.required_prefix = T
+# dotnet_naming_style.begins_with_t.required_suffix =
+# dotnet_naming_style.begins_with_t.word_separator =
+dotnet_naming_style.begins_with_t.capitalization = pascal_case
+
+dotnet_diagnostic.ide0058.severity = none
+
+# CodeQuality
+# CA1000: Do not declare static members on generic types
+# dotnet_diagnostic.CA1000.severity = warning
+
+# CA1001: Types that own disposable fields should be disposable
+# dotnet_diagnostic.CA1001.severity = warning
+
+# CA1003: Use generic event handler instances
+# dotnet_diagnostic.CA1003.severity = none
+
+# CA1008: Enums should have zero value
+# dotnet_diagnostic.CA1008.severity = none
+
+# CA1010: Collections should implement generic interface
+# dotnet_diagnostic.CA1010.severity = warning
+
+# CA1012: Abstract types should not have constructors
+# dotnet_diagnostic.CA1012.severity = none
+
+# CA1014: Mark assemblies with CLSCompliant
+# dotnet_diagnostic.CA1014.severity = none
+
+# CA1016: Mark assemblies with assembly version
+# dotnet_diagnostic.CA1016.severity = warning
+
+# CA1017: Mark assemblies with ComVisible
+# dotnet_diagnostic.CA1017.severity = none
+
+# CA1018: Mark attributes with AttributeUsageAttribute
+# dotnet_diagnostic.CA1018.severity = warning
+
+# CA1019: Define accessors for attribute arguments
+# dotnet_diagnostic.CA1019.severity = none
+
+# CA1024: Use properties where appropriate
+# dotnet_diagnostic.CA1024.severity = none
+
+# CA1027: Mark enums with FlagsAttribute
+# dotnet_diagnostic.CA1027.severity = none
+
+# CA1028: Enum Storage should be Int32
+# dotnet_diagnostic.CA1028.severity = warning
+
+# CA1030: Use events where appropriate
+# dotnet_diagnostic.CA1030.severity = warning
+
+# CA1031: Do not catch general exception types
+# dotnet_diagnostic.CA1031.severity = warning
+
+# CA1032: Implement standard exception constructors
+# dotnet_diagnostic.CA1032.severity = warning
+
+# CA1033: Interface methods should be callable by child types
+# dotnet_diagnostic.CA1033.severity = none
+
+# CA1034: Nested types should not be visible
+# dotnet_diagnostic.CA1034.severity = warning
+
+# CA1036: Override methods on comparable types
+# dotnet_diagnostic.CA1036.severity = warning
+
+# CA1040: Avoid empty interfaces
+# dotnet_diagnostic.CA1040.severity = warning
+
+# CA1041: Provide ObsoleteAttribute message
+# dotnet_diagnostic.CA1041.severity = warning
+
+# CA1043: Use Integral Or String Argument For Indexers
+# dotnet_diagnostic.CA1043.severity = warning
+
+# CA1044: Properties should not be write only
+# dotnet_diagnostic.CA1044.severity = warning
+
+# CA1050: Declare types in namespaces
+# dotnet_diagnostic.CA1050.severity = none
+
+# CA1051: Do not declare visible instance fields
+# dotnet_diagnostic.CA1051.severity = warning
+
+# CA1052: Static holder types should be Static or NotInheritable
+# dotnet_diagnostic.CA1052.severity = warning
+
+# CA1054: Uri parameters should not be strings
+# dotnet_diagnostic.CA1054.severity = warning
+
+# CA1055: Uri return values should not be strings
+# dotnet_diagnostic.CA1055.severity = warning
+
+# CA1056: Uri properties should not be strings
+# dotnet_diagnostic.CA1056.severity = warning
+
+# CA1060: Move pinvokes to native methods class
+# dotnet_diagnostic.CA1060.severity = none
+
+# CA1061: Do not hide base class methods
+# dotnet_diagnostic.CA1061.severity = warning
+
+# CA1062: Validate arguments of public methods
+dotnet_diagnostic.ca1062.severity = none
+
+# CA1063: Implement IDisposable Correctly
+# dotnet_diagnostic.CA1063.severity = none
+
+# CA1064: Exceptions should be public
+# dotnet_diagnostic.CA1064.severity = warning
+
+# CA1065: Do not raise exceptions in unexpected locations
+# dotnet_diagnostic.CA1065.severity = warning
+
+# CA1066: Type {0} should implement IEquatable because it overrides Equals
+# dotnet_diagnostic.CA1066.severity = warning
+
+# CA1067: Override Object.Equals(object) when implementing IEquatable
+# dotnet_diagnostic.CA1067.severity = warning
+
+# CA1068: CancellationToken parameters must come last
+# dotnet_diagnostic.CA1068.severity = warning
+
+# CA1200: Avoid using cref tags with a prefix
+# dotnet_diagnostic.CA1200.severity = warning
+
+# CA1501: Avoid excessive inheritance
+# dotnet_diagnostic.CA1501.severity = none
+
+# CA1502: Avoid excessive complexity
+# dotnet_diagnostic.CA1502.severity = none
+
+# CA1505: Avoid unmaintainable code
+# dotnet_diagnostic.CA1505.severity = none
+
+# CA1506: Avoid excessive class coupling
+# dotnet_diagnostic.CA1506.severity = none
+
+# CA1507: Use nameof to express symbol names
+# dotnet_diagnostic.CA1507.severity = warning
+
+# CA1508: Avoid dead conditional code
+# dotnet_diagnostic.CA1508.severity = none
+
+# CA1509: Invalid entry in code metrics rule specification file
+# dotnet_diagnostic.CA1509.severity = none
+
+# CA1707: Identifiers should not contain underscores
+# dotnet_diagnostic.CA1707.severity = none
+
+# CA1708: Identifiers should differ by more than case
+# dotnet_diagnostic.CA1708.severity = none
+
+# CA1710: Identifiers should have correct suffix
+# dotnet_diagnostic.CA1710.severity = warning
+
+# CA1711: Identifiers should not have incorrect suffix
+# dotnet_diagnostic.CA1711.severity = none
+
+# CA1712: Do not prefix enum values with type name
+# dotnet_diagnostic.CA1712.severity = warning
+
+# CA1714: Flags enums should have plural names
+# dotnet_diagnostic.CA1714.severity = warning
+
+# CA1715: Identifiers should have correct prefix
+# dotnet_diagnostic.CA1715.severity = warning
+
+# CA1716: Identifiers should not match keywords
+# dotnet_diagnostic.CA1716.severity = warning
+
+# CA1717: Only FlagsAttribute enums should have plural names
+# dotnet_diagnostic.CA1717.severity = warning
+
+# CA1720: Identifier contains type name
+# dotnet_diagnostic.CA1720.severity = warning
+
+# CA1721: Property names should not match get methods
+# dotnet_diagnostic.CA1721.severity = warning
+
+# CA1724: Type names should not match namespaces
+# dotnet_diagnostic.CA1724.severity = warning
+
+# CA1725: Parameter names should match base declaration
+# dotnet_diagnostic.CA1725.severity = none
+
+# CA1801: Review unused parameters
+# dotnet_diagnostic.CA1801.severity = warning
+
+# CA1802: Use literals where appropriate
+# dotnet_diagnostic.CA1802.severity = warning
+
+# CA1806: Do not ignore method results
+# dotnet_diagnostic.CA1806.severity = warning
+
+# CA1812: Avoid uninstantiated internal classes
+# dotnet_diagnostic.CA1812.severity = none
+
+# CA1814: Prefer jagged arrays over multidimensional
+# dotnet_diagnostic.CA1814.severity = warning
+
+# CA1815: Override equals and operator equals on value types
+# dotnet_diagnostic.CA1815.severity = warning
+
+# CA1819: Properties should not return arrays
+# dotnet_diagnostic.CA1819.severity = warning
+
+# CA1821: Remove empty Finalizers
+# dotnet_diagnostic.CA1821.severity = warning
+
+# CA1822: Mark members as static
+# dotnet_diagnostic.CA1822.severity = warning
+
+# CA1823: Avoid unused private fields
+# dotnet_diagnostic.CA1823.severity = warning
+
+# CA2007: Consider calling ConfigureAwait on the awaited task
+dotnet_diagnostic.ca2007.severity = none
+
+# CA2119: Seal methods that satisfy private interfaces
+# dotnet_diagnostic.CA2119.severity = warning
+
+# CA2200: Rethrow to preserve stack details.
+# dotnet_diagnostic.CA2200.severity = warning
+
+# CA2211: Non-constant fields should not be visible
+# dotnet_diagnostic.CA2211.severity = warning
+
+# CA2214: Do not call overridable methods in constructors
+# dotnet_diagnostic.CA2214.severity = warning
+
+# CA2217: Do not mark enums with FlagsAttribute
+# dotnet_diagnostic.CA2217.severity = none
+
+# CA2218: Override GetHashCode on overriding Equals
+# dotnet_diagnostic.CA2218.severity = warning
+
+# CA2219: Do not raise exceptions in finally clauses
+# dotnet_diagnostic.CA2219.severity = warning
+
+# CA2224: Override Equals on overloading operator equals
+# dotnet_diagnostic.CA2224.severity = warning
+
+# CA2225: Operator overloads have named alternates
+# dotnet_diagnostic.CA2225.severity = warning
+
+# CA2226: Operators should have symmetrical overloads
+# dotnet_diagnostic.CA2226.severity = warning
+
+# CA2227: Collection properties should be read only
+# dotnet_diagnostic.CA2227.severity = warning
+
+# CA2231: Overload operator equals on overriding value type Equals
+# dotnet_diagnostic.CA2231.severity = warning
+
+# CA2234: Pass system uri objects instead of strings
+# dotnet_diagnostic.CA2234.severity = warning
+
+# CA2244: Do not duplicate indexed element initializations
+# dotnet_diagnostic.CA2244.severity = warning
+
+# CA2245: Do not assign a property to itself.
+# dotnet_diagnostic.CA2245.severity = warning
+
+# CA2246: Assigning symbol and its member in the same statement.
+# dotnet_diagnostic.CA2246.severity = warning
+
+# NetCore
+
+# CA1303: Do not pass literals as localized parameters
+# dotnet_diagnostic.CA1303.severity = none
+
+# CA1304: Specify CultureInfo
+# dotnet_diagnostic.CA1304.severity = none
+
+# CA1305: Specify IFormatProvider
+# dotnet_diagnostic.CA1305.severity = none
+
+# CA1307: Specify StringComparison
+# dotnet_diagnostic.CA1307.severity = warning
+
+# CA1308: Normalize strings to uppercase
+# dotnet_diagnostic.CA1308.severity = warning
+
+# CA1309: Use ordinal stringcomparison
+# dotnet_diagnostic.CA1309.severity = none
+
+# CA1401: P/Invokes should not be visible
+# dotnet_diagnostic.CA1401.severity = warning
+
+# CA1810: Initialize reference type static fields inline
+# dotnet_diagnostic.CA1810.severity = warning
+
+# CA1813: Avoid unsealed attributes
+# dotnet_diagnostic.CA1813.severity = none
+
+# CA1816: Dispose methods should call SuppressFinalize
+# dotnet_diagnostic.CA1816.severity = none
+
+# CA1820: Test for empty strings using string length
+# dotnet_diagnostic.CA1820.severity = warning
+
+# CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
+# dotnet_diagnostic.CA1824.severity = warning
+
+# CA1825: Avoid zero-length array allocations.
+# dotnet_diagnostic.CA1825.severity = warning
+
+# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
+# dotnet_diagnostic.CA1826.severity = warning
+
+# CA1827: Do not use Count() or LongCount() when Any() can be used
+# dotnet_diagnostic.CA1827.severity = warning
+
+# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
+# dotnet_diagnostic.CA1828.severity = warning
+
+# CA1829: Use Length/Count property instead of Count() when available
+# dotnet_diagnostic.CA1829.severity = warning
+
+# CA2000: Dispose objects before losing scope
+# dotnet_diagnostic.CA2000.severity = warning
+
+# CA2002: Do not lock on objects with weak identity
+# dotnet_diagnostic.CA2002.severity = warning
+
+# CA2008: Do not create tasks without passing a TaskScheduler
+# dotnet_diagnostic.CA2008.severity = warning
+
+# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
+# dotnet_diagnostic.CA2009.severity = warning
+
+# CA2010: Always consume the value returned by methods marked with PreserveSigAttribute
+# dotnet_diagnostic.CA2010.severity = warning
+
+# CA2100: Review SQL queries for security vulnerabilities
+# dotnet_diagnostic.CA2100.severity = warning
+
+# CA2101: Specify marshaling for P/Invoke string arguments
+# dotnet_diagnostic.CA2101.severity = warning
+
+# CA2201: Do not raise reserved exception types
+# dotnet_diagnostic.CA2201.severity = none
+
+# CA2207: Initialize value type static fields inline
+# dotnet_diagnostic.CA2207.severity = warning
+
+# CA2208: Instantiate argument exceptions correctly
+# dotnet_diagnostic.CA2208.severity = warning
+
+# CA2213: Disposable fields should be disposed
+# dotnet_diagnostic.CA2213.severity = warning
+
+# CA2216: Disposable types should declare finalizer
+# dotnet_diagnostic.CA2216.severity = warning
+
+# CA2229: Implement serialization constructors
+# dotnet_diagnostic.CA2229.severity = warning
+
+# CA2235: Mark all non-serializable fields
+# dotnet_diagnostic.CA2235.severity = warning
+
+# CA2237: Mark ISerializable types with serializable
+# dotnet_diagnostic.CA2237.severity = warning
+
+# CA2241: Provide correct arguments to formatting methods
+# dotnet_diagnostic.CA2241.severity = warning
+
+# CA2242: Test for NaN correctly
+# dotnet_diagnostic.CA2242.severity = warning
+
+# CA2243: Attribute string literals should parse correctly
+# dotnet_diagnostic.CA2243.severity = warning
+
+# CA2300: Do not use insecure deserializer BinaryFormatter
+# dotnet_diagnostic.CA2300.severity = none
+
+# CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
+# dotnet_diagnostic.CA2301.severity = none
+
+# CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
+# dotnet_diagnostic.CA2302.severity = none
+
+# CA2305: Do not use insecure deserializer LosFormatter
+# dotnet_diagnostic.CA2305.severity = none
+
+# CA2310: Do not use insecure deserializer NetDataContractSerializer
+# dotnet_diagnostic.CA2310.severity = none
+
+# CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder
+# dotnet_diagnostic.CA2311.severity = none
+
+# CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing
+# dotnet_diagnostic.CA2312.severity = none
+
+# CA2315: Do not use insecure deserializer ObjectStateFormatter
+# dotnet_diagnostic.CA2315.severity = none
+
+# CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
+# dotnet_diagnostic.CA2321.severity = none
+
+# CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
+# dotnet_diagnostic.CA2322.severity = none
+
+# CA2326: Do not use TypeNameHandling values other than None
+# dotnet_diagnostic.CA2326.severity = none
+
+# CA2327: Do not use insecure JsonSerializerSettings
+# dotnet_diagnostic.CA2327.severity = none
+
+# CA2328: Ensure that JsonSerializerSettings are secure
+# dotnet_diagnostic.CA2328.severity = none
+
+# CA2329: Do not deserialize with JsonSerializer using an insecure configuration
+# dotnet_diagnostic.CA2329.severity = none
+
+# CA2330: Ensure that JsonSerializer has a secure configuration when deserializing
+# dotnet_diagnostic.CA2330.severity = none
+
+# CA3001: Review code for SQL injection vulnerabilities
+# dotnet_diagnostic.CA3001.severity = none
+
+# CA3002: Review code for XSS vulnerabilities
+# dotnet_diagnostic.CA3002.severity = none
+
+# CA3003: Review code for file path injection vulnerabilities
+# dotnet_diagnostic.CA3003.severity = none
+
+# CA3004: Review code for information disclosure vulnerabilities
+# dotnet_diagnostic.CA3004.severity = none
+
+# CA3005: Review code for LDAP injection vulnerabilities
+# dotnet_diagnostic.CA3005.severity = none
+
+# CA3006: Review code for process command injection vulnerabilities
+# dotnet_diagnostic.CA3006.severity = none
+
+# CA3007: Review code for open redirect vulnerabilities
+# dotnet_diagnostic.CA3007.severity = none
+
+# CA3008: Review code for XPath injection vulnerabilities
+# dotnet_diagnostic.CA3008.severity = none
+
+# CA3009: Review code for XML injection vulnerabilities
+# dotnet_diagnostic.CA3009.severity = none
+
+# CA3010: Review code for XAML injection vulnerabilities
+# dotnet_diagnostic.CA3010.severity = none
+
+# CA3011: Review code for DLL injection vulnerabilities
+# dotnet_diagnostic.CA3011.severity = none
+
+# CA3012: Review code for regex injection vulnerabilities
+# dotnet_diagnostic.CA3012.severity = none
+
+# CA3061: Do Not Add Schema By URL
+# dotnet_diagnostic.CA3061.severity = warning
+
+# CA5350: Do Not Use Weak Cryptographic Algorithms
+# dotnet_diagnostic.CA5350.severity = warning
+
+# CA5351: Do Not Use Broken Cryptographic Algorithms
+# dotnet_diagnostic.CA5351.severity = warning
+
+# CA5358: Do Not Use Unsafe Cipher Modes
+# dotnet_diagnostic.CA5358.severity = none
+
+# CA5359: Do Not Disable Certificate Validation
+# dotnet_diagnostic.CA5359.severity = warning
+
+# CA5360: Do Not Call Dangerous Methods In Deserialization
+# dotnet_diagnostic.CA5360.severity = warning
+
+# CA5361: Do Not Disable SChannel Use of Strong Crypto
+# dotnet_diagnostic.CA5361.severity = warning
+
+# CA5362: Do Not Refer Self In Serializable Class
+# dotnet_diagnostic.CA5362.severity = none
+
+# CA5363: Do Not Disable Request Validation
+# dotnet_diagnostic.CA5363.severity = warning
+
+# CA5364: Do Not Use Deprecated Security Protocols
+# dotnet_diagnostic.CA5364.severity = warning
+
+# CA5365: Do Not Disable HTTP Header Checking
+# dotnet_diagnostic.CA5365.severity = warning
+
+# CA5366: Use XmlReader For DataSet Read Xml
+# dotnet_diagnostic.CA5366.severity = warning
+
+# CA5367: Do Not Serialize Types With Pointer Fields
+# dotnet_diagnostic.CA5367.severity = none
+
+# CA5368: Set ViewStateUserKey For Classes Derived From Page
+# dotnet_diagnostic.CA5368.severity = warning
+
+# CA5369: Use XmlReader For Deserialize
+# dotnet_diagnostic.CA5369.severity = warning
+
+# CA5370: Use XmlReader For Validating Reader
+# dotnet_diagnostic.CA5370.severity = warning
+
+# CA5371: Use XmlReader For Schema Read
+# dotnet_diagnostic.CA5371.severity = warning
+
+# CA5372: Use XmlReader For XPathDocument
+# dotnet_diagnostic.CA5372.severity = warning
+
+# CA5373: Do not use obsolete key derivation function
+# dotnet_diagnostic.CA5373.severity = warning
+
+# CA5374: Do Not Use XslTransform
+# dotnet_diagnostic.CA5374.severity = warning
+
+# CA5375: Do Not Use Account Shared Access Signature
+# dotnet_diagnostic.CA5375.severity = none
+
+# CA5376: Use SharedAccessProtocol HttpsOnly
+# dotnet_diagnostic.CA5376.severity = warning
+
+# CA5377: Use Container Level Access Policy
+# dotnet_diagnostic.CA5377.severity = warning
+
+# CA5378: Do not disable ServicePointManagerSecurityProtocols
+# dotnet_diagnostic.CA5378.severity = warning
+
+# CA5379: Do Not Use Weak Key Derivation Function Algorithm
+# dotnet_diagnostic.CA5379.severity = warning
+
+# CA5380: Do Not Add Certificates To Root Store
+# dotnet_diagnostic.CA5380.severity = warning
+
+# CA5381: Ensure Certificates Are Not Added To Root Store
+# dotnet_diagnostic.CA5381.severity = warning
+
+# CA5382: Use Secure Cookies In ASP.Net Core
+# dotnet_diagnostic.CA5382.severity = none
+
+# CA5383: Ensure Use Secure Cookies In ASP.Net Core
+# dotnet_diagnostic.CA5383.severity = none
+
+# CA5384: Do Not Use Digital Signature Algorithm (DSA)
+# dotnet_diagnostic.CA5384.severity = warning
+
+# CA5385: Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size
+# dotnet_diagnostic.CA5385.severity = warning
+
+# CA5386: Avoid hardcoding SecurityProtocolType value
+# dotnet_diagnostic.CA5386.severity = none
+
+# CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
+# dotnet_diagnostic.CA5387.severity = none
+
+# CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
+# dotnet_diagnostic.CA5388.severity = none
+
+# CA5389: Do Not Add Archive Item's Path To The Target File System Path
+# dotnet_diagnostic.CA5389.severity = none
+
+# CA5390: Do not hard-code encryption key
+# dotnet_diagnostic.CA5390.severity = none
+
+# CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers
+# dotnet_diagnostic.CA5391.severity = none
+
+# CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes
+# dotnet_diagnostic.CA5392.severity = none
+
+# CA5393: Do not use unsafe DllImportSearchPath value
+# dotnet_diagnostic.CA5393.severity = none
+
+# CA5394: Do not use insecure randomness
+# dotnet_diagnostic.CA5394.severity = none
+
+# CA5395: Miss HttpVerb attribute for action methods
+# dotnet_diagnostic.CA5395.severity = none
+
+# CA5396: Set HttpOnly to true for HttpCookie
+# dotnet_diagnostic.CA5396.severity = none
+
+# CA5397: Do not use deprecated SslProtocols values
+# dotnet_diagnostic.CA5397.severity = warning
+
+# CA5398: Avoid hardcoded SslProtocols values
+# dotnet_diagnostic.CA5398.severity = none
+
+# CA5399: HttpClients should enable certificate revocation list checks
+# dotnet_diagnostic.CA5399.severity = none
+
+# CA5400: Ensure HttpClient certificate revocation list check is not disabled
+# dotnet_diagnostic.CA5400.severity = none
+
+# CA5401: Do not use CreateEncryptor with non-default IV
+# dotnet_diagnostic.CA5401.severity = none
+
+# CA5402: Use CreateEncryptor with the default IV
+# dotnet_diagnostic.CA5402.severity = none
+
+# CA5403: Do not hard-code certificate
+# dotnet_diagnostic.CA5403.severity = none
+
+# NetFramework
+
+# CA1058: Types should not extend certain base types
+# dotnet_diagnostic.CA1058.severity = warning
+
+# CA2153: Do Not Catch Corrupted State Exceptions
+# dotnet_diagnostic.CA2153.severity = warning
+
+# CA3075: Insecure DTD processing in XML
+# dotnet_diagnostic.CA3075.severity = warning
+
+# CA3076: Insecure XSLT script processing.
+# dotnet_diagnostic.CA3076.severity = warning
+
+# CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader
+# dotnet_diagnostic.CA3077.severity = warning
+
+# CA3147: Mark Verb Handlers With Validate Antiforgery Token
+# dotnet_diagnostic.CA3147.severity = warning
+
+# PublicApi
+
+# RS0016: Add public types and members to the declared API
+# dotnet_diagnostic.RS0016.severity = warning
+
+# RS0017: Remove deleted types and members from the declared API
+# dotnet_diagnostic.RS0017.severity = warning
+
+# RS0022: Constructor make noninheritable base class inheritable
+# dotnet_diagnostic.RS0022.severity = warning
+
+# RS0024: The contents of the public API files are invalid
+# dotnet_diagnostic.RS0024.severity = warning
+
+# RS0025: Do not duplicate symbols in public API files
+# dotnet_diagnostic.RS0025.severity = warning
+
+# RS0026: Do not add multiple public overloads with optional parameters
+# dotnet_diagnostic.RS0026.severity = warning
+
+# RS0027: Public API with optional parameter(s) should have the most parameters amongst its public overloads.
+# dotnet_diagnostic.RS0027.severity = warning
# ReSharper properties
-resharper_accessor_declaration_braces=end_of_line
-resharper_align_linq_query=true
-resharper_align_multiline_argument=true
-resharper_align_multiline_calls_chain=true
-resharper_align_multiline_extends_list=true
-resharper_align_multiline_for_stmt=true
-resharper_align_multiline_parameter=true
-resharper_align_multiple_declaration=true
-resharper_align_multline_type_parameter_constrains=true
-resharper_align_multline_type_parameter_list=true
-resharper_align_tuple_components=true
-resharper_autodetect_indent_settings=true
-resharper_constructor_or_destructor_body=expression_body
-resharper_csharp_anonymous_method_declaration_braces=end_of_line
-resharper_csharp_outdent_commas=true
-resharper_csharp_outdent_dots=true
-resharper_csharp_space_within_parentheses=true
-resharper_csharp_wrap_after_declaration_lpar=true
-resharper_csharp_wrap_after_invocation_lpar=true
-resharper_csharp_wrap_before_binary_opsign=true
-resharper_csharp_wrap_before_declaration_rpar=true
-resharper_csharp_wrap_before_invocation_rpar=true
-resharper_enforce_line_ending_style=true
-resharper_initializer_braces=end_of_line
-resharper_int_align_switch_expressions=true
-resharper_int_align_switch_sections=true
-resharper_keep_existing_enum_arrangement=true
-resharper_keep_existing_switch_expression_arrangement=false
-resharper_max_initializer_elements_on_line=2
-resharper_method_or_operator_body=expression_body
-resharper_outdent_binary_ops=true
-resharper_place_comments_at_first_column=true
-resharper_place_simple_enum_on_single_line=true
-resharper_space_around_arrow_op=true
-resharper_space_within_single_line_array_initializer_braces=true
-resharper_use_heuristics_for_body_style=false
-resharper_use_indent_from_vs=false
-resharper_wrap_lines=true
-resharper_xmldoc_allow_far_alignment=true
-resharper_xmldoc_attribute_style=on_single_line
-resharper_xmldoc_indent_text=ZeroIndent
-resharper_xmldoc_max_blank_lines_between_tags=1
-resharper_xmldoc_pi_attribute_style=on_single_line
-resharper_xmldoc_space_after_last_pi_attribute=true
+resharper_align_linq_query = true
+resharper_align_multiline_argument = true
+resharper_align_multiline_array_and_object_initializer = false
+resharper_align_multiline_binary_expressions_chain = false
+resharper_align_multiline_calls_chain = true
+resharper_align_multiline_expression = true
+resharper_align_multiline_extends_list = true
+resharper_align_multiline_for_stmt = true
+resharper_align_multiline_parameter = true
+resharper_align_multiline_switch_expression = false
+resharper_align_multiple_declaration = true
+resharper_align_multline_type_parameter_constrains = true
+resharper_align_multline_type_parameter_list = true
+resharper_align_tuple_components = true
+resharper_arguments_anonymous_function = positional
+resharper_autodetect_indent_settings = true
+resharper_braces_for_for = not_required
+resharper_braces_for_foreach = not_required
+resharper_braces_for_ifelse = not_required_for_both
+resharper_braces_for_while = not_required
+resharper_braces_redundant = false
+resharper_constructor_or_destructor_body = block_body
+resharper_continuous_indent_multiplier = 1
+resharper_cpp_empty_block_style = multiline
+resharper_cpp_outdent_commas = false
+resharper_cpp_outdent_dots = false
+resharper_cpp_wrap_after_declaration_lpar = false
+resharper_cpp_wrap_after_invocation_lpar = false
+resharper_cpp_wrap_before_declaration_rpar = false
+resharper_cpp_wrap_before_invocation_rpar = false
+resharper_csharp_align_multiline_argument = true
+resharper_csharp_align_multiline_binary_expressions_chain = true
+resharper_csharp_align_multiline_expression = false
+resharper_csharp_brace_style = next_line
+resharper_csharp_empty_block_style = multiline
+resharper_csharp_outdent_commas = true
+resharper_csharp_outdent_dots = true
+resharper_csharp_place_comments_at_first_column = true
+resharper_csharp_wrap_after_declaration_lpar = true
+resharper_csharp_wrap_after_invocation_lpar = true
+resharper_csharp_wrap_before_binary_opsign = true
+resharper_csharp_wrap_before_declaration_rpar = true
+resharper_csharp_wrap_before_invocation_rpar = true
+resharper_csharp_wrap_multiple_declaration_style = chop_if_long
+resharper_empty_block_style = together_same_line
+resharper_indent_anonymous_method_block = false
+resharper_int_align_switch_expressions = true
+resharper_int_align_switch_sections = true
+resharper_keep_existing_declaration_block_arrangement = false
+resharper_keep_existing_embedded_block_arrangement = false
+resharper_keep_existing_enum_arrangement = true
+resharper_keep_existing_invocation_parens_arrangement = true
+resharper_keep_existing_linebreaks = true
+resharper_keep_existing_switch_expression_arrangement = false
+resharper_keep_user_linebreaks = true
+resharper_max_initializer_elements_on_line = 2
+resharper_method_or_operator_body = block_body
+resharper_outdent_binary_ops = true
+resharper_outdent_commas = true
+resharper_outdent_dots = true
+resharper_space_around_arrow_op = true
+resharper_space_within_single_line_array_initializer_braces = true
+resharper_use_heuristics_for_body_style = true
+resharper_use_indent_from_vs = false
+resharper_wrap_after_declaration_lpar = true
+resharper_wrap_after_invocation_lpar = true
+resharper_wrap_arguments_style = wrap_if_long
+resharper_wrap_before_declaration_rpar = true
+resharper_wrap_before_invocation_rpar = true
+resharper_wrap_chained_method_calls = wrap_if_long
+resharper_wrap_multiple_declaration_style = chop_if_long
+resharper_wrap_object_and_collection_initializer_style = chop_if_long
+resharper_xmldoc_attribute_style = on_single_line
+resharper_xmldoc_pi_attribute_style = on_single_line
+resharper_xmldoc_space_after_last_pi_attribute = true
+resharper_xmldoc_space_before_self_closing = true
# ReSharper inspection severities
-resharper_annotate_can_be_null_parameter_highlighting=warning
-resharper_annotate_can_be_null_type_member_highlighting=warning
-resharper_arrange_missing_parentheses_highlighting=warning
-resharper_arrange_this_qualifier_highlighting=warning
-resharper_built_in_type_reference_style_for_member_access_highlighting=error
-resharper_built_in_type_reference_style_highlighting=error
-resharper_enforce_do_while_statement_braces_highlighting=warning
-resharper_enforce_fixed_statement_braces_highlighting=warning
-resharper_enforce_foreach_statement_braces_highlighting=warning
-resharper_enforce_for_statement_braces_highlighting=warning
-resharper_enforce_if_statement_braces_highlighting=warning
-resharper_enforce_lock_statement_braces_highlighting=warning
-resharper_enforce_using_statement_braces_highlighting=warning
-resharper_enforce_while_statement_braces_highlighting=warning
-resharper_redundant_default_member_initializer_highlighting=hint
-resharper_remove_redundant_braces_highlighting=warning
-resharper_suggest_var_or_type_built_in_types_highlighting=warning
-resharper_suggest_var_or_type_elsewhere_highlighting=warning
-resharper_suggest_var_or_type_simple_types_highlighting=warning
-resharper_unnecessary_whitespace_highlighting=warning
-resharper_use_null_propagation_when_possible_highlighting=suggestion
-resharper_web_config_module_not_resolved_highlighting=warning
-resharper_web_config_type_not_resolved_highlighting=warning
-resharper_web_config_wrong_module_highlighting=warning
-
-# .NET Analzyer settings
-# VSTHRD200: Use "Async" suffix for awaitable methods
-dotnet_diagnostic.VSTHRD200.severity = none
-# CA2007: Do not directly await a Task
-dotnet_diagnostic.CA2007.severity = error
-
-[*.{cs,cshtml}]
-charset=utf-8
-indent_style=space
-indent_size=4
-insert_final_newline=true
-
-[*.{js,ts,vue}]
-indent_style=space
-indent_size=4
-insert_final_newline=true
-
-[*.{xml,yml,yaml}]
-indent_style=space
-indent_size=2
-insert_final_newline=true
-
-[*.json]
-indent_style=space
-indent_size=4
-insert_final_newline=true
-
-[*.{xml,csproj,props,targets}]
-indent_style=space
-
-[{*.har,*.inputactions,*.jsb2,*.jsb3,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,jest.config}]
-indent_style=space
-indent_size=2
-
-[*.{appxmanifest,asax,ascx,aspx,build,cg,cginc,compute,cs,cshtml,dtd,fs,fsi,fsscript,fsx,hlsl,hlsli,hlslinc,master,ml,mli,nuspec,razor,resw,resx,shader,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
-indent_style=space
-indent_size=4
-tab_width=4
+resharper_annotate_can_be_null_parameter_highlighting = warning
+resharper_annotate_can_be_null_type_member_highlighting = warning
+resharper_arrange_constructor_or_destructor_body_highlighting = none
+resharper_arrange_method_or_operator_body_highlighting = none
+resharper_arrange_redundant_parentheses_highlighting = hint
+resharper_arrange_this_qualifier_highlighting = hint
+resharper_arrange_type_member_modifiers_highlighting = hint
+resharper_arrange_type_modifiers_highlighting = hint
+resharper_built_in_type_reference_style_for_member_access_highlighting = hint
+resharper_built_in_type_reference_style_highlighting = hint
+resharper_enforce_do_while_statement_braces_highlighting = warning
+resharper_enforce_fixed_statement_braces_highlighting = warning
+resharper_enforce_foreach_statement_braces_highlighting = warning
+resharper_enforce_for_statement_braces_highlighting = warning
+resharper_enforce_if_statement_braces_highlighting = warning
+resharper_enforce_lock_statement_braces_highlighting = warning
+resharper_enforce_using_statement_braces_highlighting = warning
+resharper_enforce_while_statement_braces_highlighting = warning
+resharper_redundant_base_qualifier_highlighting = warning
+resharper_redundant_default_member_initializer_highlighting = hint
+resharper_remove_redundant_braces_highlighting = warning
+resharper_suggest_var_or_type_built_in_types_highlighting = hint
+resharper_suggest_var_or_type_elsewhere_highlighting = hint
+resharper_suggest_var_or_type_simple_types_highlighting = hint
+resharper_unnecessary_whitespace_highlighting = warning
+resharper_use_null_propagation_when_possible_highlighting = suggestion
+resharper_web_config_module_not_resolved_highlighting = warning
+resharper_web_config_type_not_resolved_highlighting = warning
+resharper_web_config_wrong_module_highlighting = warning
+resharper_partial_type_with_single_part_highlighting = none
+
+ij_xml_align_attributes = true
+ij_xml_align_text = false
+ij_xml_attribute_wrap = normal
+ij_xml_block_comment_at_first_column = true
+ij_xml_keep_blank_lines = 2
+ij_xml_keep_indents_on_empty_lines = false
+ij_xml_keep_line_breaks = true
+ij_xml_keep_line_breaks_in_text = true
+ij_xml_keep_whitespaces = true
+ij_xml_keep_whitespaces_around_cdata = preserve
+ij_xml_keep_whitespaces_inside_cdata = false
+ij_xml_line_comment_at_first_column = true
+ij_xml_space_after_tag_name = false
+ij_xml_space_around_equals_in_attribute = false
+ij_xml_space_inside_empty_tag = true
+ij_xml_text_wrap = off
+
+# Microsoft .NET properties
+dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
+dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
+dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
+dotnet_naming_rule.unity_serialized_field_rule.severity = warning
+dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
+dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
+dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
+dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
+dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
+dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
+dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
+
+[*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,dtd,fs,fsi,fsscript,fsx,hlsl,hlsli,hlslinc,master,ml,mli,nuspec,paml,resw,resx,shader,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
+indent_style = space
+indent_size = 4
+tab_width = 4
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index eba8bd573..000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: 'github-actions'
- directory: '/'
- schedule:
- interval: 'daily'
- assignees:
- - 'david-driscoll'
- open-pull-requests-limit: 100
-
- - package-ecosystem: 'npm'
- directory: '/'
- schedule:
- interval: 'daily'
- assignees:
- - 'david-driscoll'
- open-pull-requests-limit: 100
-
- - package-ecosystem: 'nuget'
- directory: '/'
- schedule:
- interval: 'daily'
- assignees:
- - 'david-driscoll'
- ignore:
- - dependency-name: Microsoft.Extensions.*
- - dependency-name: Microsoft.AspNetCore.*
- open-pull-requests-limit: 100
diff --git a/.github/label-commenter-dependabot.yml b/.github/label-commenter-dependabot.yml
deleted file mode 100644
index 0e71df27b..000000000
--- a/.github/label-commenter-dependabot.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-labels:
- - name: 'merge'
- labeled:
- pr:
- body: '@dependabot squash and merge'
diff --git a/.github/labels.yml b/.github/labels.yml
index a94e5d5d9..bee0d5482 100644
--- a/.github/labels.yml
+++ b/.github/labels.yml
@@ -1,54 +1,66 @@
-- name: "bug"
- color: "d73a4a"
+- name: 'bug'
+ color: 'd73a4a'
description: "Something isn't working"
-- name: "documentation"
+- name: 'documentation'
color: 0075ca
- description: "Improvements or additions to documentation"
-- name: "duplicate"
- color: "cfd3d7"
- description: "This issue or pull request already exists"
-- name: "enhancement"
- color: "a2eeef"
- description: "New feature or request"
-- name: "help wanted"
- color: "008672"
- description: "Extra attention is needed"
-- name: "good first issue"
- color: "7057ff"
- description: "Good for newcomers"
-- name: "invalid"
- color: "e4e669"
+ description: 'Improvements or additions to documentation'
+- name: 'duplicate'
+ color: 'cfd3d7'
+ description: 'This issue or pull request already exists'
+- name: 'enhancement'
+ color: 'a2eeef'
+ description: 'New feature or request'
+- name: 'help wanted'
+ color: '008672'
+ description: 'Extra attention is needed'
+- name: 'good first issue'
+ color: '7057ff'
+ description: 'Good for newcomers'
+- name: 'invalid'
+ color: 'e4e669'
description: "This doesn't seem right"
-- name: "question"
- color: "d876e3"
- description: "Further information is requested"
-- name: "wontfix"
- color: "ffffff"
- description: "This will not be worked on"
-- name: "feature"
- color: "ccf5ff"
- description: "This adds some form of new functionality"
-- name: "breaking change"
- color: "efa7ae"
- description: "This breaks existing behavior"
-- name: "mysterious"
- color: "cccccc"
- description: "We forgot to label this"
-- name: "chore"
- color: "27127c"
- description: "Just keeping things neat and tidy"
-- name: "dependencies"
- color: "edc397"
- description: "Pull requests that update a dependency file"
-- name: "merge"
- color: "98ed98"
- description: "Shipit!"
-- name: "deprecated"
- color: "dd824d"
- description: "Deprecated functionality"
-- name: "removed"
- color: "fce99f"
- description: "Removed functionality"
-- name: "security"
- color: "cbce1e"
- description: "Security related issue"
+- name: 'question'
+ color: 'd876e3'
+ description: 'Further information is requested'
+- name: 'wontfix'
+ color: 'ffffff'
+ description: 'This will not be worked on'
+- name: 'feature'
+ color: 'ccf5ff'
+ description: 'This adds some form of new functionality'
+- name: 'breaking change'
+ color: 'efa7ae'
+ description: 'This breaks existing behavior'
+- name: 'mysterious'
+ color: 'cccccc'
+ description: 'We forgot to label this'
+- name: 'chore'
+ color: '27127c'
+ description: 'Just keeping things neat and tidy'
+- name: 'dependencies'
+ color: 'edc397'
+ description: 'Pull requests that update a dependency file'
+- name: 'merge'
+ color: '98ed98'
+ description: 'Shipit!'
+- name: 'deprecated'
+ color: 'dd824d'
+ description: 'Deprecated functionality'
+- name: 'removed'
+ color: 'fce99f'
+ description: 'Removed functionality'
+- name: 'security'
+ color: 'cbce1e'
+ description: 'Security related issue'
+- name: 'private-dependencies'
+ color: 'edc397'
+ description: 'Private dependency'
+- name: 'rebase'
+ color: 'ffcc66'
+ description: 'Rebase branch'
+- name: 'stop updating'
+ color: '800000'
+ description: 'Stop Updating'
+- name: 'blocked'
+ color: 'FF5600'
+ description: 'Issue is blocked waiting for something or someone'
diff --git a/.github/renovate.json b/.github/renovate.json
new file mode 100644
index 000000000..1769b4f1d
--- /dev/null
+++ b/.github/renovate.json
@@ -0,0 +1,196 @@
+{
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+ "extends": [
+ "config:base",
+ ":automergePatch",
+ ":separateMajorReleases",
+ ":combinePatchMinorReleases",
+ ":enableVulnerabilityAlertsWithLabel(:old_key: security)",
+ ":dependencyDashboard"
+ ],
+ "prHourlyLimit": 10,
+ "prConcurrentLimit": 0,
+ "hostRules": [
+ {
+ "concurrentRequestLimit": 999
+ }
+ ],
+ "platformAutomerge": true,
+ "automergeType": "pr",
+ "automergeStrategy": "rebase",
+ "rebaseWhen": "auto",
+ "labels": [":package: dependencies"],
+ "rebaseLabel": ":trident: rebase",
+ "stopUpdatingLabel": ":vertical_traffic_light: stop updating",
+ "github-actions": {
+ "fileMatch": ["(^workflow-templates|\\.github\\/workflows)\\/[^/]+\\.ya?ml$", "(^|\\/)action\\.ya?ml$"],
+ "automerge": true,
+ "groupName": "github actions",
+ "labels": [":truck: private-dependencies"]
+ },
+ "packageRules": [
+ {
+ "matchManagers": ["nuget"],
+ "groupName": "build dependencies",
+ "matchPackagePatterns": ["^Nuke.Common", "^Microsoft\\.NET\\.Test\\.Sdk$", "^Rocket\\.Surgery\\.MSBuild$", "^Rocket\\.Surgery\\.Nuke$"],
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^Roslynator"],
+ "groupName": "roslynator",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^FluentAssertions"],
+ "groupName": "fluentassertions",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^NSubstitute"],
+ "groupName": "nsubstitute",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^Moq"],
+ "groupName": "moq",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^FakeItEasy"],
+ "groupName": "fakeiteasy",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^coverlet"],
+ "groupName": "coverlet",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^Bogus"],
+ "groupName": "bogus",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^ReportGenerator", "^reportgenerator", "^dotnet-reportgenerator"],
+ "groupName": "reportgenerator",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^JetBrains", "^jetbrains"],
+ "groupName": "jetbrains",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^GitVersion", "^gitversion"],
+ "groupName": "gitversion",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^xunit"],
+ "groupName": "xunit",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^bunit"],
+ "groupName": "bunit",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^FluentValidation"],
+ "groupName": "fluentvalidation",
+ "labels": [":package: dependencies"],
+ "automerge": false
+ },
+ {
+ "matchPackagePatterns": ["^NodaTime"],
+ "groupName": "nodatime",
+ "labels": [":package: dependencies"],
+ "automerge": false
+ },
+ {
+ "matchPackagePatterns": ["^DryIoc"],
+ "groupName": "dryioc",
+ "labels": [":package: dependencies"],
+ "automerge": false
+ },
+ {
+ "matchPackagePatterns": ["^FluentAssertions"],
+ "groupName": "fluentassertions",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchPackagePatterns": ["^Verify"],
+ "groupName": "verify",
+ "labels": [":truck: private-dependencies"],
+ "automerge": true
+ },
+ {
+ "matchManagers": ["nuget"],
+ "matchPackagePatterns": ["^System\\.Collections\\.Immutable", "^System\\.Interactive", "^System\\.Reactive", "^Humanizer"],
+ "labels": [":package: dependencies"],
+ "automerge": true
+ },
+ {
+ "matchSourceUrlPrefixes": ["https://github.com/RocketSurgeonsGuild"],
+ "labels": [":package: dependencies"],
+ "groupName": "Rocket Surgery Other"
+ },
+ {
+ "matchSourceUrlPrefixes": ["https://github.com/RocketSurgeonsGuild/Conventions"],
+ "labels": [":package: dependencies"],
+ "groupName": "Rocket Surgery Conventions"
+ },
+ {
+ "matchSourceUrlPrefixes": ["https://github.com/RocketSurgeonsGuild/Testing"],
+ "labels": [":truck: private-dependencies"],
+ "groupName": "Rocket Surgery Testing"
+ },
+ {
+ "matchSourceUrlPrefixes": ["https://github.com/RocketSurgeonsGuild/Extensions"],
+ "labels": [":package: dependencies"],
+ "groupName": "Rocket Surgery Extensions"
+ },
+ {
+ "description": "dotnet monorepo",
+ "groupName": "dotnet monorepo",
+ "enabled": false,
+ "matchSourceUrlPrefixes": [
+ "https://github.com/dotnet/aspnetcore",
+ "https://github.com/dotnet/efcore",
+ "https://github.com/dotnet/extensions",
+ "https://github.com/dotnet/runtime"
+ ]
+ },
+ {
+ "description": "dotnet monorepo [minor/patch]",
+ "groupName": "dotnet monorepo [minor/patch]",
+ "enabled": true,
+ "matchUpdateTypes": ["minor", "patch"],
+ "matchSourceUrlPrefixes": [
+ "https://github.com/dotnet/aspnetcore",
+ "https://github.com/dotnet/efcore",
+ "https://github.com/dotnet/extensions",
+ "https://github.com/dotnet/runtime"
+ ]
+ },
+ {
+ "description": "dotnet msbuild",
+ "groupName": "dotnet msbuild",
+ "matchSourceUrlPrefixes": ["https://github.com/dotnet/msbuild"]
+ }
+ ]
+}
diff --git a/.github/workflows/ci-ignore.yml b/.github/workflows/ci-ignore.yml
new file mode 100644
index 000000000..a5c03cbb6
--- /dev/null
+++ b/.github/workflows/ci-ignore.yml
@@ -0,0 +1,80 @@
+# ------------------------------------------------------------------------------
+#
+#
+# This code was generated.
+#
+# - To turn off auto-generation set:
+#
+# [GitHubActionsSteps (AutoGenerate = false)]
+#
+# - To trigger manual generation invoke:
+#
+# nuke --generate-configuration GitHubActions_ci-ignore --host GitHubActions
+#
+#
+# ------------------------------------------------------------------------------
+
+name: ci-ignore
+
+on:
+ push:
+ branches:
+ - 'master'
+ - 'main'
+ - 'next'
+ tags:
+ - 'v*'
+ paths:
+ - '.codecov.yml'
+ - '.editorconfig'
+ - '.gitattributes'
+ - '.gitignore'
+ - '.gitmodules'
+ - '.lintstagedrc.js'
+ - '.prettierignore'
+ - '.prettierrc'
+ - 'LICENSE'
+ - 'nukeeper.settings.json'
+ - 'omnisharp.json'
+ - 'package-lock.json'
+ - 'package.json'
+ - 'Readme.md'
+ - '.github/dependabot.yml'
+ - '.github/labels.yml'
+ - '.github/release.yml'
+ - '.github/renovate.json'
+ pull_request:
+ branches:
+ - 'master'
+ - 'main'
+ - 'next'
+ paths:
+ - '.codecov.yml'
+ - '.editorconfig'
+ - '.gitattributes'
+ - '.gitignore'
+ - '.gitmodules'
+ - '.lintstagedrc.js'
+ - '.prettierignore'
+ - '.prettierrc'
+ - 'LICENSE'
+ - 'nukeeper.settings.json'
+ - 'omnisharp.json'
+ - 'package-lock.json'
+ - 'package.json'
+ - 'Readme.md'
+ - '.github/dependabot.yml'
+ - '.github/labels.yml'
+ - '.github/release.yml'
+ - '.github/renovate.json'
+
+jobs:
+ Build:
+ strategy:
+ matrix:
+ os: [windows-latest, ubuntu-latest]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: N/A
+ run: |
+ echo "No build required"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 677ae4f85..f36ecefe5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,43 +19,91 @@ name: ci
on:
push:
branches:
- - master
- - next
+ - 'master'
+ - 'main'
+ - 'next'
tags:
- - v*
+ - 'v*'
+ paths-ignore:
+ - '.codecov.yml'
+ - '.editorconfig'
+ - '.gitattributes'
+ - '.gitignore'
+ - '.gitmodules'
+ - '.lintstagedrc.js'
+ - '.prettierignore'
+ - '.prettierrc'
+ - 'LICENSE'
+ - 'nukeeper.settings.json'
+ - 'omnisharp.json'
+ - 'package-lock.json'
+ - 'package.json'
+ - 'Readme.md'
+ - '.github/dependabot.yml'
+ - '.github/labels.yml'
+ - '.github/release.yml'
+ - '.github/renovate.json'
pull_request:
branches:
- - master
- - next
+ - 'master'
+ - 'main'
+ - 'next'
+ paths-ignore:
+ - '.codecov.yml'
+ - '.editorconfig'
+ - '.gitattributes'
+ - '.gitignore'
+ - '.gitmodules'
+ - '.lintstagedrc.js'
+ - '.prettierignore'
+ - '.prettierrc'
+ - 'LICENSE'
+ - 'nukeeper.settings.json'
+ - 'omnisharp.json'
+ - 'package-lock.json'
+ - 'package.json'
+ - 'Readme.md'
+ - '.github/dependabot.yml'
+ - '.github/labels.yml'
+ - '.github/release.yml'
+ - '.github/renovate.json'
jobs:
Build:
+ env:
+ NUGET_PACKAGES: '${{ github.workspace }}/.nuget/packages'
strategy:
fail-fast: false
matrix:
- os: [macOS-latest, windows-latest, ubuntu-latest]
+ os:
+ # - macOS-latest
+ - windows-latest
+ - ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v3.0.2
with:
clean: 'false'
fetch-depth: '0'
- name: Fetch all history for all tags and branches
run: |
git fetch --prune
- - name: 🔨 Use .NET Core 2.1 SDK
- uses: actions/setup-dotnet@v1.8.1
+ - name: NuGet Cache
+ uses: actions/cache@v3
with:
- dotnet-version: '2.1.x'
+ path: '${{ github.workspace }}/.nuget/packages'
+ key: "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/Directory.Packages.support.props') }}"
+ restore-keys: |
+ ${{ runner.os }}-nuget-
- name: 🔨 Use .NET Core 3.1 SDK
- uses: actions/setup-dotnet@v1.8.1
+ uses: actions/setup-dotnet@v2.1.0
with:
dotnet-version: '3.1.x'
- - name: 🔨 Use .NET Core 5.0 SDK
- uses: actions/setup-dotnet@v1.8.1
+ - name: 🔨 Use .NET Core 6.0 SDK
+ uses: actions/setup-dotnet@v2.1.0
with:
- dotnet-version: '5.0.x'
+ dotnet-version: '6.0.x'
- name: 🎁 dotnet tool restore
run: |
dotnet tool restore
@@ -67,39 +115,48 @@ jobs:
dotnet nuke Build --skip
- name: 🚦 Test
run: |
- dotnet nuke Test Trigger_Code_Coverage_Reports Generate_Code_Coverage_Report_Cobertura Generate_Code_Coverage_Badges Generate_Code_Coverage_Summary Generate_Code_Coverage_Report --skip
+ dotnet nuke Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip
- name: 📦 Pack
run: |
dotnet nuke Pack --skip
- name: 🐿 Publish Coverage
- uses: codecov/codecov-action@v1
+ uses: codecov/codecov-action@v3
with:
name: 'actions-${{ matrix.os }}'
- fail_ci_if_error: 'true'
- name: 🏺 Publish logs
if: always()
- continue-on-error: true
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: 'logs'
path: 'artifacts/logs/'
- name: 🏺 Publish coverage data
if: always()
- continue-on-error: true
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: 'coverage'
path: 'coverage/'
- name: 🏺 Publish test data
if: always()
- continue-on-error: true
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: 'test data'
path: 'artifacts/test/'
- name: 🏺 Publish NuGet Packages
if: always()
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: 'nuget'
path: 'artifacts/nuget/'
+ - name: 🏺 Publish Docs
+ if: always()
+ uses: actions/upload-artifact@v3
+ with:
+ name: 'docs'
+ path: 'artifacts/docs/'
+ Publish:
+ needs:
+ - Build
+ secrets:
+ RSG_NUGET_API_KEY: '${{ secrets.RSG_NUGET_API_KEY }}'
+ RSG_AZURE_DEVOPS: '${{ secrets.RSG_AZURE_DEVOPS }}'
+ uses: RocketSurgeonsGuild/actions/.github/workflows/publish-nuget.yml@v0.3.1
diff --git a/.github/workflows/close-milestone.yml b/.github/workflows/close-milestone.yml
index 5d59734f6..42e5d0c0a 100644
--- a/.github/workflows/close-milestone.yml
+++ b/.github/workflows/close-milestone.yml
@@ -1,30 +1,32 @@
name: Close Milestone
+
on:
release:
types:
- released
+
jobs:
close_milestone:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
- name: Install GitVersion
- uses: gittools/actions/gitversion/setup@v0.9.10
+ uses: gittools/actions/gitversion/setup@v0.9.13
with:
versionSpec: '5.x'
- name: Install GitReleaseManager
- uses: gittools/actions/gitreleasemanager/setup@v0.9.10
+ uses: gittools/actions/gitreleasemanager/setup@v0.9.13
with:
versionSpec: '0.11.x'
- name: Use GitVersion
id: gitversion
- uses: gittools/actions/gitversion/execute@v0.9.10
+ uses: gittools/actions/gitversion/execute@v0.9.13
# Ensure the milestone exists
- name: Create Milestone
@@ -37,7 +39,7 @@ jobs:
# move any issues to that milestone in the event the release is renamed
- name: sync milestones
- uses: RocketSurgeonsGuild/actions/sync-milestone@v0.2.4
+ uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.1
with:
default-label: 'mysterious'
github-token: ${{ secrets.OMNISHARP_BOT_TOKEN }}
diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml
index 28515c4a5..5da81288a 100644
--- a/.github/workflows/dependabot-merge.yml
+++ b/.github/workflows/dependabot-merge.yml
@@ -4,34 +4,80 @@ on:
pull_request_target:
types:
- labeled
+ - opened
+ - reopened
+ - closed
+ - synchronize
jobs:
comment:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
+ if: |
+ (github.event.action == 'labeled' || github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
+
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
+
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
+
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- - uses: actions/checkout@v2.3.4
+
+ - name: GitHub Automerge
+ if: |
+ contains(github.event.pull_request.labels.*.name, ':shipit: merge')
+ || contains(github.event.pull_request.labels.*.name, 'javascript')
+ || contains(github.event.pull_request.labels.*.name, 'github-actions')
+ uses: alexwilson/enable-github-automerge-action@1.0.0
+ continue-on-error: true
with:
- ref: master
- - name: Dependabot Commenter
+ github-token: '${{ secrets.OMNISHARP_BOT_TOKEN }}'
+ merge-method: 'SQUASH'
+
+ labeler:
+ runs-on: ubuntu-latest
+ if: |
+ (github.event.action == 'closed' || github.event.action == 'opened' || github.event.action == 'reopened')
+ steps:
+ - name: Dump GitHub context
+ env:
+ GITHUB_CONTEXT: ${{ toJson(github) }}
+ run: echo "$GITHUB_CONTEXT"
+
+ - name: Dump job context
+ env:
+ JOB_CONTEXT: ${{ toJson(job) }}
+ run: echo "$JOB_CONTEXT"
+
+ - name: Dump steps context
+ env:
+ STEPS_CONTEXT: ${{ toJson(steps) }}
+ run: echo "$STEPS_CONTEXT"
+
+ - name: Dump runner context
+ env:
+ RUNNER_CONTEXT: ${{ toJson(runner) }}
+ run: echo "$RUNNER_CONTEXT"
+
+ - name: GitHub Remove Labels
if: |
- (github.event.label.name == 'merge') && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'dependabot-preview[bot]')
- uses: peaceiris/actions-label-commenter@v1.10.0
+ github.event.action == 'closed'
+ uses: actions-ecosystem/action-remove-labels@v1
with:
- github_token: ${{ secrets.OMNISHARP_BOT_TOKEN }}
- config_file: .github/label-commenter-dependabot.yml
+ labels: |
+ :shipit: merge
+ github-actions
+ javascript
+ .NET
diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml
index 315e6f01b..21d01ef67 100644
--- a/.github/workflows/draft-release.yml
+++ b/.github/workflows/draft-release.yml
@@ -1,16 +1,20 @@
name: Create Milestone and Draft Release
+
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
+ schedule:
+ - cron: '0 0 * * 4'
+
jobs:
create_milestone_and_draft_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
@@ -18,18 +22,13 @@ jobs:
run: git fetch --prune
- name: Install GitVersion
- uses: gittools/actions/gitversion/setup@v0.9.10
+ uses: gittools/actions/gitversion/setup@v0.9.13
with:
versionSpec: '5.x'
- - name: Install GitReleaseManager
- uses: gittools/actions/gitreleasemanager/setup@v0.9.10
- with:
- versionSpec: '0.12.x'
-
- name: Use GitVersion
id: gitversion
- uses: gittools/actions/gitversion/execute@v0.9.10
+ uses: gittools/actions/gitversion/execute@v0.9.13
- name: Create Milestone
uses: WyriHaximus/github-action-create-milestone@v1
@@ -39,34 +38,19 @@ jobs:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
continue-on-error: true
- - name: Get Repo and Owner
- shell: pwsh
- id: repository
- run: |
- $parts = $ENV:GITHUB_REPOSITORY.Split('/')
- echo "::set-output name=owner::$($parts[0])"
- echo "::set-output name=repository::$($parts[1])"
-
- name: sync milestones
- uses: RocketSurgeonsGuild/actions/sync-milestone@v0.2.4
+ uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.1
with:
default-label: 'mysterious'
github-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Create Draft Release
- shell: pwsh
- run: |
- dotnet gitreleasemanager create `
- -o "${{ steps.repository.outputs.owner }}" `
- -r "${{ steps.repository.outputs.repository }}" `
- --token "${{ secrets.OMNISHARP_BOT_TOKEN }}" `
- -m "v${{ steps.gitversion.outputs.majorMinorPatch }}"
-
- - name: Export Changelog
- shell: pwsh
- run: |
- dotnet gitreleasemanager export `
- -o "${{ steps.repository.outputs.owner }}" `
- -r "${{ steps.repository.outputs.repository }}" `
- --token "${{ secrets.GITHUB_TOKEN }}" `
- -f CHANGELOG.md
+ - uses: ncipollo/release-action@v1
+ with:
+ allowUpdates: true
+ generateReleaseNotes: true
+ draft: true
+ omitNameDuringUpdate: true
+ name: 'v${{ steps.gitversion.outputs.majorMinorPatch }}'
+ tag: 'v${{ steps.gitversion.outputs.majorMinorPatch }}'
+ token: ${{ secrets.OMNISHARP_BOT_TOKEN }}
+ commit: ${{ github.base_ref }}
diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml
new file mode 100644
index 000000000..586ed7dd5
--- /dev/null
+++ b/.github/workflows/publish-nuget.yml
@@ -0,0 +1,38 @@
+name: Publish Nuget Packages
+
+on:
+ workflow_call:
+ # inputs:
+ secrets:
+ RSG_NUGET_API_KEY:
+ required: true
+ RSG_AZURE_DEVOPS:
+ required: false
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Dump GitHub context
+ env:
+ GITHUB_CONTEXT: ${{ toJson(github) }}
+ run: echo "$GITHUB_CONTEXT"
+
+ - uses: nuget/setup-nuget@v1
+ with:
+ nuget-version: '5.x'
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: nuget
+
+ - name: nuget.org
+ # continue-on-error: true
+ if: startsWith(github.ref, 'refs/tags/') # this is the best approximation for a tag
+ env:
+ ApiKey: ${{ secrets.RSG_NUGET_API_KEY }}
+ shell: pwsh
+ run: |
+ dotnet nuget push **/*.nupkg --skip-duplicate -s nuget.org --api-key $ENV:ApiKey
+ dotnet nuget push **/*.snupkg --skip-duplicate -s nuget.org --api-key $ENV:ApiKey
diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml
index c6ec4b475..f1710e13b 100644
--- a/.github/workflows/sync-labels.yml
+++ b/.github/workflows/sync-labels.yml
@@ -1,5 +1,7 @@
name: Sync Labels
+
on:
+ workflow_call:
push:
branches:
- master
@@ -14,14 +16,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v3.0.2
- name: Run Labeler
if: success()
uses: crazy-max/ghaction-github-labeler@v3.1.1
with:
- yaml_file: .github/labels.yml
- skip_delete: false
- dry_run: false
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ yaml-file: .github/labels.yml
+ skip-delete: false
+ dry-run: false
+ github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/update-milestone.yml b/.github/workflows/update-milestone.yml
index 120c6e1c8..118cc29c5 100644
--- a/.github/workflows/update-milestone.yml
+++ b/.github/workflows/update-milestone.yml
@@ -1,4 +1,5 @@
name: Update Milestone
+
on:
pull_request_target:
types:
@@ -12,10 +13,42 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v3.0.2
+ with:
+ ref: ${{ github.sha }}
+ fetch-depth: 0
+
+ - name: Fetch all history for all tags and branches
+ run: git fetch --prune
+
+ - name: Install GitVersion
+ if: ${{ github.event.action == 'opened' }}
+ uses: gittools/actions/gitversion/setup@v0.9.13
+ with:
+ versionSpec: '5.x'
+
+ - name: Install GitReleaseManager
+ if: ${{ github.event.action == 'opened' }}
+ uses: gittools/actions/gitreleasemanager/setup@v0.9.13
+ with:
+ versionSpec: '0.11.x'
+
+ - name: Use GitVersion
+ if: ${{ github.event.action == 'opened' }}
+ id: gitversion
+ uses: gittools/actions/gitversion/execute@v0.9.13
+
+ - name: Create Milestone
+ if: ${{ github.event.action == 'opened' }}
+ uses: WyriHaximus/github-action-create-milestone@v1
+ with:
+ title: v${{ steps.gitversion.outputs.majorMinorPatch }}
+ env:
+ GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
+ continue-on-error: true
- name: sync milestones
- uses: RocketSurgeonsGuild/actions/sync-milestone@v0.2.4
+ uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.1
with:
default-label: 'mysterious'
github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 97caab569..f2f6f24b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,4 @@ coverage.json
coverage.info
/codealike.json
.tmp/
+.nuke/temp/
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 000000000..3f6421029
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1,9 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+npx lint-staged -d -r
+dotnet nuke --generate-configuration GitHubActions_ci --host GitHubActions
+dotnet nuke --generate-configuration GitHubActions_ci-ignore --host GitHubActions
+git add .github/workflows/ci.yml
+git add .github/workflows/ci-ignore.yml
+git add .nuke/build.schema.json
diff --git a/.huskyrc b/.huskyrc
deleted file mode 100644
index 80f5453bb..000000000
--- a/.huskyrc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "hooks": {
- "pre-commit": "lint-staged"
- }
-}
\ No newline at end of file
diff --git a/.lintstagedrc b/.lintstagedrc
deleted file mode 100644
index 3dff2b2fb..000000000
--- a/.lintstagedrc
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "*.{cs,vb}": [
- "dotnet nuke lint --no-logo --lint-files"
- ],
- "*.{js,ts,jsx,tsx,json,yml,yaml}": [
- "prettier --write"
- ]
-}
diff --git a/.lintstagedrc.js b/.lintstagedrc.js
new file mode 100644
index 000000000..0e6af2f49
--- /dev/null
+++ b/.lintstagedrc.js
@@ -0,0 +1,26 @@
+function forEachChunk(chunks, callback, chunkSize = 50) {
+ var mappedFiles = [];
+ var files = chunks.concat();
+ while (files.length > 0) {
+ var chunk = files.splice(0, chunkSize);
+ mappedFiles = mappedFiles.concat(callback(chunk));
+ }
+ return mappedFiles;
+}
+
+function cleanupcode(filenames) {
+ var sln = require('./.nuke/parameters.json').Solution;
+ return forEachChunk(filenames, chunk => [
+ `dotnet jb cleanupcode ${sln} "--profile=Full Cleanup" "--disable-settings-layers=GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal" "--include=${chunk.join(
+ ';'
+ )}"`,
+ ]);
+}
+
+module.exports = {
+ '*.cs': filenames => {
+ return [`echo "'${filenames.join(`' '`)}'" | dotnet format --include -`]; //.concat(cleanupcode(filenames));
+ },
+ '*.{csproj,targets,props,xml}': filenames => forEachChunk(filenames, chunk => [`prettier --write '${chunk.join(`' '`)}'`]),
+ '*.{js,ts,jsx,tsx,json,yml,yaml}': filenames => forEachChunk(filenames, chunk => [`prettier --write '${chunk.join(`' '`)}'`]),
+};
diff --git a/.mergify.yml b/.mergify.yml
deleted file mode 100644
index f8cd7f329..000000000
--- a/.mergify.yml
+++ /dev/null
@@ -1,101 +0,0 @@
-pull_request_rules:
- - name: automatic merge when GitHub branch protection passes (others)
- conditions:
- - base=master
- - -author~=^dependabot(|-preview)\[bot\]$
- - 'label=merge'
- actions:
- merge:
- method: squash
- strict: smart+fasttrack
- - name: automatic merge when GitHub branch protection passes
- conditions:
- - merged
- - 'label=merge'
- actions:
- label:
- remove:
- - 'merge'
- - name: delete head branch after merge
- conditions:
- - merged
- actions:
- label:
- remove:
- - 'merge'
- - 'github-actions'
- - 'javascript'
- - '.NET'
- delete_head_branch: {}
- - name: automatic merge for JetBrains.ReSharper.CommandLineTools pull requests
- conditions:
- - title~=^Bump JetBrains\.ReSharper\.CommandLineTools.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for ReportGenerator pull requests
- conditions:
- - title~=^Bump ReportGenerator.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for GitVersion.Tool pull requests
- conditions:
- - title~=^Bump GitVersion\.Tool.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for Bogus pull requests
- conditions:
- - title~=^Bump Bogus.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for coverlet pull requests
- conditions:
- - title~=^Bump coverlet.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for FakeItEasy pull requests
- conditions:
- - title~=^Bump FakeItEasy.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for FluentAssertions pull requests
- conditions:
- - title~=^Bump FluentAssertions.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for xunit pull requests
- conditions:
- - title~=^Bump xunit.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
- - name: automatic merge for Microsoft.NET.Test.Sdk pull requests
- conditions:
- - title~=^Bump Microsoft\.NET\.Test\.Sdk.*$
- - author~=^dependabot(|-preview)\[bot\]$
- actions:
- label:
- add:
- - 'merge'
diff --git a/.nuke b/.nuke
deleted file mode 100644
index d1bf89faf..000000000
--- a/.nuke
+++ /dev/null
@@ -1,2 +0,0 @@
-LSP.sln
-
diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
new file mode 100644
index 000000000..f99d257e6
--- /dev/null
+++ b/.nuke/build.schema.json
@@ -0,0 +1,157 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Build Schema",
+ "$ref": "#/definitions/build",
+ "definitions": {
+ "build": {
+ "type": "object",
+ "properties": {
+ "Artifacts": {
+ "type": "string",
+ "description": "The directory where artifacts are to be dropped"
+ },
+ "Configuration": {
+ "type": "string",
+ "description": "Configuration to build",
+ "enum": [
+ "Debug",
+ "Release"
+ ]
+ },
+ "Continue": {
+ "type": "boolean",
+ "description": "Indicates to continue a previously failed build attempt"
+ },
+ "Coverage": {
+ "type": "string",
+ "description": "The directory where coverage artifacts are to be dropped"
+ },
+ "Help": {
+ "type": "boolean",
+ "description": "Shows the help text for this build assembly"
+ },
+ "Host": {
+ "type": "string",
+ "description": "Host for execution. Default is 'automatic'",
+ "enum": [
+ "AppVeyor",
+ "AzurePipelines",
+ "Bamboo",
+ "Bitrise",
+ "GitHubActions",
+ "GitLab",
+ "Jenkins",
+ "Rider",
+ "SpaceAutomation",
+ "TeamCity",
+ "Terminal",
+ "TravisCI",
+ "VisualStudio",
+ "VSCode"
+ ]
+ },
+ "NoLogo": {
+ "type": "boolean",
+ "description": "Disables displaying the NUKE logo"
+ },
+ "Partition": {
+ "type": "string",
+ "description": "Partition to use on CI"
+ },
+ "Plan": {
+ "type": "boolean",
+ "description": "Shows the execution plan (HTML)"
+ },
+ "Profile": {
+ "type": "array",
+ "description": "Defines the profiles to load",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Root": {
+ "type": "string",
+ "description": "Root directory during build execution"
+ },
+ "Skip": {
+ "type": "array",
+ "description": "List of targets to be skipped. Empty list skips all dependencies",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Build",
+ "BuildVersion",
+ "Clean",
+ "CoreBuild",
+ "CorePack",
+ "CoreRestore",
+ "CoreTest",
+ "Default",
+ "DotnetToolRestore",
+ "Generate_Code_Coverage_Badges",
+ "Generate_Code_Coverage_Report",
+ "Generate_Code_Coverage_Report_Cobertura",
+ "Generate_Code_Coverage_Summary",
+ "GenerateCodeCoverageBadges",
+ "GenerateCodeCoverageReport",
+ "GenerateCodeCoverageReportCobertura",
+ "GenerateCodeCoverageSummary",
+ "GenerateReadme",
+ "Pack",
+ "Restore",
+ "Test",
+ "Trigger_Code_Coverage_Reports",
+ "TriggerCodeCoverageReports"
+ ]
+ }
+ },
+ "Solution": {
+ "type": "string",
+ "description": "Path to a solution file that is automatically loaded"
+ },
+ "Target": {
+ "type": "array",
+ "description": "List of targets to be invoked. Default is '{default_target}'",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Build",
+ "BuildVersion",
+ "Clean",
+ "CoreBuild",
+ "CorePack",
+ "CoreRestore",
+ "CoreTest",
+ "Default",
+ "DotnetToolRestore",
+ "Generate_Code_Coverage_Badges",
+ "Generate_Code_Coverage_Report",
+ "Generate_Code_Coverage_Report_Cobertura",
+ "Generate_Code_Coverage_Summary",
+ "GenerateCodeCoverageBadges",
+ "GenerateCodeCoverageReport",
+ "GenerateCodeCoverageReportCobertura",
+ "GenerateCodeCoverageSummary",
+ "GenerateReadme",
+ "Pack",
+ "Restore",
+ "Test",
+ "Trigger_Code_Coverage_Reports",
+ "TriggerCodeCoverageReports"
+ ]
+ }
+ },
+ "Verbosity": {
+ "type": "string",
+ "description": "Logging verbosity during build execution. Default is 'Normal'",
+ "enum": [
+ "Minimal",
+ "Normal",
+ "Quiet",
+ "Verbose"
+ ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/.nuke/parameters.json b/.nuke/parameters.json
new file mode 100644
index 000000000..2d4a451b6
--- /dev/null
+++ b/.nuke/parameters.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "./build.schema.json",
+ "Solution": "LSP.sln"
+}
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
index 2faf38352..33227515d 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,2 +1,4 @@
azure-pipelines.nuke.yml
.github/workflows/ci.yml
+.github/workflows/ci-ignore.yml
+.nuke/build.schema.json
diff --git a/Directory.Build.props b/Directory.Build.props
index 2b19c9ec0..c824ab2bf 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,21 +14,34 @@
lsp;language server;language server protocol;language client;language server client
$(MSBuildThisFileDirectory)\lsp.snk
+ AllEnabledByDefault
+ preview
+ true
true
+ 1
+ true
+ enable
true
true
snupkg
true
- $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
$(AllowedReferenceRelatedFileExtensions);.pdb
true
-
+
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 90a5f37bb..4cc7c05d3 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,53 +1,12 @@
-
-
-
- $(BaseIntermediateOutputPath)\GeneratedFiles
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ $(BaseIntermediateOutputPath)\GeneratedFiles
+
+
+
+
+
+
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 000000000..6916daa35
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,63 @@
+
+
+
+ $(BaseIntermediateOutputPath)\GeneratedFiles
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Directory.Packages.supports.props b/Directory.Packages.supports.props
new file mode 100644
index 000000000..665086a69
--- /dev/null
+++ b/Directory.Packages.supports.props
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LSP.sln b/LSP.sln
index 7ca6d6531..68d6c34bf 100644
--- a/LSP.sln
+++ b/LSP.sln
@@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2F323ED5-E
ProjectSection(SolutionItems) = preProject
test\Directory.Build.props = test\Directory.Build.props
test\Directory.Build.targets = test\Directory.Build.targets
+ test\.editorconfig = test\.editorconfig
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{AE4D7807-6F78-428C-A0D9-914BA583A104}"
@@ -25,6 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{AE4D
Directory.Build.props = Directory.Build.props
nuget.config = nuget.config
Directory.Build.targets = Directory.Build.targets
+ Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonRpc", "src\JsonRpc\JsonRpc.csproj", "{9AF43FA2-EF35-435E-B59E-724877E44DDA}"
diff --git a/azure-pipelines.nuke.yml b/azure-pipelines.nuke.yml
index 633418b1c..308824ac0 100644
--- a/azure-pipelines.nuke.yml
+++ b/azure-pipelines.nuke.yml
@@ -23,7 +23,7 @@ parameters:
steps:
- pwsh: dotnet nuke Build --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}'
displayName: '⚙ Build'
- - pwsh: dotnet nuke Test Trigger_Code_Coverage_Reports Generate_Code_Coverage_Report_Cobertura Generate_Code_Coverage_Badges Generate_Code_Coverage_Summary Generate_Code_Coverage_Report --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}'
+ - pwsh: dotnet nuke Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}'
displayName: '🚦 Test'
- pwsh: dotnet nuke Pack --skip --artifacts '${{ parameters.Artifacts }}' --coverage '${{ parameters.Coverage }}' --configuration '${{ parameters.Configuration }}' --verbosity '${{ parameters.Verbosity }}'
displayName: '📦 Pack'
diff --git a/benchmarks/Pipeline/Pipeline.csproj b/benchmarks/Pipeline/Pipeline.csproj
index 15cca63e3..c20468ddb 100644
--- a/benchmarks/Pipeline/Pipeline.csproj
+++ b/benchmarks/Pipeline/Pipeline.csproj
@@ -1,15 +1,14 @@
- net472;netcoreapp3.1
+ net472;netcoreapp3.1;net6.0
Exe
false
-
-
+
diff --git a/build.cmd b/build.cmd
new file mode 100755
index 000000000..b08cc590f
--- /dev/null
+++ b/build.cmd
@@ -0,0 +1,7 @@
+:; set -eo pipefail
+:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
+:; ${SCRIPT_DIR}/build.sh "$@"
+:; exit $?
+
+@ECHO OFF
+powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
diff --git a/build.ps1 b/build.ps1
index 91f068d7d..9f908eb3d 100644
--- a/build.ps1
+++ b/build.ps1
@@ -4,9 +4,9 @@ Param(
[string[]]$BuildArguments
)
-Write-Output "Windows PowerShell $($Host.Version)"
+Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
-Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 }
+Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
###########################################################################
@@ -14,14 +14,15 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
###########################################################################
$BuildProjectFile = "$PSScriptRoot\.build\.build.csproj"
-$TempDirectory = "$PSScriptRoot\\.tmp"
+$TempDirectory = "$PSScriptRoot\\.nuke\temp"
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
-$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
+$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "Current"
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
+$env:DOTNET_MULTILEVEL_LOOKUP = 0
###########################################################################
# EXECUTION
@@ -32,37 +33,37 @@ function ExecSafe([scriptblock] $cmd) {
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}
-# If global.json exists, load expected version
-if (Test-Path $DotNetGlobalFile) {
- $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
- if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
- $DotNetVersion = $DotNetGlobal.sdk.version
- }
-}
-
-# If dotnet is installed locally, and expected version is not set or installation matches the expected version
-if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -ne $null -and `
- (!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) {
+# If dotnet CLI is installed globally and it matches requested version, use for execution
+if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
+ $(dotnet --version) -and $LASTEXITCODE -eq 0) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {
- $DotNetDirectory = "$TempDirectory\dotnet-win"
- $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
-
# Download install script
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
- md -force $TempDirectory > $null
+ New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)
+ # If global.json exists, load expected version
+ if (Test-Path $DotNetGlobalFile) {
+ $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
+ if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
+ $DotNetVersion = $DotNetGlobal.sdk.version
+ }
+ }
+
# Install by channel or version
+ $DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
- ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
+ ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
- ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
+ ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
+ $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
}
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
-ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false }
+ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
diff --git a/build.sh b/build.sh
index 25b34f4c2..75f7d9930 100755
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-echo $(bash --version 2>&1 | head -n 1)
+bash --version 2>&1 | head -n 1
set -eo pipefail
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
@@ -10,53 +10,53 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
###########################################################################
BUILD_PROJECT_FILE="$SCRIPT_DIR/.build/.build.csproj"
-TEMP_DIRECTORY="$SCRIPT_DIR//.tmp"
+TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
-DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh"
+DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
DOTNET_CHANNEL="Current"
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+export DOTNET_MULTILEVEL_LOOKUP=0
###########################################################################
# EXECUTION
###########################################################################
function FirstJsonValue {
- perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2}
+ perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
}
-# If global.json exists, load expected version
-if [ -f "$DOTNET_GLOBAL_FILE" ]; then
- DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE"))
- if [ "$DOTNET_VERSION" == "" ]; then
- unset DOTNET_VERSION
- fi
-fi
-
-# If dotnet is installed locally, and expected version is not set or installation matches the expected version
-if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") ]]; then
+# If dotnet CLI is installed globally and it matches requested version, use for execution
+if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
export DOTNET_EXE="$(command -v dotnet)"
else
- DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
- export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
-
# Download install script
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
mkdir -p "$TEMP_DIRECTORY"
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL"
chmod +x "$DOTNET_INSTALL_FILE"
+ # If global.json exists, load expected version
+ if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
+ DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")")
+ if [[ "$DOTNET_VERSION" == "" ]]; then
+ unset DOTNET_VERSION
+ fi
+ fi
+
# Install by channel or version
- if [ -z ${DOTNET_VERSION+x} ]; then
+ DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
+ if [[ -z ${DOTNET_VERSION+x} ]]; then
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
fi
+ export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
fi
echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
-"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false
+"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
diff --git a/docs/lsp.md b/docs/lsp.md
index 305ad1f2b..49267c860 100644
--- a/docs/lsp.md
+++ b/docs/lsp.md
@@ -5,7 +5,7 @@ The goal of this library is to implement [Language Server Protocol](https://micr
Included in this library is a full-fidelity `LanguageServer` but also full `LanguageClient` implementation that could be implemented in an editor, but mainly it is used to help make Unit Testing easier, more consistent (and maybe even fun!).
# Concepts
-The language server is built oin a few concepts. At it's core is the [MediatR](https://github.com/jbogard/MediatR) library that you will build language specific handlers around. Around that core is a bunch of knowledge of the LSP protocol
+The language server is built on a few concepts. At it's core is the [MediatR](https://github.com/jbogard/MediatR) library that you will build language specific handlers around. Around that core is a bunch of knowledge of the LSP protocol
with the goal of making it more ".NET" like and less protocol centric.
LSP revolves around features ( eg Completion, Hover, etc ) that define the inputs (request object) the outputs (response object) as well as Client Capabilities and Server Registration Options.
diff --git a/global.json b/global.json
new file mode 100644
index 000000000..4fda00640
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "6.0.200",
+ "rollForward": "latestMinor"
+ }
+}
diff --git a/package-lock.json b/package-lock.json
index c5e6bd47e..e560ad123 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2,90 +2,25 @@
"requires": true,
"lockfileVersion": 1,
"dependencies": {
- "@babel/code-frame": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
- "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+ "@prettier/plugin-xml": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@prettier/plugin-xml/-/plugin-xml-1.2.0.tgz",
+ "integrity": "sha512-bFvVAZKs59XNmntYjyefn3K4TBykS6E+d6ZW8IcylAs88ZO+TzLhp0dPpi0VKfPzq1Nb+kpDnPRTiwb4zY6NgA==",
"dev": true,
"requires": {
- "@babel/highlight": "^7.14.5"
+ "@xml-tools/parser": "^1.0.11",
+ "prettier": ">=2.3"
}
},
- "@babel/helper-validator-identifier": {
- "version": "7.14.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz",
- "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==",
- "dev": true
- },
- "@babel/highlight": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
- "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+ "@xml-tools/parser": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@xml-tools/parser/-/parser-1.0.11.tgz",
+ "integrity": "sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA==",
"dev": true,
"requires": {
- "@babel/helper-validator-identifier": "^7.14.5",
- "chalk": "^2.0.0",
- "js-tokens": "^4.0.0"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "dev": true,
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "dev": true,
- "requires": {
- "color-name": "1.1.3"
- }
- },
- "color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "dev": true
- },
- "has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
+ "chevrotain": "7.1.1"
}
},
- "@types/parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
- "dev": true
- },
"aggregate-error": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
@@ -96,12 +31,6 @@
"indent-string": "^4.0.0"
}
},
- "ansi-colors": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
- "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
- "dev": true
- },
"ansi-escapes": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
@@ -112,19 +41,16 @@
}
},
"ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
"dev": true
},
"ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
- "requires": {
- "color-convert": "^2.0.1"
- }
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz",
+ "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==",
+ "dev": true
},
"astral-regex": {
"version": "2.0.0",
@@ -141,20 +67,13 @@
"fill-range": "^7.0.1"
}
},
- "callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "dev": true
- },
- "chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "chevrotain": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-7.1.1.tgz",
+ "integrity": "sha512-wy3mC1x4ye+O+QkEinVJkPf5u2vsrDIYW9G7ZuwFl6v/Yu0LwUuT2POsb+NUWApebyxfkQq6+yDfRExbnI5rcw==",
"dev": true,
"requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
+ "regexp-to-ast": "0.5.0"
}
},
"clean-stack": {
@@ -173,13 +92,13 @@
}
},
"cli-truncate": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
- "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
+ "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
"dev": true,
"requires": {
- "slice-ansi": "^3.0.0",
- "string-width": "^4.2.0"
+ "slice-ansi": "^5.0.0",
+ "string-width": "^5.0.0"
}
},
"color-convert": {
@@ -198,30 +117,17 @@
"dev": true
},
"colorette": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
- "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
+ "version": "2.0.16",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
+ "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==",
"dev": true
},
"commander": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
- "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
"dev": true
},
- "cosmiconfig": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz",
- "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==",
- "dev": true,
- "requires": {
- "@types/parse-json": "^4.0.0",
- "import-fresh": "^3.2.1",
- "parse-json": "^5.0.0",
- "path-type": "^4.0.0",
- "yaml": "^1.10.0"
- }
- },
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -234,42 +140,24 @@
}
},
"debug": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
- "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
+ "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dev": true,
"requires": {
"ms": "2.1.2"
}
},
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"dev": true
},
- "enquirer": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
- "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
- "dev": true,
- "requires": {
- "ansi-colors": "^4.1.1"
- }
- },
- "error-ex": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
- "dev": true,
- "requires": {
- "is-arrayish": "^0.2.1"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
"dev": true
},
"execa": {
@@ -298,24 +186,12 @@
"to-regex-range": "^5.0.1"
}
},
- "get-own-enumerable-property-symbols": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
- "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
- "dev": true
- },
"get-stream": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
"dev": true
},
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
@@ -323,37 +199,21 @@
"dev": true
},
"husky": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.2.tgz",
- "integrity": "sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==",
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz",
+ "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==",
"dev": true
},
- "import-fresh": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
- "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
- "dev": true,
- "requires": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- }
- },
"indent-string": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"dev": true
},
- "is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
- "dev": true
- },
"is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
"dev": true
},
"is-number": {
@@ -362,99 +222,129 @@
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
- "is-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
- "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
- "dev": true
- },
- "is-regexp": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
- "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
- "dev": true
- },
"is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
"integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
"dev": true
},
- "is-unicode-supported": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
- "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
- "dev": true
- },
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
- "js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true
- },
- "json-parse-even-better-errors": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
- "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
- "dev": true
- },
- "lines-and-columns": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
- "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
+ "lilconfig": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz",
+ "integrity": "sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==",
"dev": true
},
"lint-staged": {
- "version": "11.1.2",
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-11.1.2.tgz",
- "integrity": "sha512-6lYpNoA9wGqkL6Hew/4n1H6lRqF3qCsujVT0Oq5Z4hiSAM7S6NksPJ3gnr7A7R52xCtiZMcEUNNQ6d6X5Bvh9w==",
- "dev": true,
- "requires": {
- "chalk": "^4.1.1",
- "cli-truncate": "^2.1.0",
- "commander": "^7.2.0",
- "cosmiconfig": "^7.0.0",
- "debug": "^4.3.1",
- "enquirer": "^2.3.6",
- "execa": "^5.0.0",
- "listr2": "^3.8.2",
- "log-symbols": "^4.1.0",
+ "version": "12.3.4",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.4.tgz",
+ "integrity": "sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w==",
+ "dev": true,
+ "requires": {
+ "cli-truncate": "^3.1.0",
+ "colorette": "^2.0.16",
+ "commander": "^8.3.0",
+ "debug": "^4.3.3",
+ "execa": "^5.1.1",
+ "lilconfig": "2.0.4",
+ "listr2": "^4.0.1",
"micromatch": "^4.0.4",
"normalize-path": "^3.0.0",
- "please-upgrade-node": "^3.2.0",
- "string-argv": "0.3.1",
- "stringify-object": "^3.3.0"
+ "object-inspect": "^1.12.0",
+ "string-argv": "^0.3.1",
+ "supports-color": "^9.2.1",
+ "yaml": "^1.10.2"
}
},
"listr2": {
- "version": "3.11.0",
- "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.11.0.tgz",
- "integrity": "sha512-XLJVe2JgXCyQTa3FbSv11lkKExYmEyA4jltVo8z4FX10Vt1Yj8IMekBfwim0BSOM9uj1QMTJvDQQpHyuPbB/dQ==",
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.4.tgz",
+ "integrity": "sha512-vJOm5KD6uZXjSsrwajr+mNacIjf87gWvlBEltPWLbTkslUscWAzquyK4xfe9Zd4RDgO5nnwFyV06FC+uVR+5mg==",
"dev": true,
"requires": {
"cli-truncate": "^2.1.0",
- "colorette": "^1.2.2",
+ "colorette": "^2.0.16",
"log-update": "^4.0.0",
"p-map": "^4.0.0",
- "rxjs": "^6.6.7",
+ "rfdc": "^1.3.0",
+ "rxjs": "^7.5.4",
"through": "^2.3.8",
"wrap-ansi": "^7.0.0"
- }
- },
- "log-symbols": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
- "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
- "dev": true,
- "requires": {
- "chalk": "^4.1.0",
- "is-unicode-supported": "^0.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "cli-truncate": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz",
+ "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==",
+ "dev": true,
+ "requires": {
+ "slice-ansi": "^3.0.0",
+ "string-width": "^4.2.0"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
+ "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
+ }
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
}
},
"log-update": {
@@ -469,6 +359,33 @@
"wrap-ansi": "^6.2.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
"slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
@@ -480,6 +397,26 @@
"is-fullwidth-code-point": "^3.0.0"
}
},
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
@@ -536,6 +473,12 @@
"path-key": "^3.0.0"
}
},
+ "object-inspect": {
+ "version": "1.12.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
+ "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==",
+ "dev": true
+ },
"onetime": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
@@ -554,64 +497,28 @@
"aggregate-error": "^3.0.0"
}
},
- "parent-module": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
- "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dev": true,
- "requires": {
- "callsites": "^3.0.0"
- }
- },
- "parse-json": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
- "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
- "dev": true,
- "requires": {
- "@babel/code-frame": "^7.0.0",
- "error-ex": "^1.3.1",
- "json-parse-even-better-errors": "^2.3.0",
- "lines-and-columns": "^1.1.6"
- }
- },
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
- "path-type": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
- "dev": true
- },
"picomatch": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
- "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
},
- "please-upgrade-node": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
- "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
- "dev": true,
- "requires": {
- "semver-compare": "^1.0.0"
- }
- },
"prettier": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz",
- "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==",
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz",
+ "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==",
"dev": true
},
- "resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "regexp-to-ast": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz",
+ "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==",
"dev": true
},
"restore-cursor": {
@@ -624,21 +531,21 @@
"signal-exit": "^3.0.2"
}
},
+ "rfdc": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",
+ "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==",
+ "dev": true
+ },
"rxjs": {
- "version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.4.tgz",
+ "integrity": "sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==",
"dev": true,
"requires": {
- "tslib": "^1.9.0"
+ "tslib": "^2.1.0"
}
},
- "semver-compare": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
- "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
- "dev": true
- },
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -655,20 +562,19 @@
"dev": true
},
"signal-exit": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
- "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"dev": true
},
"slice-ansi": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz",
- "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
"dev": true,
"requires": {
- "ansi-styles": "^4.0.0",
- "astral-regex": "^2.0.0",
- "is-fullwidth-code-point": "^3.0.0"
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
}
},
"string-argv": {
@@ -678,34 +584,23 @@
"dev": true
},
"string-width": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
- "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.0.tgz",
+ "integrity": "sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ==",
"dev": true,
"requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "stringify-object": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
- "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
- "dev": true,
- "requires": {
- "get-own-enumerable-property-symbols": "^3.0.0",
- "is-obj": "^1.0.1",
- "is-regexp": "^1.0.0"
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
}
},
"strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
+ "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
"dev": true,
"requires": {
- "ansi-regex": "^5.0.0"
+ "ansi-regex": "^6.0.1"
}
},
"strip-final-newline": {
@@ -715,13 +610,10 @@
"dev": true
},
"supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
+ "version": "9.2.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.1.tgz",
+ "integrity": "sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ==",
+ "dev": true
},
"through": {
"version": "2.3.8",
@@ -739,9 +631,9 @@
}
},
"tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
+ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
"dev": true
},
"type-fest": {
@@ -768,6 +660,55 @@
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
}
},
"yaml": {
diff --git a/package.json b/package.json
index 37ba0bf64..f731e5687 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,12 @@
{
"private": true,
"devDependencies": {
- "husky": "^7.0.2",
- "lint-staged": "^11.1.2",
- "prettier": "^2.3.2"
+ "@prettier/plugin-xml": "1.2.0",
+ "husky": "7.0.4",
+ "lint-staged": "12.3.4",
+ "prettier": "2.5.1"
+ },
+ "scripts": {
+ "prepare": "husky install"
}
}
diff --git a/sample/SampleServer/Program.cs b/sample/SampleServer/Program.cs
index d86b96a49..999932d2a 100644
--- a/sample/SampleServer/Program.cs
+++ b/sample/SampleServer/Program.cs
@@ -8,11 +8,16 @@
using OmniSharp.Extensions.LanguageServer.Server;
using Serilog;
+// ReSharper disable UnusedParameter.Local
+
namespace SampleServer
{
internal class Program
{
- private static void Main(string[] args) => MainAsync(args).Wait();
+ private static void Main(string[] args)
+ {
+ MainAsync(args).Wait();
+ }
private static async Task MainAsync(string[] args)
{
@@ -51,9 +56,11 @@ private static async Task MainAsync(string[] args)
.WithHandler()
.WithServices(x => x.AddLogging(b => b.SetMinimumLevel(LogLevel.Trace)))
.WithServices(
- services => {
+ services =>
+ {
services.AddSingleton(
- provider => {
+ provider =>
+ {
var loggerFactory = provider.GetService();
var logger = loggerFactory.CreateLogger();
@@ -63,20 +70,24 @@ private static async Task MainAsync(string[] args)
}
);
services.AddSingleton(
- new ConfigurationItem {
+ new ConfigurationItem
+ {
Section = "typescript",
}
).AddSingleton(
- new ConfigurationItem {
+ new ConfigurationItem
+ {
Section = "terminal",
}
);
}
)
.OnInitialize(
- async (server, request, token) => {
+ async (server, request, token) =>
+ {
var manager = server.WorkDoneManager.For(
- request, new WorkDoneProgressBegin {
+ request, new WorkDoneProgressBegin
+ {
Title = "Server is starting...",
Percentage = 10,
}
@@ -86,7 +97,8 @@ private static async Task MainAsync(string[] args)
await Task.Delay(2000).ConfigureAwait(false);
manager.OnNext(
- new WorkDoneProgressReport {
+ new WorkDoneProgressReport
+ {
Percentage = 20,
Message = "loading in progress"
}
@@ -94,9 +106,11 @@ private static async Task MainAsync(string[] args)
}
)
.OnInitialized(
- async (server, request, response, token) => {
+ async (server, request, response, token) =>
+ {
workDone.OnNext(
- new WorkDoneProgressReport {
+ new WorkDoneProgressReport
+ {
Percentage = 40,
Message = "loading almost done",
}
@@ -105,7 +119,8 @@ private static async Task MainAsync(string[] args)
await Task.Delay(2000).ConfigureAwait(false);
workDone.OnNext(
- new WorkDoneProgressReport {
+ new WorkDoneProgressReport
+ {
Message = "loading done",
Percentage = 100,
}
@@ -114,8 +129,10 @@ private static async Task MainAsync(string[] args)
}
)
.OnStarted(
- async (languageServer, token) => {
- using var manager = await languageServer.WorkDoneManager.Create(new WorkDoneProgressBegin { Title = "Doing some work..." }).ConfigureAwait(false);
+ async (languageServer, token) =>
+ {
+ using var manager = await languageServer.WorkDoneManager.Create(new WorkDoneProgressBegin { Title = "Doing some work..." })
+ .ConfigureAwait(false);
manager.OnNext(new WorkDoneProgressReport { Message = "doing things..." });
await Task.Delay(10000).ConfigureAwait(false);
@@ -125,9 +142,11 @@ private static async Task MainAsync(string[] args)
var logger = languageServer.Services.GetService>();
var configuration = await languageServer.Configuration.GetConfiguration(
- new ConfigurationItem {
+ new ConfigurationItem
+ {
Section = "typescript",
- }, new ConfigurationItem {
+ }, new ConfigurationItem
+ {
Section = "terminal",
}
).ConfigureAwait(false);
@@ -138,7 +157,7 @@ private static async Task MainAsync(string[] args)
baseConfig.Add(config.Key, config.Value);
}
- logger.LogInformation("Base Config: {Config}", baseConfig);
+ logger.LogInformation("Base Config: {@Config}", baseConfig);
var scopedConfig = new JObject();
foreach (var config in configuration.AsEnumerable())
@@ -146,7 +165,7 @@ private static async Task MainAsync(string[] args)
scopedConfig.Add(config.Key, config.Value);
}
- logger.LogInformation("Scoped Config: {Config}", scopedConfig);
+ logger.LogInformation("Scoped Config: {@Config}", scopedConfig);
}
)
).ConfigureAwait(false);
@@ -165,6 +184,9 @@ public Foo(ILogger logger)
_logger = logger;
}
- public void SayFoo() => _logger.LogInformation("Fooooo!");
+ public void SayFoo()
+ {
+ _logger.LogInformation("Fooooo!");
+ }
}
}
diff --git a/sample/SampleServer/SampleServer.csproj b/sample/SampleServer/SampleServer.csproj
index ce86be19e..c53281cd5 100644
--- a/sample/SampleServer/SampleServer.csproj
+++ b/sample/SampleServer/SampleServer.csproj
@@ -10,18 +10,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sample/SampleServer/SemanticTokensHandler.cs b/sample/SampleServer/SemanticTokensHandler.cs
index 6f1a5db36..a95635c3d 100644
--- a/sample/SampleServer/SemanticTokensHandler.cs
+++ b/sample/SampleServer/SemanticTokensHandler.cs
@@ -9,7 +9,6 @@
using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities;
using OmniSharp.Extensions.LanguageServer.Protocol.Document;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
-using OmniSharp.Extensions.LanguageServer.Protocol.Models;
namespace SampleServer
{
@@ -18,8 +17,10 @@ public class SemanticTokensHandler : SemanticTokensHandlerBase
{
private readonly ILogger _logger;
- public SemanticTokensHandler(ILogger logger) =>
+ public SemanticTokensHandler(ILogger logger)
+ {
_logger = logger;
+ }
public override async Task Handle(
SemanticTokensParams request, CancellationToken cancellationToken
@@ -57,7 +58,7 @@ CancellationToken cancellationToken
var content = await File.ReadAllTextAsync(DocumentUri.GetFileSystemPath(identifier), cancellationToken).ConfigureAwait(false);
await Task.Yield();
- foreach (var (line, text) in content.Split('\n').Select((text, line) => (line, text)))
+ foreach (var (line, text) in content.Split('\n').Select((text, line) => ( line, text )))
{
var parts = text.TrimEnd().Split(';', ' ', '.', '"', '(', ')');
var index = 0;
@@ -73,8 +74,10 @@ CancellationToken cancellationToken
}
protected override Task
- GetSemanticTokensDocument(ITextDocumentIdentifierParams @params, CancellationToken cancellationToken) =>
- Task.FromResult(new SemanticTokensDocument(RegistrationOptions.Legend));
+ GetSemanticTokensDocument(ITextDocumentIdentifierParams @params, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(new SemanticTokensDocument(RegistrationOptions.Legend));
+ }
private IEnumerable RotateEnum(IEnumerable values)
@@ -86,17 +89,25 @@ private IEnumerable RotateEnum(IEnumerable values)
}
}
- protected override SemanticTokensRegistrationOptions CreateRegistrationOptions(SemanticTokensCapability capability, ClientCapabilities clientCapabilities) => new SemanticTokensRegistrationOptions {
- DocumentSelector = DocumentSelector.ForLanguage("csharp"),
- Legend = new SemanticTokensLegend() {
- TokenModifiers = capability.TokenModifiers,
- TokenTypes = capability.TokenTypes
- },
- Full = new SemanticTokensCapabilityRequestFull {
- Delta = true
- },
- Range = true
- };
+ protected override SemanticTokensRegistrationOptions CreateRegistrationOptions(
+ SemanticTokensCapability capability, ClientCapabilities clientCapabilities
+ )
+ {
+ return new SemanticTokensRegistrationOptions
+ {
+ DocumentSelector = DocumentSelector.ForLanguage("csharp"),
+ Legend = new SemanticTokensLegend
+ {
+ TokenModifiers = capability.TokenModifiers,
+ TokenTypes = capability.TokenTypes
+ },
+ Full = new SemanticTokensCapabilityRequestFull
+ {
+ Delta = true
+ },
+ Range = true
+ };
+ }
}
#pragma warning restore 618
}
diff --git a/sample/SampleServer/TextDocumentHandler.cs b/sample/SampleServer/TextDocumentHandler.cs
index 701b67278..f3b6f9c2f 100644
--- a/sample/SampleServer/TextDocumentHandler.cs
+++ b/sample/SampleServer/TextDocumentHandler.cs
@@ -13,6 +13,8 @@
using OmniSharp.Extensions.LanguageServer.Protocol.Server.Capabilities;
using OmniSharp.Extensions.LanguageServer.Protocol.Server.WorkDone;
using OmniSharp.Extensions.LanguageServer.Protocol.Workspace;
+using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range;
+
#pragma warning disable CS0618
diff --git a/src/.editorconfig b/src/.editorconfig
new file mode 100644
index 000000000..dc318009a
--- /dev/null
+++ b/src/.editorconfig
@@ -0,0 +1,2 @@
+[*]
+dotnet_diagnostic.CA1014.severity = none
diff --git a/src/Client/Client.csproj b/src/Client/Client.csproj
index 14bd92c9e..ebf3ae955 100644
--- a/src/Client/Client.csproj
+++ b/src/Client/Client.csproj
@@ -1,7 +1,7 @@
- netstandard2.1;netstandard2.0
+ netstandard2.1;netstandard2.0;net6.0
AnyCPU
OmniSharp.Extensions.LanguageClient
OmniSharp.Extensions.LanguageServer.Client
@@ -9,14 +9,15 @@
-
-
-
-
+
+
+
+
- <_Parameter1>OmniSharp.Extensions.LanguageProtocol.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.LanguageProtocol.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
diff --git a/src/Client/LanguageClient.cs b/src/Client/LanguageClient.cs
index 0d5ba8b19..633634784 100644
--- a/src/Client/LanguageClient.cs
+++ b/src/Client/LanguageClient.cs
@@ -25,6 +25,7 @@
using OmniSharp.Extensions.LanguageServer.Protocol.Serialization;
using OmniSharp.Extensions.LanguageServer.Protocol.Workspace;
using OmniSharp.Extensions.LanguageServer.Shared;
+
// ReSharper disable SuspiciousTypeConversion.Global
namespace OmniSharp.Extensions.LanguageServer.Client
@@ -64,12 +65,21 @@ public class LanguageClient : JsonRpcServerBase, ILanguageClient
private readonly int? _concurrency;
private readonly IResolverContext _resolverContext;
- internal static IContainer CreateContainer(LanguageClientOptions options, IServiceProvider? outerServiceProvider) =>
- JsonRpcServerContainer.Create(outerServiceProvider)
- .AddLanguageClientInternals(options, outerServiceProvider);
+ internal static IContainer CreateContainer(LanguageClientOptions options, IServiceProvider? outerServiceProvider)
+ {
+ return JsonRpcServerContainer.Create(outerServiceProvider)
+ .AddLanguageClientInternals(options, outerServiceProvider);
+ }
- public static LanguageClient Create(LanguageClientOptions options) => Create(options, null);
- public static LanguageClient Create(Action optionsAction) => Create(optionsAction, null);
+ public static LanguageClient Create(LanguageClientOptions options)
+ {
+ return Create(options, null);
+ }
+
+ public static LanguageClient Create(Action optionsAction)
+ {
+ return Create(optionsAction, null);
+ }
public static LanguageClient Create(Action optionsAction, IServiceProvider? outerServiceProvider)
{
@@ -78,28 +88,53 @@ public static LanguageClient Create(Action optionsAction,
return Create(options, outerServiceProvider);
}
- public static LanguageClient Create(LanguageClientOptions options, IServiceProvider? outerServiceProvider) =>
- CreateContainer(options, outerServiceProvider).Resolve();
+ public static LanguageClient Create(LanguageClientOptions options, IServiceProvider? outerServiceProvider)
+ {
+ return CreateContainer(options, outerServiceProvider).Resolve();
+ }
- public static Task From(LanguageClientOptions options) => From(options, null, CancellationToken.None);
- public static Task From(Action optionsAction) => From(optionsAction, null, CancellationToken.None);
- public static Task From(LanguageClientOptions options, CancellationToken cancellationToken) => From(options, null, cancellationToken);
- public static Task From(Action optionsAction, CancellationToken cancellationToken) => From(optionsAction, null, cancellationToken);
+ public static Task From(LanguageClientOptions options)
+ {
+ return From(options, null, CancellationToken.None);
+ }
- public static Task From(LanguageClientOptions options, IServiceProvider? outerServiceProvider) =>
- From(options, outerServiceProvider, CancellationToken.None);
+ public static Task From(Action optionsAction)
+ {
+ return From(optionsAction, null, CancellationToken.None);
+ }
- public static Task From(Action optionsAction, IServiceProvider? outerServiceProvider) =>
- From(optionsAction, outerServiceProvider, CancellationToken.None);
+ public static Task From(LanguageClientOptions options, CancellationToken cancellationToken)
+ {
+ return From(options, null, cancellationToken);
+ }
- public static Task From(Action optionsAction, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken)
+ public static Task From(Action optionsAction, CancellationToken cancellationToken)
+ {
+ return From(optionsAction, null, cancellationToken);
+ }
+
+ public static Task From(LanguageClientOptions options, IServiceProvider? outerServiceProvider)
+ {
+ return From(options, outerServiceProvider, CancellationToken.None);
+ }
+
+ public static Task From(Action optionsAction, IServiceProvider? outerServiceProvider)
+ {
+ return From(optionsAction, outerServiceProvider, CancellationToken.None);
+ }
+
+ public static Task From(
+ Action optionsAction, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken
+ )
{
var options = new LanguageClientOptions();
optionsAction(options);
return From(options, outerServiceProvider, cancellationToken);
}
- public static async Task From(LanguageClientOptions options, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken)
+ public static async Task From(
+ LanguageClientOptions options, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken
+ )
{
var server = Create(options, outerServiceProvider);
await server.Initialize(cancellationToken).ConfigureAwait(false);
@@ -113,7 +148,10 @@ public static async Task From(LanguageClientOptions options, ISe
///
///
///
- public static LanguageClient PreInit(Action optionsAction) => Create(optionsAction);
+ public static LanguageClient PreInit(Action optionsAction)
+ {
+ return Create(optionsAction);
+ }
///
/// Create the server without connecting to the client
@@ -122,7 +160,10 @@ public static async Task From(LanguageClientOptions options, ISe
///
///
///
- public static LanguageClient PreInit(LanguageClientOptions options) => Create(options);
+ public static LanguageClient PreInit(LanguageClientOptions options)
+ {
+ return Create(options);
+ }
internal LanguageClient(
Connection connection,
@@ -219,7 +260,8 @@ public InitializeResult ServerSettings
public async Task Initialize(CancellationToken token)
{
- var @params = new InitializeParams {
+ var @params = new InitializeParams
+ {
Trace = _trace,
ClientInfo = _clientInfo,
Capabilities = _clientCapabilities,
@@ -232,7 +274,8 @@ public async Task Initialize(CancellationToken token)
var capabilitiesObject = new JObject();
foreach (var capability in _capabilities)
{
- var keys = capability.GetType().GetCustomAttribute()?.Keys.Select(key => char.ToLower(key[0]) + key.Substring(1)).ToArray();
+ var keys = capability.GetType().GetCustomAttribute()?.Keys.Select(key => char.ToLower(key[0]) + key.Substring(1))
+ .ToArray();
if (keys != null)
{
var value = capabilitiesObject;
@@ -247,6 +290,7 @@ public async Task Initialize(CancellationToken token)
value[key] = value = new JObject();
}
}
+
var lastKey = keys[keys.Length - 1];
value[lastKey] = JToken.FromObject(capability, _serializer.JsonSerializer);
}
@@ -399,8 +443,10 @@ private Supports UseOrTryAndFindCapability(Supports supports) where T :
public IObservable Start => _initializeComplete.AsObservable();
- bool IResponseRouter.TryGetRequest(long id, [NotNullWhen(true)] out string method, [NotNullWhen(true)] out TaskCompletionSource pendingTask) =>
- _responseRouter.TryGetRequest(id, out method, out pendingTask);
+ bool IResponseRouter.TryGetRequest(long id, [NotNullWhen(true)] out string? method, [NotNullWhen(true)] out TaskCompletionSource? pendingTask)
+ {
+ return _responseRouter.TryGetRequest(id, out method, out pendingTask);
+ }
public Task WasStarted => _initializeComplete.ToTask(_scheduler);
@@ -423,6 +469,9 @@ public IDisposable Register(Action registryAction)
return result;
}
- object IServiceProvider.GetService(Type serviceType) => Services.GetService(serviceType);
+ object IServiceProvider.GetService(Type serviceType)
+ {
+ return Services.GetService(serviceType);
+ }
}
}
diff --git a/src/Client/LanguageClientServiceCollectionExtensions.cs b/src/Client/LanguageClientServiceCollectionExtensions.cs
index ff5a021c5..a0e3c8b3c 100644
--- a/src/Client/LanguageClientServiceCollectionExtensions.cs
+++ b/src/Client/LanguageClientServiceCollectionExtensions.cs
@@ -25,7 +25,7 @@ internal static IContainer AddLanguageClientInternals(this IContainer container,
container.RegisterInstance(options.ClientCapabilities);
container.RegisterMany(
- reuse: Reuse.Singleton,
+ Reuse.Singleton,
nonPublicServiceTypes: true,
ifAlreadyRegistered: IfAlreadyRegistered.Keep
);
@@ -41,14 +41,24 @@ internal static IContainer AddLanguageClientInternals(this IContainer container,
#pragma warning restore 4014
}
- container.RegisterMany(serviceTypeCondition: type => type.Name.Contains(nameof(TextDocumentLanguageClient)), reuse: Reuse.Singleton);
- container.RegisterMany(serviceTypeCondition: type => type.Name.Contains(nameof(ClientLanguageClient)), reuse: Reuse.Singleton);
- container.RegisterMany(serviceTypeCondition: type => type.Name.Contains(nameof(GeneralLanguageClient)), reuse: Reuse.Singleton);
- container.RegisterMany(serviceTypeCondition: type => type.Name.Contains(nameof(WindowLanguageClient)), reuse: Reuse.Singleton);
- container.RegisterMany(serviceTypeCondition: type => type.Name.Contains(nameof(WorkspaceLanguageClient)), reuse: Reuse.Singleton);
+ container.RegisterMany(
+ serviceTypeCondition: type => type.Name.Contains(nameof(TextDocumentLanguageClient)), reuse: Reuse.Singleton
+ );
+ container.RegisterMany(
+ serviceTypeCondition: type => type.Name.Contains(nameof(ClientLanguageClient)), reuse: Reuse.Singleton
+ );
+ container.RegisterMany(
+ serviceTypeCondition: type => type.Name.Contains(nameof(GeneralLanguageClient)), reuse: Reuse.Singleton
+ );
+ container.RegisterMany(
+ serviceTypeCondition: type => type.Name.Contains(nameof(WindowLanguageClient)), reuse: Reuse.Singleton
+ );
+ container.RegisterMany(
+ serviceTypeCondition: type => type.Name.Contains(nameof(WorkspaceLanguageClient)), reuse: Reuse.Singleton
+ );
container.RegisterMany(
- serviceTypeCondition: type => type.IsClass || !type.Name.Contains("Proxy") && typeof(DefaultLanguageClientFacade).GetInterfaces()
- .Except(typeof(DefaultLanguageClientFacade).BaseType!.GetInterfaces()).Any(z => type == z),
+ serviceTypeCondition: type => type.IsClass || ( !type.Name.Contains("Proxy") && typeof(DefaultLanguageClientFacade).GetInterfaces()
+ .Except(typeof(DefaultLanguageClientFacade).BaseType!.GetInterfaces()).Any(z => type == z) ),
reuse: Reuse.Singleton
);
container.RegisterInstance>(new ValueOptionsFactory(options));
@@ -60,7 +70,8 @@ internal static IContainer AddLanguageClientInternals(this IContainer container,
);
container.RegisterInstance(
- options.ClientInfo ?? new ClientInfo {
+ options.ClientInfo ?? new ClientInfo
+ {
Name = Assembly.GetEntryAssembly()?.GetName().ToString() ?? string.Empty,
Version = Assembly.GetEntryAssembly()?.GetCustomAttribute()
?.InformationalVersion ??
@@ -69,9 +80,11 @@ internal static IContainer AddLanguageClientInternals(this IContainer container,
}
);
- var providedConfiguration = options.Services.FirstOrDefault(z => z.ServiceType == typeof(IConfiguration) && z.ImplementationInstance is IConfiguration);
+ var providedConfiguration =
+ options.Services.FirstOrDefault(z => z.ServiceType == typeof(IConfiguration) && z.ImplementationInstance is IConfiguration);
container.RegisterDelegate(
- _ => {
+ _ =>
+ {
var builder = options.ConfigurationBuilder;
var outerConfiguration = outerServiceProvider?.GetService();
if (outerConfiguration != null)
@@ -103,10 +116,14 @@ internal static IContainer AddLanguageClientInternals(this IContainer container,
return container;
}
- public static IServiceCollection AddLanguageClient(this IServiceCollection services, Action? configureOptions = null) =>
- AddLanguageClient(services, Options.DefaultName, configureOptions);
+ public static IServiceCollection AddLanguageClient(this IServiceCollection services, Action? configureOptions = null)
+ {
+ return AddLanguageClient(services, Options.DefaultName, configureOptions);
+ }
- public static IServiceCollection AddLanguageClient(this IServiceCollection services, string name, Action? configureOptions = null)
+ public static IServiceCollection AddLanguageClient(
+ this IServiceCollection services, string name, Action? configureOptions = null
+ )
{
// If we get called multiple times we're going to remove the default server
// and force consumers to use the resolver.
diff --git a/src/Dap.Client/Dap.Client.csproj b/src/Dap.Client/Dap.Client.csproj
index 1fe996a04..8997ffd64 100644
--- a/src/Dap.Client/Dap.Client.csproj
+++ b/src/Dap.Client/Dap.Client.csproj
@@ -1,7 +1,7 @@
- netstandard2.1;netstandard2.0
+ netstandard2.1;netstandard2.0;net6.0
AnyCPU
OmniSharp.Extensions.DebugAdapter.Client
OmniSharp.Extensions.DebugAdapter.Client
@@ -9,11 +9,12 @@
-
+
- <_Parameter1>OmniSharp.Extensions.DebugAdapter.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.DebugAdapter.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
diff --git a/src/Dap.Client/DebugAdapterClient.cs b/src/Dap.Client/DebugAdapterClient.cs
index 3141c0605..209c110c0 100644
--- a/src/Dap.Client/DebugAdapterClient.cs
+++ b/src/Dap.Client/DebugAdapterClient.cs
@@ -16,6 +16,7 @@
using OmniSharp.Extensions.DebugAdapter.Protocol.Requests;
using OmniSharp.Extensions.DebugAdapter.Shared;
using OmniSharp.Extensions.JsonRpc;
+
// ReSharper disable SuspiciousTypeConversion.Global
namespace OmniSharp.Extensions.DebugAdapter.Client
@@ -39,12 +40,21 @@ public class DebugAdapterClient : JsonRpcServerBase, IDebugAdapterClient, IDebug
private readonly ISubject _initializedComplete = new AsyncSubject();
private readonly int? _concurrency;
- internal static IContainer CreateContainer(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider) =>
- JsonRpcServerContainer.Create(outerServiceProvider)
- .AddDebugAdapterClientInternals(options, outerServiceProvider);
+ internal static IContainer CreateContainer(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider)
+ {
+ return JsonRpcServerContainer.Create(outerServiceProvider)
+ .AddDebugAdapterClientInternals(options, outerServiceProvider);
+ }
- public static DebugAdapterClient Create(DebugAdapterClientOptions options) => Create(options, null);
- public static DebugAdapterClient Create(Action optionsAction) => Create(optionsAction, null);
+ public static DebugAdapterClient Create(DebugAdapterClientOptions options)
+ {
+ return Create(options, null);
+ }
+
+ public static DebugAdapterClient Create(Action optionsAction)
+ {
+ return Create(optionsAction, null);
+ }
public static DebugAdapterClient Create(Action optionsAction, IServiceProvider? outerServiceProvider)
{
@@ -53,30 +63,53 @@ public static DebugAdapterClient Create(Action option
return Create(options, outerServiceProvider);
}
- public static DebugAdapterClient Create(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider) =>
- CreateContainer(options, outerServiceProvider).Resolve();
+ public static DebugAdapterClient Create(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider)
+ {
+ return CreateContainer(options, outerServiceProvider).Resolve();
+ }
+
+ public static Task From(DebugAdapterClientOptions options)
+ {
+ return From(options, null, CancellationToken.None);
+ }
+
+ public static Task From(Action optionsAction)
+ {
+ return From(optionsAction, null, CancellationToken.None);
+ }
- public static Task From(DebugAdapterClientOptions options) => From(options, null, CancellationToken.None);
- public static Task From(Action optionsAction) => From(optionsAction, null, CancellationToken.None);
- public static Task From(DebugAdapterClientOptions options, CancellationToken cancellationToken) => From(options, null, cancellationToken);
+ public static Task From(DebugAdapterClientOptions options, CancellationToken cancellationToken)
+ {
+ return From(options, null, cancellationToken);
+ }
- public static Task From(Action optionsAction, CancellationToken cancellationToken) =>
- From(optionsAction, null, cancellationToken);
+ public static Task From(Action optionsAction, CancellationToken cancellationToken)
+ {
+ return From(optionsAction, null, cancellationToken);
+ }
- public static Task From(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider) =>
- From(options, outerServiceProvider, CancellationToken.None);
+ public static Task From(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider)
+ {
+ return From(options, outerServiceProvider, CancellationToken.None);
+ }
- public static Task From(Action optionsAction, IServiceProvider? outerServiceProvider) =>
- From(optionsAction, outerServiceProvider, CancellationToken.None);
+ public static Task From(Action optionsAction, IServiceProvider? outerServiceProvider)
+ {
+ return From(optionsAction, outerServiceProvider, CancellationToken.None);
+ }
- public static Task From(Action optionsAction, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken)
+ public static Task From(
+ Action optionsAction, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken
+ )
{
var options = new DebugAdapterClientOptions();
optionsAction(options);
return From(options, outerServiceProvider, cancellationToken);
}
- public static async Task From(DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken)
+ public static async Task From(
+ DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider, CancellationToken cancellationToken
+ )
{
var server = Create(options, outerServiceProvider);
await server.Initialize(cancellationToken).ConfigureAwait(false);
@@ -179,9 +212,11 @@ Task IRequestHandler.Handle(InitializedEvent reque
private void RegisterCapabilities(InitializeRequestArguments capabilities)
{
capabilities.SupportsRunInTerminalRequest = capabilities.SupportsRunInTerminalRequest || _collection.ContainsHandler(typeof(IRunInTerminalHandler));
- capabilities.SupportsProgressReporting = capabilities.SupportsProgressReporting || _collection.ContainsHandler(typeof(IProgressStartHandler)) &&
- _collection.ContainsHandler(typeof(IProgressUpdateHandler)) &&
- _collection.ContainsHandler(typeof(IProgressEndHandler));
+ capabilities.SupportsProgressReporting = capabilities.SupportsProgressReporting || (
+ _collection.ContainsHandler(typeof(IProgressStartHandler)) &&
+ _collection.ContainsHandler(typeof(IProgressUpdateHandler)) &&
+ _collection.ContainsHandler(typeof(IProgressEndHandler))
+ );
}
public InitializeRequestArguments ClientSettings
@@ -204,6 +239,9 @@ public void Dispose()
_connection.Dispose();
}
- object IServiceProvider.GetService(Type serviceType) => _serviceProvider.GetService(serviceType);
+ object IServiceProvider.GetService(Type serviceType)
+ {
+ return _serviceProvider.GetService(serviceType);
+ }
}
}
diff --git a/src/Dap.Client/DebugAdapterClientOptions.cs b/src/Dap.Client/DebugAdapterClientOptions.cs
index 0f11dceee..56ce0c978 100644
--- a/src/Dap.Client/DebugAdapterClientOptions.cs
+++ b/src/Dap.Client/DebugAdapterClientOptions.cs
@@ -1,13 +1,11 @@
using System;
using System.Threading;
using System.Threading.Tasks;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using OmniSharp.Extensions.DebugAdapter.Protocol;
using OmniSharp.Extensions.DebugAdapter.Protocol.Client;
using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
using OmniSharp.Extensions.DebugAdapter.Protocol.Requests;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization;
using OmniSharp.Extensions.DebugAdapter.Shared;
using OmniSharp.Extensions.JsonRpc;
@@ -35,108 +33,199 @@ public DebugAdapterClientOptions()
public bool SupportsProgressReporting { get; set; }
public bool SupportsInvalidatedEvent { get; set; }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(string method, IJsonRpcHandler handler, JsonRpcHandlerOptions? options) =>
- AddHandler(method, handler, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(
+ string method, IJsonRpcHandler handler, JsonRpcHandlerOptions? options
+ )
+ {
+ return AddHandler(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.
- AddHandler(string method, JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions? options) => AddHandler(method, handlerFunc, options);
+ AddHandler(string method, JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions? options)
+ {
+ return AddHandler(method, handlerFunc, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandlers(params IJsonRpcHandler[] handlers) => AddHandlers(handlers);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandlers(params IJsonRpcHandler[] handlers)
+ {
+ return AddHandlers(handlers);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions? options) =>
- AddHandler(handlerFunc, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(
+ JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions? options
+ )
+ {
+ return AddHandler(handlerFunc, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(IJsonRpcHandler handler, JsonRpcHandlerOptions? options) =>
- AddHandler(handler, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(IJsonRpcHandler handler, JsonRpcHandlerOptions? options)
+ {
+ return AddHandler(handler, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(JsonRpcHandlerOptions? options) => AddHandler(options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(JsonRpcHandlerOptions? options)
+ {
+ return AddHandler(options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(string method, JsonRpcHandlerOptions? options) =>
- AddHandler(method, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(string method, JsonRpcHandlerOptions? options)
+ {
+ return AddHandler(method, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(Type type, JsonRpcHandlerOptions? options) => AddHandler(type, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(Type type, JsonRpcHandlerOptions? options)
+ {
+ return AddHandler(type, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(string method, Type type, JsonRpcHandlerOptions? options) =>
- AddHandler(method, type, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandler(string method, Type type, JsonRpcHandlerOptions? options)
+ {
+ return AddHandler(method, type, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandlerLink(string fromMethod, string toMethod) =>
- AddHandlerLink(fromMethod, toMethod);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.AddHandlerLink(string fromMethod, string toMethod)
+ {
+ return AddHandlerLink(fromMethod, toMethod);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonRequest(
string method, Func> handler, JsonRpcHandlerOptions? options
- ) => OnJsonRequest(method, handler, options);
+ )
+ {
+ return OnJsonRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonRequest(
string method, Func> handler, JsonRpcHandlerOptions? options
- ) => OnJsonRequest(method, handler, options);
+ )
+ {
+ return OnJsonRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func> handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func> handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func> handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func> handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnRequest(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnRequest(method, handler, options);
+ )
+ {
+ return OnRequest(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
string method, Action handler, JsonRpcHandlerOptions? options
- ) => OnNotification(method, handler, options);
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonNotification(string method, Action handler, JsonRpcHandlerOptions? options) =>
- OnJsonNotification(method, handler, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonNotification(
+ string method, Action handler, JsonRpcHandlerOptions? options
+ )
+ {
+ return OnJsonNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonNotification(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnJsonNotification(method, handler, options);
+ )
+ {
+ return OnJsonNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonNotification(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnJsonNotification(method, handler, options);
+ )
+ {
+ return OnJsonNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnJsonNotification(
string method, Action handler, JsonRpcHandlerOptions? options
- ) => OnJsonNotification(method, handler, options);
+ )
+ {
+ return OnJsonNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
string method, Action handler, JsonRpcHandlerOptions? options
- ) => OnNotification(method, handler, options);
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnNotification(method, handler, options);
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnNotification(method, handler, options);
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(string method, Action handler, JsonRpcHandlerOptions? options) =>
- OnNotification(method, handler, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
+ string method, Action handler, JsonRpcHandlerOptions? options
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
string method, Func handler, JsonRpcHandlerOptions? options
- ) => OnNotification(method, handler, options);
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
- IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(string method, Func handler, JsonRpcHandlerOptions? options) =>
- OnNotification(method, handler, options);
+ IDebugAdapterClientRegistry IJsonRpcHandlerRegistry.OnNotification(
+ string method, Func handler, JsonRpcHandlerOptions? options
+ )
+ {
+ return OnNotification(method, handler, options);
+ }
}
}
diff --git a/src/Dap.Client/DebugAdapterClientServiceCollectionExtensions.cs b/src/Dap.Client/DebugAdapterClientServiceCollectionExtensions.cs
index a823d45d9..d4bffec16 100644
--- a/src/Dap.Client/DebugAdapterClientServiceCollectionExtensions.cs
+++ b/src/Dap.Client/DebugAdapterClientServiceCollectionExtensions.cs
@@ -15,7 +15,9 @@ namespace OmniSharp.Extensions.DebugAdapter.Client
{
public static class DebugAdapterClientServiceCollectionExtensions
{
- internal static IContainer AddDebugAdapterClientInternals(this IContainer container, DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider)
+ internal static IContainer AddDebugAdapterClientInternals(
+ this IContainer container, DebugAdapterClientOptions options, IServiceProvider? outerServiceProvider
+ )
{
container = container.AddDebugAdapterProtocolInternals(options);
@@ -31,9 +33,10 @@ internal static IContainer AddDebugAdapterClientInternals(this IContainer contai
container.RegisterInstance>(new ValueOptionsFactory(options));
container.RegisterInstance(
- new InitializeRequestArguments {
+ new InitializeRequestArguments
+ {
Locale = options.Locale,
- AdapterId = options.AdapterId!,
+ AdapterId = options.AdapterId,
ClientId = options.ClientId,
ClientName = options.ClientName,
PathFormat = options.PathFormat,
@@ -55,14 +58,17 @@ internal static IContainer AddDebugAdapterClientInternals(this IContainer contai
setup: Setup.With(condition: req => req.IsResolutionRoot || req.Container.Resolve().Started)
);
container.RegisterMany(
- serviceTypeCondition: type => type.IsClass || !type.Name.Contains("Proxy") && typeof(DefaultDebugAdapterClientFacade).GetInterfaces().Except(typeof(DefaultDebugAdapterClientFacade).BaseType!.GetInterfaces()).Any(z => type == z),
+ serviceTypeCondition: type => type.IsClass || ( !type.Name.Contains("Proxy") && typeof(DefaultDebugAdapterClientFacade).GetInterfaces()
+ .Except(typeof(DefaultDebugAdapterClientFacade).BaseType!.GetInterfaces()).Any(z => type == z) ),
reuse: Reuse.Singleton
);
// container.
- var providedConfiguration = options.Services.FirstOrDefault(z => z.ServiceType == typeof(IConfiguration) && z.ImplementationInstance is IConfiguration);
+ var providedConfiguration =
+ options.Services.FirstOrDefault(z => z.ServiceType == typeof(IConfiguration) && z.ImplementationInstance is IConfiguration);
container.RegisterDelegate(
- _ => {
+ _ =>
+ {
var builder = new ConfigurationBuilder();
if (outerServiceProvider != null)
{
@@ -75,7 +81,7 @@ internal static IContainer AddDebugAdapterClientInternals(this IContainer contai
if (providedConfiguration != null)
{
- builder.CustomAddConfiguration((providedConfiguration.ImplementationInstance as IConfiguration)!);
+ builder.CustomAddConfiguration(( providedConfiguration.ImplementationInstance as IConfiguration )!);
}
return builder.Build();
@@ -86,10 +92,14 @@ internal static IContainer AddDebugAdapterClientInternals(this IContainer contai
return container;
}
- public static IServiceCollection AddDebugAdapterClient(this IServiceCollection services, Action? configureOptions = null) =>
- AddDebugAdapterClient(services, Options.DefaultName, configureOptions);
+ public static IServiceCollection AddDebugAdapterClient(this IServiceCollection services, Action? configureOptions = null)
+ {
+ return AddDebugAdapterClient(services, Options.DefaultName, configureOptions);
+ }
- public static IServiceCollection AddDebugAdapterClient(this IServiceCollection services, string name, Action? configureOptions = null)
+ public static IServiceCollection AddDebugAdapterClient(
+ this IServiceCollection services, string name, Action? configureOptions = null
+ )
{
// If we get called multiple times we're going to remove the default server
// and force consumers to use the resolver.
@@ -100,15 +110,21 @@ public static IServiceCollection AddDebugAdapterClient(this IServiceCollection s
services.RemoveAll();
services.AddSingleton(
_ =>
- throw new NotSupportedException("DebugAdapterClient has been registered multiple times, you must use DebugAdapterClientResolver instead")
+ throw new NotSupportedException(
+ "DebugAdapterClient has been registered multiple times, you must use DebugAdapterClientResolver instead"
+ )
);
services.AddSingleton(
_ =>
- throw new NotSupportedException("DebugAdapterClient has been registered multiple times, you must use DebugAdapterClientResolver instead")
+ throw new NotSupportedException(
+ "DebugAdapterClient has been registered multiple times, you must use DebugAdapterClientResolver instead"
+ )
);
services.AddSingleton(
_ =>
- throw new NotSupportedException("DebugAdapterClient has been registered multiple times, you must use DebugAdapterClientResolver instead")
+ throw new NotSupportedException(
+ "DebugAdapterClient has been registered multiple times, you must use DebugAdapterClientResolver instead"
+ )
);
}
diff --git a/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj b/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj
index 77f12517f..e03805d19 100644
--- a/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj
+++ b/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj
@@ -1,18 +1,19 @@
- netstandard2.1;netstandard2.0
+ netstandard2.1;netstandard2.0;net6.0
AnyCPU
OmniSharp.Extensions.DebugAdapter.Proposals
OmniSharp.Extensions.DebugAdapter.Protocol
- Proposed Debug Adapter Protocol models, classes, interfaces and helper methods, that may or may not make it into the final spec
+ Proposed Debug Adapter Protocol models, classes, interfaces and helper methods, that may or may not make it into the final spec
-
+
-
+
diff --git a/src/Dap.Protocol/Dap.Protocol.csproj b/src/Dap.Protocol/Dap.Protocol.csproj
index 45920e504..4622960c4 100644
--- a/src/Dap.Protocol/Dap.Protocol.csproj
+++ b/src/Dap.Protocol/Dap.Protocol.csproj
@@ -1,7 +1,7 @@
- netstandard2.1;netstandard2.0
+ netstandard2.1;netstandard2.0;net6.0
AnyCPU
OmniSharp.Extensions.DebugAdapter
OmniSharp.Extensions.DebugAdapter.Protocol
@@ -9,29 +9,40 @@
-
+
-
-
+
+
- <_Parameter1>OmniSharp.Extensions.DebugAdapter.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.DebugAdapter.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
- <_Parameter1>OmniSharp.Extensions.DebugAdapter.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.DebugAdapter.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
- <_Parameter1>OmniSharp.Extensions.DebugAdapter.Client, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.DebugAdapter.Client, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
- <_Parameter1>OmniSharp.Extensions.DebugAdapter.Shared, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.DebugAdapter.Shared, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
- <_Parameter1>OmniSharp.Extensions.DebugAdapter.Proposals, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
+ <_Parameter1
+ >OmniSharp.Extensions.DebugAdapter.Proposals, PublicKey=0024000004800000940000000602000000240000525341310004000001000100391db875e68eb4bfef49ce14313b9e13f2cd3cc89eb273bbe6c11a55044c7d4f566cf092e1c77ef9e7c75b1496ae7f95d925938f5a01793dd8d9f99ae0a7595779b71b971287d7d7b5960d052078d14f5ce1a85ea5c9fb2f59ac735ff7bc215cab469b7c3486006860bad6f4c3b5204ea2f28dd4e1d05e2cca462cfd593b9f9f
diff --git a/src/Dap.Protocol/DebugAdapterConverters/DapRpcErrorConverter.cs b/src/Dap.Protocol/DebugAdapterConverters/DapRpcErrorConverter.cs
index d26bf9fd6..da99d76b2 100644
--- a/src/Dap.Protocol/DebugAdapterConverters/DapRpcErrorConverter.cs
+++ b/src/Dap.Protocol/DebugAdapterConverters/DapRpcErrorConverter.cs
@@ -48,9 +48,12 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
object? requestId = null;
if (obj.TryGetValue("id", out var id))
{
- var idString = id.Type == JTokenType.String ? (string) id : null;
- var idLong = id.Type == JTokenType.Integer ? (long?) id : null;
- requestId = idString ?? ( idLong.HasValue ? (object?) idLong.Value : null );
+ requestId = id switch
+ {
+ { Type: JTokenType.String } => id.Value(),
+ { Type: JTokenType.Integer } => id.Value(),
+ _ => null
+ };
}
ErrorMessage? data = null;
diff --git a/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs b/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs
index 19f04b79c..de76a5862 100644
--- a/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs
@@ -80,11 +80,9 @@ namespace Events
{
[Parallel]
[Method(EventNames.Breakpoint, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record BreakpointEvent : IRequest
{
///
@@ -96,7 +94,7 @@ public record BreakpointEvent : IRequest
///
/// The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values.
///
- public Breakpoint Breakpoint { get; init; }
+ public Breakpoint Breakpoint { get; init; } = null!;
}
diff --git a/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs b/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs
index 28d81b0da..7d34b09b3 100644
--- a/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs
@@ -105,7 +105,8 @@ public record Capabilities
public Container? SupportedChecksumAlgorithms { get; set; }
///
- /// The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the
+ /// The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by
+ /// calling the
/// RestartRequest.
///
[Optional]
@@ -136,7 +137,8 @@ public record Capabilities
public bool SupportTerminateDebuggee { get; set; }
///
- /// The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the
+ /// The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames'
+ /// result of the
/// 'StackTrace' request are supported.
///
[Optional]
@@ -233,17 +235,15 @@ namespace Events
{
[Parallel]
[Method(EventNames.Capabilities, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record CapabilitiesEvent : IRequest
{
///
/// The set of updated capabilities.
///
- public Capabilities Capabilities { get; init; }
+ public Capabilities Capabilities { get; init; } = null!;
}
}
}
diff --git a/src/Dap.Protocol/Feature/Events/InitializedFeature.cs b/src/Dap.Protocol/Feature/Events/InitializedFeature.cs
index e301e0d79..35fa55a40 100644
--- a/src/Dap.Protocol/Feature/Events/InitializedFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/InitializedFeature.cs
@@ -9,13 +9,9 @@ namespace Events
{
[Parallel]
[Method(EventNames.Initialized, Direction.ServerToClient)]
- [
- GenerateHandler(Name = "DebugAdapterInitialized"),
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
- public record InitializedEvent : IRequest
- {
- }
+ [GenerateHandler(Name = "DebugAdapterInitialized")]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
+ public record InitializedEvent : IRequest;
}
}
diff --git a/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs b/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs
index 9b86f9598..f916d033d 100644
--- a/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs
@@ -10,11 +10,9 @@ namespace Events
{
[Parallel]
[Method(EventNames.LoadedSource, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record LoadedSourceEvent : IRequest
{
///
@@ -25,7 +23,7 @@ public record LoadedSourceEvent : IRequest
///
/// The new, changed, or removed source.
///
- public Source Source { get; init; }
+ public Source Source { get; init; } = null!;
}
[StringEnum]
diff --git a/src/Dap.Protocol/Feature/Events/ModuleFeature.cs b/src/Dap.Protocol/Feature/Events/ModuleFeature.cs
index ce15fe09b..828af7c13 100644
--- a/src/Dap.Protocol/Feature/Events/ModuleFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/ModuleFeature.cs
@@ -1,7 +1,7 @@
using MediatR;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
using OmniSharp.Extensions.JsonRpc;
using OmniSharp.Extensions.JsonRpc.Generation;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
// ReSharper disable once CheckNamespace
namespace OmniSharp.Extensions.DebugAdapter.Protocol
@@ -10,11 +10,9 @@ namespace Events
{
[Parallel]
[Method(EventNames.Module, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record ModuleEvent : IRequest
{
///
@@ -25,7 +23,7 @@ public record ModuleEvent : IRequest
///
/// The new, changed, or removed module. In case of 'removed' only the module id is used.
///
- public Module Module { get; init; }
+ public Module Module { get; init; } = null!;
}
[StringEnum]
diff --git a/src/Dap.Protocol/Feature/Events/OutputFeature.cs b/src/Dap.Protocol/Feature/Events/OutputFeature.cs
index f56e4e70c..0a5635579 100644
--- a/src/Dap.Protocol/Feature/Events/OutputFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/OutputFeature.cs
@@ -12,11 +12,9 @@ namespace Events
{
[Parallel]
[Method(EventNames.Output, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record OutputEvent : IRequest
{
///
@@ -29,13 +27,13 @@ public record OutputEvent : IRequest
///
/// The output to report.
///
- public string Output { get; init; }
+ public string Output { get; init; } = null!;
///
/// Support for keeping an output log organized by grouping related messages.
/// Values:
/// 'start': Start a new group in expanded mode. Subsequent output events are
- /// members of the group and should be shown indented.
+ /// members of the group and should be shown indented.
/// The 'output' attribute becomes the name of the group and is not indented.
/// 'startCollapsed': Start a new group in collapsed mode. Subsequent output
/// events are members of the group and should be shown indented (as soon as
diff --git a/src/Dap.Protocol/Feature/Events/ProcessFeature.cs b/src/Dap.Protocol/Feature/Events/ProcessFeature.cs
index 11fa7fc16..fb5128ac6 100644
--- a/src/Dap.Protocol/Feature/Events/ProcessFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/ProcessFeature.cs
@@ -10,17 +10,15 @@ namespace Events
{
[Parallel]
[Method(EventNames.Process, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record ProcessEvent : IRequest
{
///
/// The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.
///
- public string Name { get; init; }
+ public string Name { get; init; } = null!;
///
/// The system process id of the debugged process. This property will be missing for non-system processes.
diff --git a/src/Dap.Protocol/Feature/Events/ProgressFeature.cs b/src/Dap.Protocol/Feature/Events/ProgressFeature.cs
index 16ebd60a5..aca27ceaf 100644
--- a/src/Dap.Protocol/Feature/Events/ProgressFeature.cs
+++ b/src/Dap.Protocol/Feature/Events/ProgressFeature.cs
@@ -14,7 +14,7 @@ public abstract record ProgressEvent
///
/// The ID that was introduced in the initial 'progressStart' event.
///
- public ProgressToken ProgressId { get; init; }
+ public ProgressToken ProgressId { get; init; } = null!;
///
/// Optional, more detailed progress message. If omitted, the previous message (if any) is used.
@@ -25,17 +25,15 @@ public abstract record ProgressEvent
[Serial]
[Method(EventNames.ProgressStart, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record ProgressStartEvent : ProgressEvent, IRequest
{
///
/// Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation.
///
- public string Title { get; init; }
+ public string Title { get; init; } = null!;
///
/// The request ID that this progress report is related to. If specified a debug adapter is expected to emit
@@ -62,11 +60,9 @@ public record ProgressStartEvent : ProgressEvent, IRequest
[Serial]
[Method(EventNames.ProgressUpdate, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record ProgressUpdateEvent : ProgressEvent, IRequest
{
///
@@ -78,13 +74,9 @@ public record ProgressUpdateEvent : ProgressEvent, IRequest
[Serial]
[Method(EventNames.ProgressEnd, Direction.ServerToClient)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
- public record ProgressEndEvent : ProgressEvent, IRequest
- {
- }
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
+ public record ProgressEndEvent : ProgressEvent, IRequest;
}
}
diff --git a/src/Dap.Protocol/Feature/Requests/AttachFeature.cs b/src/Dap.Protocol/Feature/Requests/AttachFeature.cs
index 2dd02d4d9..a91dc0445 100644
--- a/src/Dap.Protocol/Feature/Requests/AttachFeature.cs
+++ b/src/Dap.Protocol/Feature/Requests/AttachFeature.cs
@@ -13,11 +13,9 @@ namespace Requests
{
[Parallel]
[Method(RequestNames.Attach, Direction.ClientToServer)]
- [
- GenerateHandler(Name = "Attach", AllowDerivedRequests = true),
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler(Name = "Attach", AllowDerivedRequests = true)]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record AttachRequestArguments : IRequest
{
///
@@ -32,8 +30,6 @@ public record AttachRequestArguments : IRequest
[JsonExtensionData] public IDictionary ExtensionData { get; init; } = new Dictionary();
}
- public record AttachResponse
- {
- }
+ public record AttachResponse;
}
}
diff --git a/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs b/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs
index 491f0d8dc..f89850a07 100644
--- a/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs
+++ b/src/Dap.Protocol/Feature/Requests/BreakpointLocationsFeature.cs
@@ -11,17 +11,15 @@ namespace Requests
{
[Parallel]
[Method(RequestNames.BreakpointLocations, Direction.ClientToServer)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record BreakpointLocationsArguments : IRequest
{
///
/// The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
///
- public Source Source { get; init; }
+ public Source Source { get; init; } = null!;
///
/// Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.
@@ -41,7 +39,8 @@ public record BreakpointLocationsArguments : IRequest
- /// Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line.
+ /// Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end
+ /// line.
///
[Optional]
public int? EndColumn { get; init; }
@@ -52,7 +51,7 @@ public record BreakpointLocationsResponse
///
/// Sorted set of possible breakpoint locations.
///
- public Container Breakpoints { get; init; }
+ public Container Breakpoints { get; init; } = null!;
}
}
diff --git a/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs b/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs
index 6eb1ec66a..3298033c5 100644
--- a/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs
+++ b/src/Dap.Protocol/Feature/Requests/CompletionsFeature.cs
@@ -13,11 +13,9 @@ namespace Requests
{
[Parallel]
[Method(RequestNames.Completions, Direction.ClientToServer)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record CompletionsArguments : IRequest
{
///
@@ -29,7 +27,7 @@ public record CompletionsArguments : IRequest
///
/// One or more source lines.Typically this is the text a user has typed into the debug console before he asked for completion.
///
- public string Text { get; init; }
+ public string Text { get; init; } = null!;
///
/// The character position for which to determine the completion proposals.
@@ -48,7 +46,7 @@ public record CompletionsResponse
///
/// The possible completions for .
///
- public Container Targets { get; init; }
+ public Container Targets { get; init; } = null!;
}
}
@@ -62,7 +60,7 @@ public record CompletionItem
///
/// The label of this completion item. By default this is also the text that is inserted when selecting this completion.
///
- public string Label { get; init; }
+ public string Label { get; init; } = null!;
///
/// If text is not falsy then it is inserted instead of the label.
@@ -113,7 +111,8 @@ public record CompletionItem
[JsonConverter(typeof(StringEnumConverter))]
public enum CompletionItemType
{
- Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Text, Color, File, Reference, CustomColor
+ Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Text, Color, File,
+ Reference, CustomColor
}
}
}
diff --git a/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs b/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs
index 3ccd14f6c..f67e050e6 100644
--- a/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs
+++ b/src/Dap.Protocol/Feature/Requests/ConfigurationDoneFeature.cs
@@ -9,17 +9,11 @@ namespace Requests
{
[Parallel]
[Method(RequestNames.ConfigurationDone, Direction.ClientToServer)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
- public record ConfigurationDoneArguments : IRequest
- {
- }
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
+ public record ConfigurationDoneArguments : IRequest;
- public record ConfigurationDoneResponse
- {
- }
+ public record ConfigurationDoneResponse;
}
}
diff --git a/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs b/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs
index d1b02bbf1..30972e614 100644
--- a/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs
+++ b/src/Dap.Protocol/Feature/Requests/DataBreakpointInfoFeature.cs
@@ -11,11 +11,9 @@ namespace Requests
{
[Parallel]
[Method(RequestNames.DataBreakpointInfo, Direction.ClientToServer)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record DataBreakpointInfoArguments : IRequest
{
///
@@ -27,7 +25,7 @@ public record DataBreakpointInfoArguments : IRequest
///
/// The name of the Variable's child to obtain data breakpoint information for. If variableReference isn’t provided, this can be an expression.
///
- public string Name { get; init; }
+ public string Name { get; init; } = null!;
}
public record DataBreakpointInfoResponse
@@ -35,12 +33,12 @@ public record DataBreakpointInfoResponse
///
/// An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available.
///
- public string DataId { get; init; }
+ public string DataId { get; init; } = null!;
///
/// UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available.
///
- public string Description { get; init; }
+ public string Description { get; init; } = null!;
///
/// Optional attribute listing the available access types for a potential data breakpoint.A UI frontend could surface this information.
diff --git a/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs b/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs
index 32ff4087b..e28e68d2f 100644
--- a/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs
+++ b/src/Dap.Protocol/Feature/Requests/DisassembleFeature.cs
@@ -11,17 +11,15 @@ namespace Requests
{
[Parallel]
[Method(RequestNames.Disassemble, Direction.ClientToServer)]
- [
- GenerateHandler,
- GenerateHandlerMethods,
- GenerateRequestMethods
- ]
+ [GenerateHandler]
+ [GenerateHandlerMethods]
+ [GenerateRequestMethods]
public record DisassembleArguments : IRequest
{
///
/// Memory reference to the base location containing the instructions to disassemble.
///
- public string MemoryReference { get; init; }
+ public string MemoryReference { get; init; } = null!;
///
/// Optional offset(in bytes) to be applied to the reference location before disassembling.Can be negative.
@@ -37,7 +35,8 @@ public record DisassembleArguments : IRequest
public long? InstructionOffset { get; init; }
///