dotnet / roslyn-analyzers

MIT License
1.58k stars 463 forks source link

Enhance documentation files for IDs associated with multiple rules #4808

Open Youssef1313 opened 3 years ago

Youssef1313 commented 3 years ago

See #4798, which adds a new rule with an existing id.

The documentation files only have one rule as shown in diff:

image

FYI @sharwell

sharwell commented 3 years ago

which adds a new rule with an existing id

It's still the same rule. The part that changed is adding a description for why it applies in a specific situation. The documentation file was also incorrect before this change.

Youssef1313 commented 3 years ago

@sharwell Yeah I see now it was already incorrect. But aren't the following considered different rules (which are existing prior your PR):

https://github.com/sharwell/roslyn-analyzers/blob/14703b1a232f71b79b3a9c895b9d14747eba0173/src/Roslyn.Diagnostics.Analyzers/Core/AbstractDoNotCopyValue.cs#L50-L70

Or that's not the correct terminology?

mavasani commented 3 years ago

We need one of the two things:

  1. Ability to pick a descriptor for documentation files
  2. Proposal to show information from all descriptors