]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-23064 Create new project settings page for ai generated code
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>
Wed, 18 Sep 2024 16:18:43 +0000 (18:18 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 25 Sep 2024 20:02:53 +0000 (20:02 +0000)
server/sonar-web/src/main/js/helpers/doc-links.ts
server/sonar-web/src/main/js/queries/quality-gates.ts
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 61735ee8392eb7104487e0f8de2e2e9d7d1e2f4c..7b8b67313f7f03cdbf9a98480a1dfa78d0baefa3 100644 (file)
@@ -84,6 +84,7 @@ export enum DocLink {
   SonarScannerDotNet = '/analyzing-source-code/scanners/dotnet/introduction/',
   SonarScannerGradle = '/analyzing-source-code/scanners/sonarscanner-for-gradle/',
   SonarScannerMaven = '/analyzing-source-code/scanners/sonarscanner-for-maven/',
+  SonarWayQualityGate = '/user-guide/quality-gates/#using-sonar-way-the-recommended-quality-gate', // to be confirmed
   Webhooks = '/project-administration/webhooks/',
 }
 
index 1452aa2f05a57fac6905a9e990de74a84e553e82..0bb25cda19adbbf0ab92a0733739bfee2041cdb4 100644 (file)
@@ -68,7 +68,7 @@ export function useQualityGateQuery(name: string) {
   return useQualityGateQueryInner(name);
 }
 
-function useQualityGateForProjectQuery(project: string) {
+export function useQualityGateForProjectQuery(project: string) {
   return useQuery({
     queryKey: qualityQuery.projectAssoc(project),
     queryFn: async ({ queryKey: [, , project] }) => {
index 2f1f69ef271fccbb2e59f9b78269144b2f0e8084..14d8068bdb209e4d7b7153490966a29d3c3186a3 100644 (file)
@@ -2016,6 +2016,26 @@ custom_measures.update_custom_measure=Update Custom Measure
 custom_measures.metric=Metric
 
 
+#------------------------------------------------------------------------------
+#
+# AI GENERATED CODE
+#
+#------------------------------------------------------------------------------
+ai_generated_code.page=AI-Generated Code
+ai_generated_code.contains_code=Contains AI-Generated Code
+ai_generated_code.description=Select this option if your project contains AI-generated code. This will enforce the use of {sonarWayQualityGateLink} and will give your project Sonar’s {aiAssuranceLink}.
+ai_generated_code.sonar_way_quality_gate.link=Sonar way Quality Gate
+ai_generated_code.ai_code_assurance.link=AI Code Assurance
+ai_generated_code.sonar_way_quality_gate.already_selected.warning=This setting will lock the project’s Quality Gate
+ai_generated_code.sonar_way_quality_gate.already_selected.description=Projects containing AI-generated code must use Sonar way Quality Gate. As long as this setting is set to {true}, you will not be able to change this project’s Quality Gate.
+ai_generated_code.sonar_way_quality_gate.already_selected.save=Lock Quality Gate and Save
+ai_generated_code.sonar_way_quality_gate.not_selected.warning=️This setting will change the project’s quality gate
+ai_generated_code.sonar_way_quality_gate.not_selected.description=Projects containing AI-generated code must use Sonar way Quality Gate as the project-level Quality Gate. Setting this value to True will enforce the use of Sonar way.
+ai_generated_code.sonar_way_quality_gate.not_selected.save=Change Quality Gate and Save
+ai_generated_code.old_quality_gate=Old Quality Gate: {name}
+ai_generated_code.new_quality_gate=New Quality Gate: {name}
+ai_generated_code.success_message=AI-generated Code setting has been successfully updated.
+
 #------------------------------------------------------------------------------
 #
 # PROJECT NAVIGATION