Skip to content

Commit 488a124

Browse files
authored
chore: Miscellaneous code cleanup, build warning change (#3428)
1 parent b0866b3 commit 488a124

56 files changed

Lines changed: 788 additions & 776 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ charset = utf-8 # supposed to get rid of the BOM issue
2222
dotnet_sort_system_directives_first = true
2323
dotnet_separate_import_directive_groups = false
2424

25+
# save for later, only enabled for the `src` folder now
26+
# IDE0005: Using directive is unnecessary
27+
#dotnet_diagnostic.IDE0005.severity = warning
28+
# CS1591: Missing XML comment for publicly visible type or member
29+
#dotnet_diagnostic.CS1591.severity = none
30+
2531
# this. preferences
2632
dotnet_style_qualification_for_field = false:silent
2733
dotnet_style_qualification_for_property = false:silent

Directory.Build.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<LangVersion>default</LangVersion>
44
<RootProjectDirectory>$(MSBuildThisFileDirectory)</RootProjectDirectory>
55
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
6-
<!-- Disable SDK’s pruning of (apparently) unused PackageReferences -->
6+
<!-- Disable SDK’s pruning of (apparently) unused PackageReferences -->
77
<RestoreEnablePackagePruning>false</RestoreEnablePackagePruning>
8+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
9+
<!-- save for later <GenerateDocumentationFile>true</GenerateDocumentationFile>-->
810
</PropertyGroup>
911
</Project>

src/.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[*.{cs,vb}]
2+
3+
# IDE0005: Using directive is unnecessary
4+
dotnet_diagnostic.IDE0005.severity = warning
5+
# CS1591: Missing XML comment for publicly visible type or member
6+
dotnet_diagnostic.CS1591.severity = none

src/Agent/NewRelic/Agent/Core/AgentHealth/HealthCheck.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class HealthCheck
2020
/// <summary>
2121
/// Set the health status of the agent, but only update changed values.
2222
/// </summary>
23-
/// <param name="healthy"></param>
2423
/// <param name="healthStatus"></param>
2524
/// <param name="statusParams"></param>
2625
public void TrySetHealth((bool IsHealthy, string Code, string Status) healthStatus, params string[] statusParams)

src/Agent/NewRelic/Agent/Core/AgentManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ private void StopServices()
371371
/// <param name="argumentSignature"></param>
372372
/// <param name="invocationTarget"></param>
373373
/// <param name="arguments"></param>
374+
/// <param name="functionId"></param>
374375
/// <returns>Returns an ITracer, although it is given as the much simpler Object;
375376
/// an Object is the preferred type because it has a trival type signature.</returns>
376377
public ITracer GetTracerImpl(string tracerFactoryName, uint tracerArguments, string metricName, string assemblyName, Type type, string typeName, string methodName, string argumentSignature, object invocationTarget, object[] arguments, ulong functionId)

src/Agent/NewRelic/Agent/Core/AgentShim.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ public static Action<object, Exception> GetFinishTracerDelegate(
157157
/// <param name="argumentSignature"></param>
158158
/// <param name="invocationTarget"></param>
159159
/// <param name="args"></param>
160+
/// <param name="functionId"></param>
160161
/// <returns></returns>
161-
/// <returns>Returns an Action<object, Exception> delegate which invokes ITracer.Finish.
162+
/// <returns>Returns an Action&lt;object, Exception&gt; delegate which invokes ITracer.Finish.
162163
/// We can directly invoke this delegate instead of using reflection. Null should never be returned.</returns>
163164
/// <exception cref="System.ArgumentNullException"> thrown if any one of <paramref name="assemblyName"/>, <paramref name="type"/>,
164165
/// <paramref name="typeName"/>, <paramref name="methodName"/>, <paramref name="argumentSignature"/> or <paramref name="args"/> is null.

src/Agent/NewRelic/Agent/Core/Aggregators/MetricStatsCollectionQueue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public bool MergeMetrics(IAllMetricStatsCollection metrics)
5151
/// wait for us to finish before fetching/replacing the entire queue
5252
/// </summary>
5353
/// <param name="statsCollectionQueue"></param>
54-
/// <param name="metric"></param>
54+
/// <param name="metrics"></param>
5555
private void AddMetricsToCollection(ConcurrentQueue<MetricStatsCollection> statsCollectionQueue, IAllMetricStatsCollection metrics)
5656
{
5757
MetricStatsCollection statsCollectionToMergeWith = null;

src/Agent/NewRelic/Agent/Core/Api/AgentApi.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ public static string GetBrowserTimingHeader(string nonce)
534534
/// Obsolete method that used to return the html snippet to be inserted into the footer of html pages as part of Real User Monitoring.
535535
/// Now only returns and empty string.
536536
/// Supports web applications only.
537+
/// </summary>
537538
/// <returns>An empty string.</returns>
538539
[Obsolete("This method does nothing in version 9.x+ of the Agent.")]
539540
public static string GetBrowserTimingFooter()

src/Agent/NewRelic/Agent/Core/Api/AgentApiImplementation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ private void AddUserAttributeToCurrentTransaction(string key, object value)
442442

443443
/// <summary> Set the name of the current transaction. Supports web applications only. </summary>
444444
///
445-
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="key"/> is null. </exception>
445+
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="name"/> is null. </exception>
446446
///
447447
/// <param name="category"> The category of this transaction, used to distinguish different types
448448
/// of transactions. Only the first 1000 characters are retained. If null is passed, the

src/Agent/NewRelic/Agent/Core/Attributes/AttributeDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public AttributeDefinition(string name, AttributeClassification classification,
397397
///
398398
/// </summary>
399399
/// <param name="collection"></param>
400-
/// <param name="getValFx">Function in users code to obtain the value. Wrapped in a delegate
400+
/// <param name="getInputValFx">Function in users code to obtain the value. Wrapped in a delegate
401401
/// so as to not run if it is deemed not necessary</param>
402402
/// <returns>true if the value was set</returns>
403403
public bool TrySetValue(IAttributeValueCollection collection, Func<TInput> getInputValFx)

0 commit comments

Comments
 (0)