Error observed
the rules returned by the API rest api/rules/search are ok but their severity have the values read in the SonarQube interface
steps to reproduce
list the issues in the sonarqube dasboard
select the rats repository
note the severities (note: they have been modified in this example)
get this list by the api rest
localhost:9000/api/rules/search?qprofile=AW_DzVUQchokphKZ5vLQ&f=name,severity&repositories=rats
Some values of severities (eg MAJOR) are not the values read in the sonarque interface (first step)
potential workaround
I’ve done a backup of the Quality profile : the same severities as provided by the api rest are in the XML output file. So…No workaround by this way.
FYI information I’ve put an issue in the cxx community issue tracker: it seems that the repository “valgrind” does not exist in SonarQube ( Issue 1793)
For the record, the community C++ plugin isn’t supported here. However your question seems to be general, so…
It’s not clear to me what you mean by “in the interface”. Is it possible that what you’re seeing is the difference between the rules’ default severities and their activated severities in your profile?
…and this command displays a lot of rules …but not the expected rule (“rats:_cprintf”)
So it is not a question od severity or default_severity but a bad performance of the api/rest (or of the results in the database ?).
But maybe I’ve done something wrong ?
Thank you…