Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix help warnings #5140

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,7 @@
<!-- default to max warnlevel -->
<AnalysisLevel>preview</AnalysisLevel>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!--
Make sure any documentation comments which are included in code get checked for syntax during the build, but do
not report warnings for missing comments.

Cleanup issue: https://github.com/microsoft/vstest/issues/4236
CS1570: XML comment on '<construct>' has badly formed XML
CS1572: XML comment on 'construct' has a param tag for 'parameter', but there is no parameter by that name
CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do)
CS1574: XML comment on 'construct' has syntactically incorrect cref attribute 'name'
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
-->
<NoWarn>$(NoWarn);CA1416;RS0037;CS1570;CS1572;CS1573;CS1574;CS1591</NoWarn>
<NoWarn>$(NoWarn);CA1416;RS0037</NoWarn>
</PropertyGroup>

<!-- The TFMs to build and test against. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public interface IDesignModeClient : IDisposable
/// Setups client based on port
/// </summary>
/// <param name="port">port number to connect</param>
/// <param name="testRequestManager">test request manager</param>
void ConnectToClientAndProcessRequests(int port, ITestRequestManager testRequestManager);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public sealed class DiscoveryRequest : IDiscoveryRequest, ITestDiscoveryEventsHa
/// <param name="requestData">The Request Data instance providing services and data for discovery</param>
/// <param name="criteria">Discovery criterion.</param>
/// <param name="discoveryManager">Discovery manager instance.</param>
/// <param name="loggerManager">Logger manager instance.</param>
internal DiscoveryRequest(IRequestData requestData, DiscoveryCriteria criteria, IProxyDiscoveryManager discoveryManager, ITestLoggerManager loggerManager)
: this(requestData, criteria, discoveryManager, loggerManager, JsonDataSerializer.Instance)
{
Expand All @@ -44,6 +45,7 @@ internal DiscoveryRequest(IRequestData requestData, DiscoveryCriteria criteria,
/// <param name="requestData">The Request Data instance providing services and data for discovery</param>
/// <param name="criteria">Discovery criterion.</param>
/// <param name="discoveryManager">Discovery manager instance.</param>
/// <param name="loggerManager">Logger manager instance.</param>
/// <param name="dataSerializer">Data Serializer</param>
internal DiscoveryRequest(
IRequestData requestData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void StartTestSession(
/// Stops a test session.
/// </summary>
///
/// <param name="testSessionInfo">The stop test session payload.</param>
/// <param name="payload">The stop test session payload.</param>
/// <param name="eventsHandler">The events handler.</param>
/// <param name="protocolConfig">Protocol related information.</param>
void StopTestSession(
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.TestPlatform.Client/TestPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ private void AddExtensionAssemblies(string? runSettings, TestAdapterLoadingStrat
/// </summary>
///
/// <param name="sources">The list of sources.</param>
/// <param name="strategy">Adapter loading strategy</param>
private void AddLoggerAssembliesFromSource(IEnumerable<string> sources, TestAdapterLoadingStrategy strategy)
{
// Skip discovery unless we're using the default behavior, or NextToSource is specified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ internal class DataCollectionManager : IDataCollectionManager
/// <param name="messageSink">
/// The message Sink.
/// </param>
/// <param name="requestData">request data</param>
/// <param name="telemetryReporter">telemetry reporter</param>
internal DataCollectionManager(IMessageSink messageSink, IRequestData requestData, ITelemetryReporter telemetryReporter) : this(new DataCollectionAttachmentManager(), messageSink, new DataCollectionTelemetryManager(requestData), telemetryReporter)
{
}
Expand All @@ -92,6 +94,8 @@ internal class DataCollectionManager : IDataCollectionManager
/// <param name="messageSink">
/// The message Sink.
/// </param>
/// <param name="dataCollectionTelemetryManager">telemetry manager</param>
/// <param name="telemetryReporter">telemetry reporter</param>
/// <remarks>
/// The constructor is not public because the factory method should be used to get instances of this class.
/// </remarks>
Expand Down Expand Up @@ -136,6 +140,8 @@ private DataCollectorExtensionManager DataCollectorExtensionManager
/// <param name="messageSink">
/// The message sink.
/// </param>
/// <param name="requestData">request data</param>
/// <param name="telemetryReporter">telemetry reporter</param>
/// <returns>
/// The <see cref="DataCollectionManager"/>.
/// </returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal interface IDataCollectionAttachmentManager
/// The data collection context.
/// </param>
/// <returns>
/// The <see cref="List"/>.
/// The <see cref="List{T}"/>.
/// </returns>
List<AttachmentSet> GetAttachments(DataCollectionContext dataCollectionContext);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public DataCollectorMetadata(string extension, string friendlyName)
/// </param>
/// <param name="friendlyName">
/// The friendly Name.
/// </param>
/// <param name="hasAttachmentProcessor">
/// Indicates if the current data collector registers an attachment processor
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ internal class TestDiscovererMetadata : ITestDiscovererCapabilities
/// </summary>
/// <param name="fileExtensions"> The file Extensions. </param>
/// <param name="defaultExecutorUri"> The default Executor Uri. </param>
/// <param name="assemblyType">Type of the assembly.</param>
/// <param name="isDirectoryBased">True when the discoverer is based on directories.</param>
public TestDiscovererMetadata(IReadOnlyCollection<string>? fileExtensions, string? defaultExecutorUri, AssemblyType assemblyType = default, bool isDirectoryBased = false)
{
if (fileExtensions != null && fileExtensions.Count > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ internal set
/// Gets a list of all extension paths filtered by input string.
/// </summary>
/// <param name="endsWithPattern">Pattern to filter extension paths.</param>
/// <param name="skipDefaultExtensions">True when default extensions should be skipped.</param>
public List<string> GetExtensionPaths(string endsWithPattern, bool skipDefaultExtensions = false)
{
var extensions = GetFilteredExtensions(_filterableExtensionPaths, endsWithPattern);
Expand Down Expand Up @@ -115,7 +116,7 @@ public List<string> GetExtensionPaths(string endsWithPattern, bool skipDefaultEx
/// Pattern used to select files using String.EndsWith
/// </param>
/// <returns>
/// The <see cref="Dictionary"/>. of test plugin info.
/// The <see cref="Dictionary{TKey, TValue}"/>. of test plugin info.
/// </returns>
public Dictionary<string, TPluginInfo>? DiscoverTestExtensions<TPluginInfo, TExtension>(
string endsWithPattern)
Expand Down Expand Up @@ -306,7 +307,7 @@ internal IEnumerable<string> DefaultExtensionPaths
/// Type of extension.
/// </typeparam>
/// <returns>
/// The <see cref="Dictionary"/>.
/// The <see cref="Dictionary{TKey, TValue>"/>.
/// </returns>
internal Dictionary<string, TPluginInfo> GetTestExtensions<TPluginInfo, TExtension>(
string extensionAssembly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private static void GetTestExtensionsFromFiles<TPluginInfo, TExtension>(
/// </summary>
/// <param name="assembly">Assembly to check for test extension availability</param>
/// <param name="pluginInfos">Test extensions collection to add to.</param>
/// <param name="filePath">File path of the assembly.</param>
/// <typeparam name="TPluginInfo">
/// Type of Test Plugin Information.
/// </typeparam>
Expand Down Expand Up @@ -201,6 +202,7 @@ private static void GetTestExtensionsFromAssembly<TPluginInfo, TExtension>(Assem
/// <param name="extensionCollection">
/// Test extensions collection to add to.
/// </param>
/// <param name="filePath">File path of the assembly.</param>
private static void GetTestExtensionFromType<TPluginInfo>(
Type type,
Type extensionType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ internal static void AddExtensionTelemetry(
/// The info about new extensions discovered
/// </param>
/// <returns>
/// The <see cref="Dictionary"/> of extensions discovered
/// The <see cref="Dictionary{TKey, TValue}"/> of extensions discovered
/// </returns>
internal Dictionary<string, TPluginInfo>? AddExtension<TPluginInfo>(Dictionary<string, TPluginInfo>? newExtensions)
where TPluginInfo : TestPluginInformation
Expand Down Expand Up @@ -415,7 +415,7 @@ internal void InvalidateCache()
/// <typeparam name="TPluginInfo">
/// </typeparam>
/// <returns>
/// The <see cref="Dictionary"/>. of extensions discovered in assembly
/// The <see cref="Dictionary{TKey, TValue}"/>. of extensions discovered in assembly
/// </returns>
internal static Dictionary<string, TPluginInfo> GetExtensionsDiscoveredFromAssembly<TPluginInfo>(
Dictionary<string, TPluginInfo>? extensionCollection,
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.TestPlatform.Common/Filtering/Condition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ internal bool Evaluate(Func<string, object?> propertyValueProvider)
}

/// <summary>
/// Returns a condition object after parsing input string of format '<propertyName>Operation<propertyValue>'
/// Returns a condition object after parsing input string of format '<propertyName>Operation</propertyName>'
/// </summary>
internal static Condition Parse(string? conditionString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.Filtering;
/// <summary>
/// Represents an expression tree.
/// Supports:
/// Logical Operators: &, |
/// Logical Operators: &amp;, |
/// Equality Operators: =, !=
/// Parenthesis (, ) for grouping.
/// </summary>
Expand All @@ -41,7 +41,7 @@ internal class FilterExpression
private readonly FilterExpression? _right;

/// <summary>
/// If logical expression is using logical And ('&') operator.
/// If logical expression is using logical And ('&amp;') operator.
/// </summary>
private readonly bool _areJoinedByAnd;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ public interface ITestEngine
/// <param name="requestData">
/// The request data for providing discovery services and data.
/// </param>
/// <param name="testHostManager">Test host manager for the current test discovery.</param>
/// <param name="discoveryCriteria">The discovery criteria.</param>
/// <param name="sourceToSourceDetailMap">Details of every source.</param>
/// <param name="warningLogger">Logger of warnings.</param>
///
/// <returns>An IProxyDiscoveryManager object that can do discovery.</returns>
IProxyDiscoveryManager GetDiscoveryManager(
Expand All @@ -38,7 +39,8 @@ IProxyDiscoveryManager GetDiscoveryManager(
/// <param name="requestData">
/// The request data for providing common execution services and data.
/// </param>
/// <param name="testHostManager">Test host manager for the current test run.</param>
/// <param name="sourceToSourceDetailMap">Details of every source.</param>
/// <param name="warningLogger">Logger of warnings.</param>
/// <param name="testRunCriteria">Test run criteria of the current test run.</param>
///
/// <returns>An IProxyExecutionManager object that can do execution.</returns>
Expand All @@ -59,6 +61,8 @@ IProxyExecutionManager GetExecutionManager(
/// <param name="testSessionCriteria">
/// Test session criteria of the current test session.
/// </param>
/// <param name="sourceToSourceDetailMap">Details of every source.</param>
/// <param name="warningLogger">Logger of warnings.</param>
///
/// <returns>An IProxyTestSessionManager object that can manage test sessions.</returns>
IProxyTestSessionManager? GetTestSessionManager(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal interface IDataCollectorAttachmentsProcessorsFactory
/// <summary>
/// Creates and return a list of available attachments processor
/// </summary>
/// <param name="invokedDataCollector">List of invoked data collectors</param>
/// <param name="invokedDataCollectors">List of invoked data collectors</param>
/// <param name="logger">Message logger</param>
/// <returns>List of attachments processors</returns>
DataCollectorAttachmentProcessor[] Create(InvokedDataCollector[]? invokedDataCollectors, IMessageLogger logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ internal interface ITestRunAttachmentsProcessingManager
/// Processes attachments and provides results through handler
/// </summary>
/// <param name="runSettingsXml">RunSettings</param>
/// <param name="requestData">Data in the request.</param>
/// <param name="attachments">Collection of attachments</param>
/// <param name="invokedDataCollector">Collection of invoked data collectors</param>
/// <param name="eventHandler">EventHandler for handling test run attachments processing event</param>
Expand All @@ -29,6 +30,7 @@ internal interface ITestRunAttachmentsProcessingManager
/// Processes attachments
/// </summary>
/// <param name="runSettingsXml">RunSettings</param>
/// <param name="requestData">Data in the request.</param>
/// <param name="attachments">Collection of attachments</param>
/// <param name="invokedDataCollector">Collection of invoked data collectors</param>
/// <param name="cancellationToken">Cancellation token</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public interface IDiscoveryManager
/// Initializes the discovery manager.
/// </summary>
/// <param name="pathToAdditionalExtensions"> The path to additional extensions. </param>
/// <param name="eventHandler">The discovery handler.</param>
void Initialize(IEnumerable<string> pathToAdditionalExtensions, ITestDiscoveryEventsHandler2? eventHandler);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface IExecutionManager
/// Initializes the execution manager.
/// </summary>
/// <param name="pathToAdditionalExtensions"> The path to additional extensions. </param>
/// <param name="testMessageEventsHandler">Handler of test messages.</param>
void Initialize(IEnumerable<string> pathToAdditionalExtensions, ITestMessageEventHandler? testMessageEventsHandler);

/// <summary>
Expand Down Expand Up @@ -48,12 +49,12 @@ public interface IExecutionManager
/// <summary>
/// Cancel the test execution.
/// </summary>
/// <param name="eventHandler"> EventHandler for handling execution events from Engine. </param>
/// <param name="testRunEventsHandler"> EventHandler for handling execution events from Engine. </param>
void Cancel(IInternalTestRunEventsHandler testRunEventsHandler);

/// <summary>
/// Aborts the test execution.
/// </summary>
/// <param name="eventHandler"> EventHandler for handling execution events from Engine. </param>
/// <param name="testRunEventsHandler"> EventHandler for handling execution events from Engine. </param>
void Abort(IInternalTestRunEventsHandler testRunEventsHandler);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface ITestDiscovererCapabilities
AssemblyType AssemblyType { get; }

/// <summary>
/// <see langword="true"/> if the discoverer plugin is decorated with <see cref="DirectoryBasedTestDiscovererAttribute"/>,
/// <see langword="true"/> if the discoverer plugin is decorated with ObjectDirectoryBasedTestDiscovererAttribute/>,
/// <see langword="false"/> otherwise.
/// </summary>
bool IsDirectoryBased { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public static string GenerateFakesSettingsForRunConfiguration(string[] sources,
/// </summary>
/// <param name="runSettings">runsettings</param>
/// <param name="sources">test sources</param>
/// <param name="framework">version of the framework</param>
/// <returns>true if runSettings was modified; false otherwise.</returns>
private static bool TryAddFakesDataCollectorSettings(
XmlDocument runSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static void UpdateRunSettingsNode(this IRunSettingsProvider runSettingsPr
/// <summary>
/// Matches with test run parameter node pattern and returns that match.
/// </summary>
/// <param name="runSettingsProvider"></param>
/// <param name="_"></param>
/// <param name="node"></param>
/// <returns></returns>
public static Match GetTestRunParameterNodeMatch(this IRunSettingsProvider _, string node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ private static bool GetTreatNoTestsAsError(RunConfiguration? runConfiguration)
/// Gets the test adapters path from the run configuration
/// </summary>
/// <param name="runSettings">Test run settings</param>
/// <param name="returnNullIfNotSet">True to return null, if adapter paths is not set.</param>
/// <returns>Test adapters paths</returns>
public static IEnumerable<string> GetTestAdaptersPaths(string? runSettings)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ internal DataCollectionTestCaseEventHandler(IMessageSink messageSink)
/// <summary>
/// Initializes a new instance of the <see cref="DataCollectionTestCaseEventHandler"/> class.
/// </summary>
/// <param name="messageSink">Sink for messages</param>
/// <param name="communicationManager">Communication manager implementation.</param>
/// <param name="dataCollectionManager">Data collection manager implementation.</param>
/// <param name="dataSerializer">Serializer for serialization and deserialization of the messages.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface IDataCollectionTestCaseEventSender
/// The args containing info about TestResult event.
/// </param>
/// <returns>
/// The <see cref="Collection"/>Collection of TestCase attachments.
/// The <see cref="Collection{T}"/>Collection of TestCase attachments.
/// </returns>
Collection<AttachmentSet>? SendTestCaseEnd(TestCaseEndEventArgs e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public interface ITestRequestHandler : IDisposable
/// <summary>
/// Attach debugger to an already running process.
/// </summary>
/// <param name="pid">Process ID of the process to which the debugger should be attached.</param>
/// <param name="attachDebuggerInfo">Process ID and tfm of the process to which the debugger should be attached.</param>
/// <returns><see langword="true"/> if the debugger was successfully attached to the requested process, <see langword="false"/> otherwise.</returns>
bool AttachDebuggerToProcess(AttachDebuggerInfo attachDebuggerInfo);
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static int GetIntArgFromDict(IDictionary<string, string?> argsDictionary,
/// </summary>
/// <param name="argsDictionary">Dictionary of all arguments Ex: <c>{ "--port":"12312", "--parentprocessid":"2312" }</c></param>
/// <param name="fullname">The full name for required argument. Ex: "--port"</param>
/// <param name="value">The output value.</param>
/// <returns>Value of the argument.</returns>
/// <exception cref="ArgumentException">Thrown if value of an argument is not an integer.</exception>
public static bool TryGetIntArgFromDict(IDictionary<string, string?> argsDictionary, string fullname, out int value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public interface IFileHelper
/// <param name="directoryPath">
/// The directory path.
/// </param>
/// <param name="recursive">If we should delete recursively.</param>
void DeleteDirectory(string directoryPath, bool recursive);

/// <summary>
Expand All @@ -152,7 +153,6 @@ public interface IFileHelper
/// <summary>
/// Get temporary file path
/// </summary>
/// <param name="path"></param>
public string GetTempPath();

/// <summary>
Expand Down
Loading