Versions:
- SonarQube 8.3.1.34397
- Postgresql 12.1
Installed Plugins:
- SonarCSS 1.2
- SonarHTML 3.2
- SonarJS 6.2.1
- SonarPython 2.7
- SonarTS 2.1
Behaviour Observed:
Quality profiles reported number of active rules as seen on the overall quality profiles page does not match the number reported on the individual quality profile’s page or the rules page.
Steps to Reproduce:
- Originally configured SonarQube with a local postgresql DB provided by bitnami as a docker container.
- Later migrated to IBM Cloud postgresql instance for the DB.
- Took a backup of the original DB and restored into the new one.
- Upon starting SonarQube and connecting to the new DB with data restored, saw no rules or plugins.
- After reading documentation in SonarQube community about how DB does not persist the actual plugin installation, only record of installation, manually installed the plugins again from marketplace.
SonarWay and SonarWay Recommended for TS, for example, show 80 and 134 active rules, respectively, yet from the rules view, I can only see 0 and 1, respectively.
Upon checking the database rules table, I noticed a couple differences between the rules visible in both of the aforementioned locations.
The 1 visible in the rules view of SonarQube for SonarWay Recommended (TS):
plugin_rule_key='DuplicatedBlocks'
plugin_key=NULL
plugin_name='common-ts'
The other rules not visible in the rules view for SonarWay Recommended (TS):
plugin_rule_key='S###' where ### is a sequence of digits
plugin_key='javascript'
plugin_name='typescript'
Behaviour above is observed for SonarWay and SonarWay Recommended profiles in following languages:
- JS
- HTML
- TS
- Python