How to create multiple highlights

Hi everyone, currently I am trying to highlight line numbers inside of the file system. But I keep getting this error
Trying to save highlighting twice for the same file is not supported: src/main/java/com/empire/mockdata/generate/CustomerNotes.java
I have tried to just highlight the very first line of every file but still get this error.
How exactly does highlighting work is my question.
Thanks a lot for your time

Hi,

Not sure of what you are trying to achieve, but what we call highlighting is code colorization. This data can only be provided once for each file (we haven’t specified a merge strategy). Since this is a Java file, the highlighting is probably already provided by our SonarJava analyzer.

Hi thanks a lot @Julien_HENRY for that I didn’t realize that Sonarqube(7.9.1 LTS) would make highlights/colorizations for all the files.
My goal is to have a piece of code(a single line) underlined with a tiny link below that line being part of the “highlight” to navigate the user.
My question being how can I access those files? Are they stored somewhere specific within the filesystem or is there some other way to access them?
Your is much appreciated thank you

Hello. Maybe you should just register an issue on this line? Most sonar-plugins have extension points to create new rules, or you could just create a “generic issue” report and pass it to sonar-scanner?

2 Likes

@nixel2007 @Julien_HENRY Thanks a lot for your help, that was exactly what I needed.
Cheers