Skip to content

Conversation

@satano
Copy link
Collaborator

@satano satano commented Nov 20, 2024

This fixes most of the code warnings that are in the codebase. There is a separate commit for every warning type.

There still are 4 instances of warning CS0649 Field '…' is never assigned to, and will always have its default value null:

  • PauseAfterEachItem._Options
  • KeepOutboundLinkTargetProcessor._options
  • OutboundLinkCheckingProcessor._options
  • TfsWorkItemOverwriteAreasAsTagsProcessor._config

As the warning states, these are fields which are declared, but are never set ad hence the value is null. The problem is, I cannot remove these fileds, because they are used in code. So I believe, that those classes (or at least those specific code paths) are not used at all, because it would fail with NullReferenceException. The only possibility is, that the values are set somewhere by reflection? So I will leave these warnings to someone else to look at them.

…headers. IDictionary.Add will throw an ArgumentException when attempting to add a duplicate key.
…ember '...'. Add the Obsolete attribute to '...'.
…nously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
…den member (possibly because of nullability attributes).
… dependency. Either modify the version spec of dependency "OpenTelemetry.Instrumentation.Process [0.5.0-beta.7, )" or update the version field in the nuspec.
@MrHinsh MrHinsh merged commit a766b79 into nkdAgility:main Nov 20, 2024
@satano satano deleted the fixWarnings branch November 20, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants