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 Type: Improvement Making existing code better.
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

@pavel-mikula-sonarsource pavel-mikula-sonarsource added Type: Improvement Making existing code better. Area: VB.NET VB.NET rules related issues. Area: C# C# rules related issues. labels Sep 28, 2022
@github-actions github-actions bot added this to Improvement in Backlog Sep 28, 2022
@antonioaversa antonioaversa added this to the 9.18 milestone Jan 22, 2024
@antonioaversa antonioaversa added the Sprint: Hardening Fix FPs/FNs/improvements label Jan 22, 2024
@antonioaversa antonioaversa added this to To do in Best Kanban Jan 22, 2024
@antonioaversa antonioaversa moved this from To do to In progress in Best Kanban Jan 24, 2024
@antonioaversa antonioaversa removed this from the 9.18 milestone Jan 26, 2024
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Jan 26, 2024
@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Jan 29, 2024
Best Kanban automation moved this from Review approved to Validate Peach Jan 29, 2024
@cristian-ambrosini-sonarsource cristian-ambrosini-sonarsource added this to the 9.19 milestone Jan 30, 2024
@antonioaversa antonioaversa moved this from Validate Peach to Done in Best Kanban Jan 30, 2024
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 Type: Improvement Making existing code better.
Projects
Best Kanban
  
Done
Backlog
  
Improvement
Development

Successfully merging a pull request may close this issue.

4 participants