Skip to content

[Analyzers] Add analyzers for [EnvironmentRestorer] usage in tests #27150

[Analyzers] Add analyzers for [EnvironmentRestorer] usage in tests

[Analyzers] Add analyzers for [EnvironmentRestorer] usage in tests #27150

name: Verify docs/span_metadata.md is updated
on:
pull_request:
workflow_dispatch:
jobs:
verify_span_metadata:
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: global.json
- name: "Regenerate docs/span_metadata.md"
run: .\tracer\build.ps1 GenerateSpanDocumentation
- name: "Verify no changes in docs/span_metadata.md"
run: |
git diff --quiet -- .\docs\span_metadata.md
if ($LASTEXITCODE -eq 1) {
git diff -- .\docs\span_metadata.md
Write-Error "Found changes in docs/span_metadata.md file. Run build task GenerateSpanDocumentation to regenerate the file with the latest C# rules."
Exit 1
} else {
echo "No changes found to docs/span_metadata.md file"
}