dotnet / roslyn-analyzers

MIT License
1.59k stars 466 forks source link

error RS2007: Analyzer release file 'AnalyzerReleases.Shipped.as a missing or invalid release header #5481

Open RussKie opened 3 years ago

RussKie commented 3 years ago

Analyzer

RS2007: Invalid entry in analyzer release file

Analyzer source

SDK: 6.0.100-rc.1.21416.15

Describe the bug

Observed while publishing analyzer info in dotnet/winforms release/6.0 branch (https://github.com/dotnet/winforms/pull/5769).

; Shipped analyzer releases
; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

## Release .NET 6.0 RC2

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|--------------------
WFAC010 | ApplicationConfiguration | Warning | AppManifestAnalyzer, [Documentation](https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Analyzers/AppManifestAnalyzer.Help.md)

image

I tried removing ## Release .NET 6.0 RC2 line, then the I get an error against ### New Rules line... Right now I'm suppressing RS2007 but I'm puzzled by how RS2007 is expected to work.

https://github.com/dotnet/roslyn-analyzers/issues/4484 appears to discuss a similar issue but I didn't see anything related to this scenario.

mavasani commented 3 years ago

Analyzer currently expects the release header to be in a format ## Release <%Version%>: https://github.com/dotnet/roslyn-analyzers/blob/32658a620ba89e963ea2bcc39554bec06b1d654b/src/Microsoft.CodeAnalysis.Analyzers/Core/MetaAnalyzers/ReleaseTrackingHelper.cs#L58-L73

It seems possible to enhance the analyzer to expect other formats, that would be a new feature request.

glen-nicol commented 8 months ago

I'm getting this same error for the following file:

; Shipped analyzer releases
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

## Release 0.1.0

### New Rules

Rule ID | Category        | Severity | Notes
--------|-----------------|----------|--------------------
RUI001  | Design          |  Error   |
RUI002  | Design          |  Error   |

And the project has <Version>0.1.0</Version>

Why does the error not mention that header format and instead quotes the table?

AArnott commented 1 week ago

I'm getting this warning too:

warning RS2007: Analyzer release file 'AnalyzerReleases.Shipped.md' has a missing or invalid release header '## Release 0.1.705-alpha' (https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md)

Apparently it doesn't like prerelease syntax.

Workaround:

-## Release 0.1.705-alpha
+## Release 0.1.705