How to disable scanning html or js?


I’ve recently received a mail from my Sonar server (Enterprise Edition) telling me that I’m nearing the maximum allowed lines of code (LOC).
My projects are mostly Java and I do not care about html or xml analysis. But I see that some projects reports thousands of XML or HTML lines of code.
How can I deactivate this in order to gain a few k of LOC ?
Is it on the client side (with Maven plugin) ? Is it on the server side globally of project by project ?



Welcome to the community!

It can be either, but I guess you’d appreciate most the global approach: Administration > Languages. Once there, choose your language from the dropdown and set the file extension to something like .htmlfoo and .xmlfoo.

A similar change can also be made at the project level, just in case you want to turn this back on for an individual project.