Custom Quality profile usage via SonarScanner

I have created a custom Quality profile for Java code which checks for all the different vulnerabilities as offered on SonarQube.

However, i don’t want to make this new profile as Default, yet.
The automated CI/CD pipelines will get impacted when running the builds and can get blocked.
I just want to issue SonarScanner but want to use this new Java Quality profile.
Is there a way to specify a Quality profile option when running the SonarScanner command?

Hi Ashish,

Gentle reminder that it is a must to share which version of SonarQube you are using when posting here.

To your question: It is not possible to specify which Quality Profile to use for your project via the SonarScanner. However, what you should do is to set at the Project Administration level which Quality Profile you want to use for this project.

Please read the official docs on Quality Profiles here, an excerpt follows:

Make sure my non-default profile is used on a project?

One profile for each language is marked the default. Barring any other intervention, all projects that use that language will be analyzed with that profile. To have a project analyzed by a non-default profile instead, start from Quality Profiles , and click through on your target profile, then use the Projects part of the interface to manage which projects are explicitly assigned to the profile.