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

CA1200: Avoid using cref tags with a prefix #7194

Merged
merged 16 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from 9 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
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<Rule Id="CA1068" Action="None" /> <!-- CancellationToken parameters must come last -->
<Rule Id="CA1069" Action="None" /> <!-- Enums values should not be duplicated -->
<Rule Id="CA1070" Action="Info" /> <!-- Do not declare event fields as virtual -->
<Rule Id="CA1200" Action="Info" /> <!-- Avoid using cref tags with a prefix -->
<Rule Id="CA1200" Action="Warning" /> <!-- Avoid using cref tags with a prefix -->
<Rule Id="CA1303" Action="None" /> <!-- Do not pass literals as localized parameters -->
<Rule Id="CA1304" Action="None" /> <!-- Specify CultureInfo -->
<Rule Id="CA1305" Action="None" /> <!-- Specify IFormatProvider -->
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Collections/RetrievableEntryHashSet/HashSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Microsoft.Build.Collections
{
/// <summary>
/// Implementation notes:
/// This uses an array-based implementation similar to <see cref="T:Dictionary{T}" />, using a buckets array
/// This uses an array-based implementation similar to <see cref="Dictionary{TKey, TValue}" />, using a buckets array
/// to map hash values to the Slots array. Items in the Slots array that hash to the same value
/// are chained together through the "next" indices.
///
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectElementContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public void RemoveChild(ProjectElement child)
/// </summary>
/// <remarks>
/// It is safe to modify the children in this way
/// during enumeration. See <see cref="M:Microsoft.Build.Construction.ProjectElementContainer.RemoveChild(Microsoft.Build.Construction.ProjectElement)" />.
/// during enumeration. See <see cref="ProjectElementContainer.RemoveChild(ProjectElement)"/>.
/// </remarks>
public void RemoveAllChildren()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Definition/ProjectCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public static ProjectCollection GlobalProjectCollection
/// This is the Windows file version (specifically the value of the FileVersion
/// resource), not necessarily the assembly version.
/// If you want the assembly version, use Constants.AssemblyVersion.
/// This is not the <see cref="P:Microsoft.Build.BuildEngine.ToolsetCollection.ToolsVersions*">ToolsetCollection.ToolsVersions</see>.
/// This is not a <see cref="Toolset"/>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the modern equivalent:

Suggested change
/// This is not a <see cref="Toolset"/>.
/// This is not the <see cref="Toolset.ToolsVersion"/>.

/// </remarks>
public static Version Version
{
Expand Down
4 changes: 2 additions & 2 deletions src/Build/Graph/ProjectGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public ProjectGraph(
/// on <see cref="ProjectInstanceFactoryFunc" /> for other scenarios.
/// </param>
/// <param name="cancellationToken">
/// The <see cref="T:System.Threading.CancellationToken" /> token to observe.
/// The <see cref="CancellationToken"/> to observe.
/// </param>
/// <exception cref="InvalidProjectFileException">
/// If the evaluation of any project in the graph fails
Expand Down Expand Up @@ -395,7 +395,7 @@ public ProjectGraph(
/// Number of threads to participate in building the project graph.
/// </param>
/// <param name="cancellationToken">
/// The <see cref="T:System.Threading.CancellationToken" /> token to observe.
/// The <see cref="CancellationToken"/> to observe.
/// </param>
/// <exception cref="InvalidProjectFileException">
/// If the evaluation of any project in the graph fails
Expand Down
9 changes: 5 additions & 4 deletions src/Build/Logging/BinaryLogger/BuildEventArgsReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public class BuildEventArgsReader : IDisposable
typeof(BuildEventArgs).GetField("senderName", BindingFlags.Instance | BindingFlags.NonPublic);

/// <summary>
/// Initializes a new instance of <see cref="T:Microsoft.Build.Logging.BuildEventArgsReader"/> using a <see cref="T:System.IO.BinaryReader"/> instance.
/// Initializes a new instance of <see cref="BuildEventArgsReader"/> using a <see cref="BinaryReader"/> instance.
/// </summary>
/// <param name="binaryReader">The <see cref="T:System.IO.BinaryReader"/> to read <see cref="T:Microsoft.Build.Framework.BuildEventArgs"/> from.</param>
/// <param name="binaryReader">The <see cref="BinaryReader"/> to read <see cref="BuildEventArgs"/> from.</param>
/// <param name="fileFormatVersion">The file format version of the log file being read.</param>
public BuildEventArgsReader(BinaryReader binaryReader, int fileFormatVersion)
{
Expand All @@ -79,10 +79,11 @@ public void Dispose()
internal event Action<BinaryLogRecordKind, byte[]> OnBlobRead;

/// <summary>
/// Reads the next log record from the <see cref="T:System.IO.BinaryReader"/>.
/// Reads the next log record from the <see cref="BinaryReader"/>.
/// </summary>
/// <returns>
/// The next <see cref="T:Microsoft.Build.Framework.BuildEventArgs" />. If there are no more records, returns <see langword="null" />.
/// The next <see cref="BuildEventArgs"/>.
/// If there are no more records, returns <see langword="null"/>.
/// </returns>
public BuildEventArgs Read()
{
Expand Down
11 changes: 4 additions & 7 deletions src/Framework/Sdk/SdkResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ public abstract class SdkResolver
/// <param name="factory">Factory class to create an <see cref="SdkResult" /></param>
/// <returns>
/// An <see cref="SdkResult" /> containing the resolved SDKs or associated error / reason
/// the SDK could not be resolved. Return <code>null</code> if the resolver is not
/// the SDK could not be resolved. Return <see langword="null"/> if the resolver is not
/// applicable for a particular <see cref="SdkReference"/>.
/// </returns>
/// <remarks><format type="text/markdown"><![CDATA[
/// ## Remarks
/// > [!NOTE]
/// > You must use the <xref:Microsoft.Build.Framework.SdkResultFactory> to return a result.
/// ]]></format>
/// </remarks>
/// <remarks>
/// Note: You must use <see cref="SdkResultFactory"/> to return a result.
/// </remarks>
///
public abstract SdkResult Resolve(SdkReference sdkReference, SdkResolverContext resolverContext,
SdkResultFactory factory);
Expand Down
7 changes: 2 additions & 5 deletions src/Tasks/Hash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ namespace Microsoft.Build.Tasks
/// Generates a hash of a given ItemGroup items. Metadata is not considered in the hash.
/// </summary>
/// <remarks>
/// <format type="text/markdown"><![CDATA[
/// ## Remarks
/// Currently uses SHA1. The implementation is subject to change between MSBuild versions.
/// This class is not intended as a cryptographic security measure, only for uniqueness between build executions.
/// ]]></format>
/// Currently uses SHA1. Implementation subject to change between MSBuild versions.
/// This class is not intended as a cryptographic security measure, only uniqueness between build executions.
/// </remarks>
public class Hash : TaskExtension
{
Expand Down