Skip to content

Commit 0fc46f5

Browse files
committed
C#: Fix compiler warnings related to errors in XML comments.
1 parent 3580982 commit 0fc46f5

File tree

21 files changed

+52
-64
lines changed

21 files changed

+52
-64
lines changed

csharp/autobuilder/Semmle.Autobuild.CSharp/AutoBuildRule.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ public BuildScript Analyse(IAutobuilder<CSharpAutobuildOptions> builder, bool au
4949
tryCleanExtractorArgsLogs &
5050
BuildScript.DeleteFile(Extractor.GetCSharpLogPath());
5151

52-
/// <summary>
53-
/// Execute script `s` and check that the C# extractor has been executed.
54-
/// If either fails, attempt to cleanup any artifacts produced by the extractor,
55-
/// and exit with code 1, in order to proceed to the next attempt.
56-
/// </summary>
52+
// Execute script `s` and check that the C# extractor has been executed.
53+
// If either fails, attempt to cleanup any artifacts produced by the extractor,
54+
// and exit with code 1, in order to proceed to the next attempt.
5755
BuildScript IntermediateAttempt(BuildScript s) =>
5856
(s & this.autobuilder.CheckExtractorRun(false)) |
5957
(attemptExtractorCleanup & BuildScript.Failure);

csharp/autobuilder/Semmle.Autobuild.Shared/Autobuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ protected Autobuilder(IBuildActions actions, TAutobuildOptions options, Diagnost
195195
}
196196

197197
/// <summary>
198-
/// Retrieves the value of an environment variable named <paramref name="name"> or throws
198+
/// Retrieves the value of an environment variable named <paramref name="name"/> or throws
199199
/// an exception if no such environment variable has been set.
200200
/// </summary>
201201
/// <param name="name">The name of the environment variable.</param>
@@ -228,7 +228,7 @@ protected string RequireEnvironmentVariable(string name)
228228
private readonly IDiagnosticsWriter diagnostics;
229229

230230
/// <summary>
231-
/// Makes <see cref="path" /> relative to the root source directory.
231+
/// Makes <paramref name="path"/> relative to the root source directory.
232232
/// </summary>
233233
/// <param name="path">The path which to make relative.</param>
234234
/// <returns>The relative path.</returns>

csharp/autobuilder/Semmle.Autobuild.Shared/MarkdownUtil.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class MarkdownUtil
2222
public static string ToMarkdownLink(this string link, string title) => $"[{title}]({link})";
2323

2424
/// <summary>
25-
/// Renders <see cref="projects" /> as a markdown list of the project paths.
25+
/// Renders <paramref name="projects"/> as a markdown list of the project paths.
2626
/// </summary>
2727
/// <param name="projects">
2828
/// The list of projects whose paths should be rendered as a markdown list.
@@ -35,7 +35,7 @@ public static string ToMarkdownList(this IEnumerable<IProjectOrSolution> project
3535
}
3636

3737
/// <summary>
38-
/// Renders <see cref="items" /> as a markdown list.
38+
/// Renders <paramref name="items" /> as a markdown list.
3939
/// </summary>
4040
/// <typeparam name="T">The item type.</typeparam>
4141
/// <param name="items">The list that should be formatted as a markdown list.</param>

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/Assets.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,21 @@ private void AddPackageDependencies(JObject json, string jsonPath)
127127
///
128128
/// Example:
129129
/// "project": {
130-
// "version": "1.0.0",
131-
// "frameworks": {
132-
// "net7.0": {
133-
// "frameworkReferences": {
134-
// "Microsoft.AspNetCore.App": {
135-
// "privateAssets": "none"
136-
// },
137-
// "Microsoft.NETCore.App": {
138-
// "privateAssets": "all"
139-
// }
140-
// }
141-
// }
142-
// }
143-
// }
144-
//
130+
/// "version": "1.0.0",
131+
/// "frameworks": {
132+
/// "net7.0": {
133+
/// "frameworkReferences": {
134+
/// "Microsoft.AspNetCore.App": {
135+
/// "privateAssets": "none"
136+
/// },
137+
/// "Microsoft.NETCore.App": {
138+
/// "privateAssets": "all"
139+
/// }
140+
/// }
141+
/// }
142+
/// }
143+
/// }
144+
///
145145
/// Adds the following dependencies
146146
/// Paths: {
147147
/// "microsoft.aspnetcore.app.ref",

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNetVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private string FullVersion
2727
* This is the same as FullPath, except that we assume that the
2828
* reference assemblies are in a directory called "packs" and
2929
* the reference assemblies themselves are in a directory called
30-
* "<Framework>.Ref/ref".
30+
* "[Framework].Ref/ref".
3131
* Example:
3232
* FullPath: /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.2
3333
* FullPathReferenceAssemblies: /usr/share/dotnet/packs/Microsoft.NETCore.App.Ref/7.0.2/ref

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FileContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public HashSet<PackageReference> AllPackages
3838
/// True if any file in the source directory indicates that ASP.NET Core is used.
3939
/// The following heuristic is used to decide, if ASP.NET Core is used:
4040
/// If any file in the source directory contains something like (this will most like be a .csproj file)
41-
/// <Project Sdk="Microsoft.NET.Sdk.Web">
42-
/// <FrameworkReference Include="Microsoft.AspNetCore.App"/>
41+
/// &lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
42+
/// &lt;FrameworkReference Include="Microsoft.AspNetCore.App"/&gt;
4343
/// </summary>
4444
public bool UseAspNetCoreDlls
4545
{

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/IDotNetCliInvoker.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ internal interface IDotNetCliInvoker
1010
string Exec { get; }
1111

1212
/// <summary>
13-
/// Execute `dotnet <args>` and return true if the command succeeded, otherwise false.
13+
/// Execute `dotnet <paramref name="args"/>` and return true if the command succeeded, otherwise false.
1414
/// If `silent` is true the output of the command is logged as `debug` otherwise as `info`.
1515
/// </summary>
1616
bool RunCommand(string args, bool silent = true);
1717

1818
/// <summary>
19-
/// Execute `dotnet <args>` and return true if the command succeeded, otherwise false.
19+
/// Execute `dotnet <paramref name="args"/>` and return true if the command succeeded, otherwise false.
2020
/// The output of the command is returned in `output`.
2121
/// If `silent` is true the output of the command is logged as `debug` otherwise as `info`.
2222
/// </summary>
2323
bool RunCommand(string args, out IList<string> output, bool silent = true);
2424

2525
/// <summary>
26-
/// Execute `dotnet <args>` in `<workingDirectory>` and return true if the command succeeded, otherwise false.
26+
/// Execute `dotnet <paramref name="args"/>` in `<paramref name="workingDirectory"/>` and return true if the command succeeded, otherwise false.
2727
/// The output of the command is returned in `output`.
2828
/// If `silent` is true the output of the command is logged as `debug` otherwise as `info`.
2929
/// </summary>

csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ bool IdDependsOnImpl(ITypeSymbol? type)
133133

134134
/// <summary>
135135
/// Constructs a unique string for this type symbol.
136-
///
137-
/// The supplied action <paramref name="subTermAction"/> is applied to the
138-
/// syntactic sub terms of this type (if any).
139136
/// </summary>
140137
/// <param name="cx">The extraction context.</param>
141138
/// <param name="trapFile">The trap builder used to store the result.</param>
@@ -495,31 +492,31 @@ public static bool IsReallyUnbound(this INamedTypeSymbol type) =>
495492

496493
/// <summary>
497494
/// Holds if this type is of the form <code>int?</code> or
498-
/// <code>System.Nullable<int></code>.
495+
/// <code>System.Nullable&lt;int&gt;</code>.
499496
/// </summary>
500497
public static bool IsBoundNullable(this ITypeSymbol type) =>
501498
type.SpecialType == SpecialType.None && type.OriginalDefinition.IsUnboundNullable();
502499

503500
/// <summary>
504-
/// Holds if this type is <code>System.Nullable<T></code>.
501+
/// Holds if this type is <code>System.Nullable&lt;T&gt;</code>.
505502
/// </summary>
506503
public static bool IsUnboundNullable(this ITypeSymbol type) =>
507504
type.SpecialType == SpecialType.System_Nullable_T;
508505

509506
/// <summary>
510-
/// Holds if this type is <code>System.Span<T></code>.
507+
/// Holds if this type is <code>System.Span&lt;T&gt;</code>.
511508
/// </summary>
512509
public static bool IsUnboundSpan(this ITypeSymbol type) =>
513510
type.ToString() == "System.Span<T>";
514511

515512
/// <summary>
516-
/// Holds if this type is of the form <code>System.Span<byte></code>.
513+
/// Holds if this type is of the form <code>System.Span&lt;byte&gt;</code>.
517514
/// </summary>
518515
public static bool IsBoundSpan(this ITypeSymbol type) =>
519516
type.SpecialType == SpecialType.None && type.OriginalDefinition.IsUnboundSpan();
520517

521518
/// <summary>
522-
/// Holds if this type is <code>System.ReadOnlySpan<T></code>.
519+
/// Holds if this type is <code>System.ReadOnlySpan&lt;T&gt;</code>.
523520
/// </summary>
524521
public static bool IsUnboundReadOnlySpan(this ITypeSymbol type) =>
525522
type.ToString() == "System.ReadOnlySpan<T>";
@@ -536,7 +533,7 @@ attribute.AttributeClass is INamedTypeSymbol nt &&
536533
}
537534

538535
/// <summary>
539-
/// Holds if this type is of the form <code>System.ReadOnlySpan<byte></code>.
536+
/// Holds if this type is of the form <code>System.ReadOnlySpan&lt;byte&gt;</code>.
540537
/// </summary>
541538
public static bool IsBoundReadOnlySpan(this ITypeSymbol type) =>
542539
type.SpecialType == SpecialType.None && type.OriginalDefinition.IsUnboundReadOnlySpan();

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Semmle.Extraction.CSharp.Entities
77
/// <summary>
88
/// A cached entity.
99
///
10-
/// The <see cref="Entity.Id"/> property is used as label in caching.
10+
/// The <see cref="Entity.Label"/> property is used as label in caching.
1111
/// </summary>
1212
public abstract class CachedEntity : LabelledEntity
1313
{

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/IEntity.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ namespace Semmle.Extraction.CSharp
99
/// Entities are divided into two types: normal entities and cached
1010
/// entities.
1111
///
12-
/// Normal entities implement <see cref="FreshEntity"/> directly, and they
12+
/// Normal entities implement <see cref="Entities.FreshEntity"/> directly, and they
1313
/// (may) emit contents to the trap file during object construction.
1414
///
15-
/// Cached entities implement <see cref="CachedEntity"/>, and they
16-
/// emit contents to the trap file when <see cref="CachedEntity.Populate"/>
17-
/// is called. Caching prevents <see cref="CachedEntity.Populate"/>
15+
/// Cached entities implement <see cref="Entities.CachedEntity"/>, and they
16+
/// emit contents to the trap file when <see cref="Entities.CachedEntity.Populate"/>
17+
/// is called. Caching prevents <see cref="Entities.CachedEntity.Populate"/>
1818
/// from being called on entities that have already been emitted.
1919
/// </summary>
2020
public interface IEntity

0 commit comments

Comments
 (0)