Skip to content

Commit 732bcf6

Browse files
authored
Enable rule SA1648 (#2057)
* Enable rule SA1648 * Fix errors * Fix error * Add full stop to the documentation.
1 parent d8cd207 commit 732bcf6

17 files changed

+73
-28
lines changed

lib/PuppeteerSharp.ruleset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<Rule Id="SA1518" Action="None" /> <!-- Error SA1518: File is required to end with a single newline character (SA1518)-->
3838
<Rule Id="SA1012" Action="Error" /> <!-- Error SA1012: Opening brace should be followed by a space. (SA1012) -->
3939
<Rule Id="SA1512" Action="Error" /> <!-- Error SA1502: Element should not be on a single line (SA1502) -->
40-
<Rule Id="SA1648" Action="None" /> <!-- Error SA1648: inheritdoc should be used with inheriting class (SA1648) -->
40+
<Rule Id="SA1648" Action="Error" /> <!-- Error SA1648: inheritdoc should be used with inheriting class (SA1648) -->
4141
<Rule Id="SA1616" Action="Error" /> <!-- Error SA1616: Element return value documentation should have text (SA1616)-->
4242
<Rule Id="SA1627" Action="Error" /> <!-- Error SA1627: The documentation text within the \'exception\' tag should not be empty. (SA1627)-->
4343
<Rule Id="SA1643" Action="Error" /> <!-- Error SA1643: Destructor summary documentation should begin with standard text (SA1643) -->

lib/PuppeteerSharp/Browser.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ internal static async Task<Browser> CreateAsync(
241241
return browser;
242242
}
243243

244-
/// <inheritdoc/>
245244
internal IEnumerable<string> GetCustomQueryHandlerNames()
246245
=> CustomQueriesManager.GetCustomQueryHandlerNames();
247246

lib/PuppeteerSharp/BrowserContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ internal BrowserContext(Connection connection, Browser browser, string contextId
3333
/// <inheritdoc/>
3434
public bool IsIncognito => Id != null;
3535

36-
/// <inheritdoc/>
36+
/// <inheritdoc cref="Browser"/>
3737
public Browser Browser { get; }
3838

3939
/// <inheritdoc/>

lib/PuppeteerSharp/BrowserFetcher.cs

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ namespace PuppeteerSharp
2020
/// <inheritdoc/>
2121
public class BrowserFetcher : IBrowserFetcher
2222
{
23-
/// <inheritdoc/>
23+
/// <summary>
24+
/// Default chromium revision.
25+
/// </summary>
2426
public const string DefaultChromiumRevision = "970485";
2527

2628
private static readonly Dictionary<Product, string> _hosts = new Dictionary<Product, string>
@@ -45,7 +47,7 @@ public class BrowserFetcher : IBrowserFetcher
4547
private readonly CustomFileDownloadAction _customFileDownload;
4648
private bool _isDisposed;
4749

48-
/// <inheritdoc/>
50+
/// <inheritdoc cref="BrowserFetcher"/>
4951
public BrowserFetcher()
5052
{
5153
DownloadsFolder = Path.Combine(GetExecutablePath(), ".local-chromium");
@@ -55,12 +57,12 @@ public BrowserFetcher()
5557
_customFileDownload = _webClient.DownloadFileTaskAsync;
5658
}
5759

58-
/// <inheritdoc/>
60+
/// <inheritdoc cref="BrowserFetcher"/>
5961
public BrowserFetcher(Product product) : this(new BrowserFetcherOptions { Product = product })
6062
{
6163
}
6264

63-
/// <inheritdoc/>
65+
/// <inheritdoc cref="BrowserFetcher"/>
6466
public BrowserFetcher(BrowserFetcherOptions options)
6567
{
6668
if (options == null)
@@ -102,7 +104,15 @@ public IWebProxy WebProxy
102104
set => _webClient.Proxy = value;
103105
}
104106

105-
/// <inheritdoc/>
107+
/// <summary>
108+
/// Get executable path.
109+
/// </summary>
110+
/// <param name="product"><see cref="Product"/>.</param>
111+
/// <param name="platform"><see cref="Platform"/>.</param>
112+
/// <param name="revision">chromium revision.</param>
113+
/// <param name="folderPath">folder path.</param>
114+
/// <returns>executable path.</returns>
115+
/// <exception cref="ArgumentException">For not supported <see cref="Platform"/>.</exception>
106116
public static string GetExecutablePath(Product product, Platform platform, string revision, string folderPath)
107117
{
108118
if (product == Product.Chrome)
@@ -347,7 +357,10 @@ internal static string GetExecutablePath()
347357
return assemblyDirectory.FullName;
348358
}
349359

350-
/// <inheritdoc/>
360+
/// <summary>
361+
/// Dispose <see cref="WebClient"/>.
362+
/// </summary>
363+
/// <param name="disposing">Indicates whether disposal was initiated by <see cref="Dispose()"/> operation.</param>
351364
protected virtual void Dispose(bool disposing)
352365
{
353366
if (_isDisposed)

lib/PuppeteerSharp/CDPSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ internal CDPSession(Connection connection, TargetType targetType, string session
4646
/// <inheritdoc/>
4747
public ILoggerFactory LoggerFactory => Connection.LoggerFactory;
4848

49-
/// <inheritdoc/>
49+
/// <inheritdoc cref="Connection"/>
5050
internal Connection Connection { get; private set; }
5151

5252
/// <inheritdoc/>

lib/PuppeteerSharp/ConsoleMessageLocation.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ public class ConsoleMessageLocation : IEquatable<ConsoleMessageLocation>
2323
/// </summary>
2424
public int? ColumnNumber { get; set; }
2525

26-
/// <inheritdoc/>
26+
/// <summary>Overriding == operator for <see cref="ConsoleMessageLocation"/>.</summary>
27+
/// <param name="location1">the value to compare against <paramref name="location2" />.</param>
28+
/// <param name="location2">the value to compare against <paramref name="location1" />.</param>
29+
/// <returns><c>true</c> if the two instances are equal to the same value.</returns>
2730
public static bool operator ==(ConsoleMessageLocation location1, ConsoleMessageLocation location2)
2831
=> EqualityComparer<ConsoleMessageLocation>.Default.Equals(location1, location2);
2932

30-
/// <inheritdoc/>
33+
/// <summary>Overriding != operator for <see cref="ConsoleMessageLocation"/>.</summary>
34+
/// <param name="location1">the value to compare against <paramref name="location2" />.</param>
35+
/// <param name="location2">the value to compare against <paramref name="location1" />.</param>
36+
/// <returns><c>true</c> if the two instances are not equal to the same value.</returns>
3137
public static bool operator !=(ConsoleMessageLocation location1, ConsoleMessageLocation location2)
3238
=> !(location1 == location2);
3339

lib/PuppeteerSharp/ElementHandle.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,11 @@ public async Task<BoxModelPoint> ClickablePointAsync(Offset? offset = null)
546546
};
547547
}
548548

549-
/// <inheritdoc/>
549+
/// <summary>
550+
/// Scroll into view if needed.
551+
/// </summary>
552+
/// <returns><see cref="Task"/>.</returns>
553+
/// <exception cref="PuppeteerException">Puppeteer exception.</exception>
550554
public async Task ScrollIntoViewIfNeededAsync()
551555
{
552556
var errorMessage = await EvaluateFunctionAsync<string>(

lib/PuppeteerSharp/Input/Mouse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class Mouse : IMouse
1313
private decimal _y = 0;
1414
private MouseButton _button = MouseButton.None;
1515

16-
/// <inheritdoc/>
16+
/// <inheritdoc cref="Mouse"/>
1717
public Mouse(CDPSession client, Keyboard keyboard)
1818
{
1919
_client = client;

lib/PuppeteerSharp/Input/Touchscreen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Touchscreen : ITouchscreen
1010
private readonly CDPSession _client;
1111
private readonly Keyboard _keyboard;
1212

13-
/// <inheritdoc/>
13+
/// <inheritdoc cref="Touchscreen"/>
1414
public Touchscreen(CDPSession client, Keyboard keyboard)
1515
{
1616
_client = client;

lib/PuppeteerSharp/JSHandle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal JSHandle(ExecutionContext context, CDPSession client, RemoteObject remo
2121
RemoteObject = remoteObject;
2222
}
2323

24-
/// <inheritdoc/>
24+
/// <inheritdoc cref="ExecutionContext"/>
2525
public ExecutionContext ExecutionContext { get; }
2626

2727
/// <inheritdoc/>

0 commit comments

Comments
 (0)