Skip to content

[shared] Use nameof for CallerArgumentExpression in Guard helpers - #5917

Merged
CodeBlanch merged 1 commit into
open-telemetry:mainfrom
WeihanLi:patch-1
Oct 23, 2024
Merged

CodeBlanch merged 1 commit into
open-telemetry:mainfrom
WeihanLi:patch-1

Conversation

@WeihanLi

Copy link
Copy Markdown
Contributor

Changes

use nameof for CallerArgumentExpression for better maintainability

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@WeihanLi
WeihanLi requested a review from a team as a code owner October 22, 2024 23:52
@reyang

reyang commented Oct 23, 2024

Copy link
Copy Markdown
Member

Thanks @WeihanLi! Not sure why this was missed in the first place.
@Kielek FYI as the file has a copy in the contrib repo https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/Shared/Guard.cs.

@codecov

codecov Bot commented Oct 23, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.48%. Comparing base (6250307) to head (81eccc3).
Report is 358 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5917      +/-   ##
==========================================
+ Coverage   83.38%   86.48%   +3.10%     
==========================================
  Files         297      258      -39     
  Lines       12531    11345    -1186     
==========================================
- Hits        10449     9812     -637     
+ Misses       2082     1533     -549     
Flag Coverage Δ
unittests ?
unittests-Project-Experimental 86.35% <ø> (?)
unittests-Project-Stable 86.28% <ø> (?)
unittests-Solution 86.47% <ø> (?)
unittests-UnstableCoreLibraries-Experimental 85.78% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 238 files with indirect coverage changes

@CodeBlanch CodeBlanch changed the title use nameof for CallerArgumentExpression [shared] Use nameof for CallerArgumentExpression in Guard helpers Oct 23, 2024
@CodeBlanch
CodeBlanch merged commit 5dff99f into open-telemetry:main Oct 23, 2024
@WeihanLi
WeihanLi deleted the patch-1 branch October 23, 2024 03:35
@Kielek

Kielek commented Oct 23, 2024

Copy link
Copy Markdown
Member

@reyang, it was not found, because <AnalysisLevel>latest-All</AnalysisLevel> is not enabled yet globally. There is more changes to do to make the analyzers happy. Not all of them are trivial :- )

Ref: #3958 (comment)

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.

4 participants