Local SonarQube - New CSS Profile Rules aren't Activating

I am using SonarQube Community Edition, Version 8.9 (build 43852).

it’s locally running on port 9000 in a windows system. I noticed that for CSS “QualityProfile”, around 8 rules are not active inside built-in profile. You can’t modify a built-in profile. So created a new profile by copy it. I am uisng built-in “admin” user and has permission to manage Quality Profiles. But I couldn’t see rules are activated under my new CSS Quality Profile eventhough inside QualityProfile list page, it s showing 31 rules.

image

Hi @Jaish_Mathews ,

You are correct, you can’t modify a build-in quality profile, so you have to copy it. Once you copy it, you may activate or deactivate rules. Click on the “Activate More” button and activate the rules you want.

Joe,

I done same procedure as below, but rules are not activating for this profile. That’s the issue I am facing.

Hi @Jaish_Mathews ,

I cannot replicate this behavior you are seeing. Can you see if this behavior happens with any of the other languages’ quality profiles, i.e. create a new Quality Profile or copy the Sonar way one and try activating rules there?

If you are able to replicate the issue, please restart SonarQube and try again. If you still get issues, you may need to re-download SonarQube and see if the issue persists.

Have you modified any of the plugins in the $SONARQUBE_HOME folder?

Hello again @Jaish_Mathews:

One thing you can try, please perform an Elasticsearch reindex like so (as described in SonarQube 10.3):

How do I trigger a full ElasticSearch reindex?

Currently, the only way to force a reindex is to:

  • Stop your server
  • Remove the contents of the $SQ_HOME/data/es7 directory
  • Start your server

Before doing this, you should be aware first that processes are in place on the SonarQube side that out-of-sync indices are detected and corrected, and second that a full re-index can be quite lengthy depending on the size of your instance.

Then try creating your QP again.

Somehow it’s worked after reinstall entire Sonar folder

1 Like

@Jaish_Mathews : thanks for confirming the solution to your issue. Seems like you may have had a corrupted download earlier.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.