aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx17
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx8
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties38
3 files changed, 32 insertions, 31 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
index 8ad2cf00593..7da4afdb0fb 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
@@ -177,21 +177,18 @@ export class Conditions extends React.PureComponent<Props, State> {
</h4>
<div className="cayc-warning-description">
<FormattedMessage
- id="quality_gates.cayc.banner.description"
- defaultMessage={translate('quality_gates.cayc.banner.description')}
+ id="quality_gates.cayc.banner.description1"
+ defaultMessage={translate('quality_gates.cayc.banner.description1')}
values={{
cayc_link: (
<DocLink to="/user-guide/clean-as-you-code/">
{translate('quality_gates.cayc')}
</DocLink>
),
- new_code_link: (
- <DocLink to="/project-administration/defining-new-code/">
- {translate('quality_gates.cayc.new_code')}
- </DocLink>
- ),
}}
/>
+ <br />
+ {translate('quality_gates.cayc.banner.description2')}
</div>
<ul className="big-spacer-top big-spacer-left spacer-bottom cayc-warning-description">
<li>{translate('quality_gates.cayc.banner.list_item1')}</li>
@@ -199,6 +196,7 @@ export class Conditions extends React.PureComponent<Props, State> {
<li>{translate('quality_gates.cayc.banner.list_item3')}</li>
<li>{translate('quality_gates.cayc.banner.list_item4')}</li>
<li>{translate('quality_gates.cayc.banner.list_item5')}</li>
+ <li>{translate('quality_gates.cayc.banner.list_item6')}</li>
</ul>
</Alert>
)}
@@ -208,11 +206,10 @@ export class Conditions extends React.PureComponent<Props, State> {
<h4 className="spacer-bottom cayc-over-compliant-header">
{translate('quality_gates.cayc_over_compliant.banner.title')}
</h4>
- <p>{translate('quality_gates.cayc_over_compliant.banner.description1')}</p>
<div className="cayc-warning-description spacer-top">
<FormattedMessage
- id="quality_gates.cayc_over_compliant.banner.description2"
- defaultMessage={translate('quality_gates.cayc_over_compliant.banner.description2')}
+ id="quality_gates.cayc_over_compliant.banner.description"
+ defaultMessage={translate('quality_gates.cayc_over_compliant.banner.description')}
values={{
link: (
<DocLink to="/user-guide/clean-as-you-code/#potential-drawbacks">
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx
index 2a4046afaf2..ab60b327de0 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx
@@ -353,7 +353,9 @@ it('should show success banner when quality gate is CAYC compliant', async () =>
await user.click(qualityGate);
expect(screen.getByText('quality_gates.cayc.banner.title')).toBeInTheDocument();
- expect(screen.getByText('quality_gates.cayc.banner.description')).toBeInTheDocument();
+ expect(
+ screen.getByText('quality_gates.cayc.banner.description1', { exact: false })
+ ).toBeInTheDocument();
expect(
screen.queryByText('quality_gates.cayc_condition.missing_warning.title')
).not.toBeInTheDocument();
@@ -381,7 +383,9 @@ it('should show info banner when quality gate is CAYC over-compliant', async ()
await user.click(qualityGate);
expect(screen.getByText('quality_gates.cayc.banner.title')).toBeInTheDocument();
- expect(screen.getByText('quality_gates.cayc.banner.description')).toBeInTheDocument();
+ expect(
+ screen.getByText('quality_gates.cayc.banner.description1', { exact: false })
+ ).toBeInTheDocument();
expect(screen.getByText('quality_gates.cayc_over_compliant.banner.title')).toBeInTheDocument();
expect(
screen.queryByText('quality_gates.cayc_condition.missing_warning.title')
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index f7420980fb2..888dd0d9332 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -1838,7 +1838,6 @@ quality_gates.permissions.remove.user.confirmation=Are you sure you want to remo
quality_gates.permissions.remove.group=Remove permission from group
quality_gates.permissions.remove.group.confirmation=Are you sure you want to remove permission on this quality gate from group {user}?
quality_gates.cayc=Clean as You Code
-quality_gates.cayc.new_code=New Code
quality_gates.cayc_missing.banner.title=This quality gate does not comply with Clean as You Code
quality_gates.cayc_missing.banner.description={cayc_link} is the most efficient approach to delivering Clean Code. This quality gate does not comply with this methodology. We highly recommend that you update this quality gate.
quality_gates.cayc_condition.review_update=Review and Fix Quality Gate
@@ -1853,19 +1852,20 @@ quality_gates.cayc.new_security_rating.A=No vulnerabilities
quality_gates.cayc.unlock_edit=Unlock editing
quality_gates.cayc.tooltip.message=This quality gate does not comply with Clean as You Code.
quality_gates.cayc.badge.tooltip.learn_more=Learn more: Clean as You Code
-quality_gates.cayc_over_compliant.tooltip.message=Additional conditions may have potential drawbacks.
-quality_gates.cayc_over_compliant.badge.tooltip.learn_more=Learn more: Potential drawbacks
+quality_gates.cayc_over_compliant.tooltip.message=You added extra conditions to the "Clean as You Code" quality gate, which is something we do not recommend.
+quality_gates.cayc_over_compliant.badge.tooltip.learn_more=Learn why
quality_gates.cayc.banner.title=This quality gate complies with Clean as You Code
-quality_gates.cayc.banner.description=This quality gate complies with the {cayc_link} methodology, so that you benefit from the most efficient approach to delivering Clean Code. The quality gate ensures that the {new_code_link} you’re working on has:
-quality_gates.cayc.banner.list_item1=No bugs
-quality_gates.cayc.banner.list_item2=No vulnerabilities
-quality_gates.cayc.banner.list_item3=No security hotspots to review
-quality_gates.cayc.banner.list_item4=A limited amount of code smells (i.e. low technical debt ratio)
-quality_gates.cayc.banner.list_item5=A controlled level of duplication and coverage
-quality_gates.cayc_over_compliant.banner.title=This quality gate may have drawbacks
-quality_gates.cayc_over_compliant.banner.description1=This quality gate includes additional conditions that may have drawbacks.
-quality_gates.cayc_over_compliant.banner.description2=Learn more: {link}
-quality_gates.cayc_over_compliant.banner.link=Potential drawbacks
+quality_gates.cayc.banner.description1=This quality gate complies with the {cayc_link} methodology, so that you benefit from the most efficient approach to delivering Clean Code.
+quality_gates.cayc.banner.description2=It ensures that:
+quality_gates.cayc.banner.list_item1=No new bugs are introduced
+quality_gates.cayc.banner.list_item2=No new vulnerabilities are introduced
+quality_gates.cayc.banner.list_item3=All new security hotspots are reviewed
+quality_gates.cayc.banner.list_item4=New code has limited technical debt
+quality_gates.cayc.banner.list_item5=New code has limited duplication
+quality_gates.cayc.banner.list_item6=New code is properly covered by tests
+quality_gates.cayc_over_compliant.banner.title=Extra conditions are not recommended
+quality_gates.cayc_over_compliant.banner.description=You added extra conditions to the "Clean as You Code" quality gate, which is something we do not recommend. Learn {link}
+quality_gates.cayc_over_compliant.banner.link=why
quality_gates.cayc_unfollow.description=You may click unlock to edit this quality gate. Adding extra conditions to a compliant quality gate can result in drawbacks. Are you reconsidering {cayc_link}? We strongly recommend this methodology to achieve a Clean Code status.
quality_gates.cayc.review_update_modal.add_condition.header= {0} condition(s) on New Code will be added
quality_gates.cayc.review_update_modal.modify_condition.header= {0} condition(s) on New Code will be modified
@@ -3272,13 +3272,13 @@ overview.quality_gate.conditions.cayc.warning=The quality gate used by this proj
overview.quality_gate.conditions.cayc.details=Fixing this quality gate will help you achieve a Clean Code state.
overview.quality_gate.conditions.cayc.details_with_link=Fixing {link} will help you achieve a Clean Code state.
overview.quality_gate.conditions.non_cayc.warning.link=this quality gate
-overview.quality_gate.conditions.cayc_over_compliant.warning.link=This quality gate
-overview.quality_gate.conditions.cayc_over_compliant.details=This quality gate is Clean as You Code compliant, but it includes additional conditions that may have drawbacks.
-overview.quality_gate.conditions.cayc_over_compliant.details_with_link={link} is Clean as You Code compliant, but it includes additional conditions that may have drawbacks.
-overview.quality_gate.conditions.cayc.link=Learn more: Clean as You Code
-overview.quality_gate.conditions.cayc_over_compliant.link=Learn more: Potential drawbacks
+overview.quality_gate.conditions.cayc_over_compliant.warning.link=quality gate
+overview.quality_gate.conditions.cayc_over_compliant.details=You added extra conditions to the "Clean as You Code" quality gate, which is something we do not recommend.
+overview.quality_gate.conditions.cayc_over_compliant.details_with_link=You added extra conditions to the "Clean as You Code" quality gate, which is something we do not recommend. Review your {link}.
+overview.quality_gate.conditions.cayc.link=Learn why
+overview.quality_gate.conditions.cayc_over_compliant.link=Learn why
overview.quality_gate.application.non_cayc.projects_x={0} project(s) in this application use a Quality Gate that does not comply with Clean as You Code
-overview.quality_gate.application.cayc_over_compliant.projects_x={0} project(s) in this application use a Clean as You Code compliant quality gate with extra conditions. This may result in drawbacks.
+overview.quality_gate.application.cayc_over_compliant.projects_x=You added extra conditions to the "Clean as You Code" quality gate for {0} project(s) in this application, which is something we do not recommend.
overview.quality_gate.show_project_conditions_x=Show failed conditions for project {0}
overview.quality_gate.hide_project_conditions_x=Hide failed conditions for project {0}
overview.quality_profiles=Quality Profiles used