-
Notifications
You must be signed in to change notification settings - Fork 228
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
.razor: implement the token type metrics #7895
Comments
Handed over to @costin-zaharia-sonarsource. The underlying PR describes the current status and the next steps. |
Took it over from @csaba-sagi-sonarsource.
|
@costin-zaharia-sonarsource The issue has been hanging on the Kanban board, for a while now. There is quite a lot of code, and the PR went also for a round of review. How would you advise to proceed? |
Since there are still problems with the mapping and the Roslyn APIs don't help us much currently, I would prefer to pause this effort for now. In my opinion, we should wait for the compiler team to finish the current effort in improving the API and continue when the new registrations are available. |
Description
See the "Token type" section from the specification document.
More details about the approach here.
Alternative
An alternative to this approach, which only focuses on mapping back tokens without altering the fundamental behavior of the Token Type Analyzer, is to use the
RazorSyntaxTree
parsing. That approach, that is more powerful but also more complex to implement, is captured by a dedicated issue.Update
Moving back to "To do" waiting for the issue with location mapping for nested Razor expression to be fixed first, since wrong location mapping can produce wrong and overlapping tokens, and those break tokenization import on SonarQube/SonarCloud by the sensor.
Update 2024
Underlying PR closed for the reasons explained #7924 (comment).
For a new implementation, please consider the analysis and the scenarios described in the description of the first PR.
The text was updated successfully, but these errors were encountered: