Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect symbol references for @keyword identifiers #6139

Closed
pavel-mikula-sonarsource opened this issue Sep 28, 2022 · 0 comments · Fixed by #8604
Closed

Detect symbol references for @keyword identifiers #6139

pavel-mikula-sonarsource opened this issue Sep 28, 2022 · 0 comments · Fixed by #8604
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: Hardening Fix FPs/FNs/improvements
Milestone

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

pavel-mikula-sonarsource commented Sep 28, 2022

Symbol references are not detected in SQ UI for @keyword annotated identifiers in utility analyzer SymbolReferenceAnalyzer

@ref should be annotated. Same as any other @ identifier like @alias or @namespace, etc.

public void Write(object @ref)
{
    Debug.Assert(@ref != null);
    Console.WriteLine(@ref.ToString());
}

Same for VB

    Public Sub Write([Namespace] As Object)
        Debug.Assert([Namespace] IsNot Nothing)
        Console.WriteLine([Namespace].ToString)
    End Sub

Source: Peach
https://peach.sonarsource.com/code?id=lucenenet&selected=lucenenet:Lucene.Net/Util/OfflineSorter.cs&line=548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: Hardening Fix FPs/FNs/improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants