I need some suggestion. In our organization some project have inline JavaScript code in .cshtml files. In these files there are some bugs/code smells/vulnerability such as S1525. How can we capture these bugs?
Should we write a custom html rule or is there an easier way?
To be clear, you won’t be able to write this custom rule to run within SonarQube; it’s not supported for html files. Instead, you’ll need to write something that runs before analysis & creates a Generic Issue Report to be read during analysis.
Actually i have wrote a rule for this and it is working well for now.
But as you can see i could not show the actual line number of the debugger statement. Instead i could show the line number of the script tag.