HTML quality profile does not analyze *.tag files

Hello.

So far I havn’t found any suggestions for my problem so I try to explain it.

Must-share information

  • which versions are you using: SonarQube Version 8.1 (build 31237)

  • what are you trying to achieve: The SonarQube HTML quality profile seems to scan *.jsp files for example but no *.tag files which also may contain HTML code.

  • what have you tried so far to achieve this: searching for relevant settings in SonarQube, search for suggestions via Google and sonarsource Community

Is there any chance to edit the file extensions for a quality profile?

Hi,

Could you elaborate what are these .tag files? Could you provide some reference to the docs describing the syntax?

Hello Elena.

Thanks for your response. In JSP you may create your own .tag files. So you may use your tag file (and its HTML context for example) multiple times in your JSP.

I don’t know if this docs will help you but it describes hwo to implement and use *.tag files.

https://docs.oracle.com/javaee/5/tutorial/doc/bnamu.html

So a *.tag file may contain “any” type of code which also will be in JSP files (e.g. HTML, Javascript, Java…)

I can imagine that it would be quite difficult to analyse those files because usally they contain only HTML code snippets which only make sense in the whole context: a JSP code may contain many different tags.

Perhaps an example will illustrate it better:

foobar.tag:

<%= foobar %>
foo.tag: <%= foo %>
bar.tag: <%= bar %>

JSP:

[content of foobar.tag] [content of foo.tag] [content of bar.tag]