Azure / Azure/azure-functions-dotnet-worker

Pin analyzer rules link in Sdk README to release tag at pack time

Open
#3,375 1 comment 1 reaction 0 assignees View on GitHub
area: sdk
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

## Context

In #3370, the Sdk package README was updated to link to the [analyzer rules index](https://github.com/Azure/azure-functions-dotnet-worker/blob/main/docs/analyzer-rules/index.md) using a `blob/main/` URL. As @jviau [pointed out](https://github.com/Azure/azure-functions-dotnet-worker/pull/3370#discussion_r3102086186), this link can drift over time — a shipped SDK version may reference analyzer rules that were added after that version was released (or vice versa).

## Proposal

Rewrite `blob/main/` URLs in the README to `blob//` at pack time so the link is a permalink matching the exact release. Two approaches discussed:

1. **MSBuild target before `GenerateNuspec`** — rewrite URLs in a temp copy of the README. There is existing URL rewriting in `RepositoryInfo.targets` for SourceLink that could serve as a pattern.
2. **`sed` replacement in the CI pipeline** — simpler, but only works in CI, not `dotnet pack` locally.

Option 1 would be preferred since it works in both CI and local pack.

## Related

- #3370 — PR where this was discussed
- #3357 — original package README PR

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with RepositoryInfo.targets, where existing SourceLink URL rewriting is mentioned, and trace the GenerateNuspec target used by dotnet pack. Check how the SDK README is included and compare local packing with CI packaging. Done means the analyzer-rules link is rewritten to the exact release tag or SHA in both local and CI-generated packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
build-system, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.