diff --git a/.editorconfig b/.editorconfig index bc17bbe69267..ec6569278190 100644 --- a/.editorconfig +++ b/.editorconfig @@ -280,6 +280,10 @@ dotnet_diagnostic.IDE0200.severity = none dotnet_diagnostic.IDE0240.severity = warning # Additional rules for template engine source code + +# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.SpacingRules' +dotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = none + [{src,test}/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs] # Default analyzed API surface = 'public' (public APIs) dotnet_code_quality.api_surface = public diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Activities.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/Activities.cs index 9f4665572436..d477b8b342f1 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/Activities.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Activities.cs @@ -6,15 +6,27 @@ namespace Microsoft.DotNet.Cli.Utils; /// -/// Contains helpers for working with Activities in the .NET CLI. +/// Contains helpers for working with Activities in the .NET CLI. /// public static class Activities { - /// /// The main entrypoint for creating Activities in the .NET CLI. /// All activities created in the CLI should use this , to allow /// consumers to easily filter and trace CLI activities. /// public static ActivitySource Source { get; } = new("dotnet-cli", Product.Version); + + /// + /// The environment variable used to transfer the chain of parent activity IDs. + /// This should be used when constructing new sub-processes in order to + /// track spans across calls. + /// + public const string TRACEPARENT = nameof(TRACEPARENT); + /// + /// The environment variable used to transfer the trace state of the parent activities. + /// This should be used when constructing new sub-processes in order to + /// track spans across calls. + /// + public const string TRACESTATE = nameof(TRACESTATE); } diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs index 7889716ea67b..485aa9493408 100644 --- a/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs +++ b/src/Cli/Microsoft.TemplateEngine.Cli/Commands/create/InstantiateCommand.cs @@ -51,13 +51,13 @@ internal InstantiateCommand( Arity = new ArgumentArity(0, 999) }; - internal IReadOnlyList