As documented on Managing AI features | SonarQube Server Documentation
you can disable AI Codefix by setting sonar.ai.codefix.hidden=true
in sonar.properties
file. (Or contacting support and provide your serverId.)
For our deployment we use k8s manifests and container images. For Sonarqube configuration settings it is common to use environment variables, which can easily be added to a deployment.
In the provided sonar.properties
file inside the container, it is stated that properties can be overridden by environment variables. The naming is also explained:
Property values can:
- be overridden by environment variables. The name of the corresponding environment variable is the upper-cased name of the property where all the dot (‘.’) and dash (‘-’) characters are replaced by underscores (‘_’). For example, to override ‘sonar.web.systemPasscode’ use ‘SONAR_WEB_SYSTEMPASSCODE’.
- be encrypted. See Security features | SonarQube Server Documentation
Setting property sonar.ai.codefix.hidden=true
should be equal to setting environment variable SONAR_AI_CODEFIX_HIDDEN=true
. However this is not the case, it has no effect.
Please allow disabling AI Codefix using an environment variable. It is more convenient and consistent with other configuration settings.
- Version: SonarQube Server 10.8.1 (developer)
- Deployment: K8s manifests, official container image