From d835fdaa1d594451b554af805db9869134c716df Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Mon, 17 Jun 2019 18:05:43 +0200 Subject: [PATCH] SONAR-12196 Fix SSF-79 --- server/sonar-docs/src/templates/page.tsx | 6 +- server/sonar-web/package.json | 3 + .../js/app/components/search/SearchResult.tsx | 1 + .../app/components/search/SearchShowMore.tsx | 21 ++-- .../SearchShowMore-test.tsx.snap | 19 +++- .../js/apps/about/components/AboutApp.tsx | 6 +- .../components/ActivationFormModal.tsx | 1 + .../components/CustomRuleFormModal.tsx | 1 + .../components/RuleDetailsDescription.tsx | 2 + .../components/RuleDetailsParameters.tsx | 4 +- .../__tests__/RuleDetailsParameters-test.tsx | 33 ++++++ .../RuleDetailsParameters-test.tsx.snap | 83 ++++++++++++++ .../issues/components/IssuesSourceViewer.tsx | 1 + .../js/apps/maintenance/components/App.tsx | 41 ++++--- .../__tests__/__snapshots__/App-test.tsx.snap | 76 +++++++++---- .../components/SettingForm.tsx | 5 +- .../js/apps/settings/__tests__/utils-test.ts | 105 +++++++++++++++++- .../apps/settings/components/Definition.tsx | 5 +- .../components/SubCategoryDefinitionsList.tsx | 4 +- .../encryption/GenerateSecretKeyForm.tsx | 30 ++++- .../src/main/js/apps/settings/utils.ts | 7 ++ .../components/commands/BuildWrapper.tsx | 16 ++- .../components/commands/ClangGCC.tsx | 28 +++-- .../tutorials/components/commands/DotNet.tsx | 28 +++-- .../components/commands/JavaGradle.tsx | 48 +++++--- .../components/commands/JavaMaven.tsx | 34 ++++-- .../components/commands/MSBuildScanner.tsx | 12 +- .../tutorials/components/commands/Msvc.tsx | 28 +++-- .../tutorials/components/commands/Other.tsx | 28 +++-- .../components/commands/SQScanner.tsx | 17 ++- .../__snapshots__/BuildWrapper-test.tsx.snap | 51 ++++++--- .../__snapshots__/ClangGCC-test.tsx.snap | 63 ++++++++--- .../__snapshots__/DotNet-test.tsx.snap | 42 +++++-- .../__snapshots__/JavaGradle-test.tsx.snap | 90 +++++++++------ .../__snapshots__/JavaMaven-test.tsx.snap | 90 +++++++++------ .../MSBuildScanner-test.tsx.snap | 17 ++- .../__snapshots__/Msvc-test.tsx.snap | 42 +++++-- .../__snapshots__/Other-test.tsx.snap | 63 ++++++++--- .../__snapshots__/SQScanner-test.tsx.snap | 60 +++++++--- .../js/apps/web-api/components/Action.tsx | 1 + .../js/apps/web-api/components/Domain.tsx | 1 + .../js/apps/web-api/components/Params.tsx | 1 + .../main/js/components/charts/TreeMapRect.tsx | 17 +-- .../charts/__tests__/TreeMap-test.tsx | 21 +++- .../issue/components/IssueCommentLine.tsx | 1 + .../src/main/js/helpers/testMocks.ts | 12 ++ server/sonar-web/yarn.lock | 38 +++++++ .../resources/org/sonar/l10n/core.properties | 44 +++++--- 48 files changed, 1022 insertions(+), 325 deletions(-) create mode 100644 server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx create mode 100644 server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsParameters-test.tsx.snap diff --git a/server/sonar-docs/src/templates/page.tsx b/server/sonar-docs/src/templates/page.tsx index d52ce259704..61651aa4fdc 100644 --- a/server/sonar-docs/src/templates/page.tsx +++ b/server/sonar-docs/src/templates/page.tsx @@ -104,7 +104,11 @@ export default class Page extends React.PureComponent {

{pageTitle || mainTitle}

-
+
); } diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 652397674a7..6a94ebb3ea1 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -5,6 +5,7 @@ "repository": "SonarSource/sonarqube", "license": "LGPL-3.0", "dependencies": { + "@types/dompurify": "^0.0.32", "classnames": "2.2.6", "clipboard": "2.0.1", "core-js": "3.0.0", @@ -16,6 +17,7 @@ "d3-shape": "1.2.2", "d3-zoom": "1.7.3", "date-fns": "1.29.0", + "dompurify": "^1.0.11", "formik": "1.2.0", "history": "3.3.0", "intl-relativeformat": "2.1.0", @@ -78,6 +80,7 @@ "@types/react-router": "3.0.20", "@types/react-select": "1.2.6", "@types/react-virtualized": "9.21.0", + "@types/sanitize-html": "1.20.0", "@types/valid-url": "1.0.2", "@typescript-eslint/parser": "1.5.0", "autoprefixer": "9.5.0", diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx index 5ffab5ec6a4..20fd40ae953 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx @@ -137,6 +137,7 @@ export default class SearchResult extends React.PureComponent { {component.match ? ( ) : ( diff --git a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx index 1c3932538f3..d528a1a7369 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.tsx @@ -18,9 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import * as classNames from 'classnames'; import DeferredSpinner from '../../../components/common/DeferredSpinner'; -import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { translate } from '../../../helpers/l10n'; interface Props { allowMore: boolean; @@ -61,15 +62,15 @@ export default class SearchShowMore extends React.PureComponent { href="#" onClick={this.handleMoreClick} onMouseEnter={this.handleMoreMouseEnter}> -
Enter' - ) - }} - /> +
+ Enter + }} + /> +
{translate('show_more')} diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap index 9a3d97e3982..71e30b63d9b 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap @@ -19,12 +19,21 @@ exports[`should render 1`] = ` >
Enter", + > + + Enter + , + } } - } - /> + /> +
show_more diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx index 9e4e5f939bc..4c8f05066db 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.tsx @@ -158,7 +158,11 @@ export class AboutApp extends React.PureComponent {
{customText && ( -
+
)} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx index ac5b6325bb9..490b971bab5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx @@ -224,6 +224,7 @@ export default class ActivationFormModal extends React.PureComponent
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx index afb3a99881f..42b022b64e7 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx @@ -304,6 +304,7 @@ export default class CustomRuleFormModal extends React.PureComponent
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx index 0f22be47412..fc0ec48363e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx @@ -112,6 +112,7 @@ export default class RuleDetailsDescription extends React.PureComponent )} @@ -193,6 +194,7 @@ export default class RuleDetailsDescription extends React.PureComponent ) : ( diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx index 2679b6f3fd8..57f42d438a1 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsParameters.tsx @@ -29,7 +29,9 @@ export default class RuleDetailsParameters extends React.PureComponent { {param.key} -

+

{param.defaultValue !== undefined && (

{translate('coding_rules.parameters.default_value')} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx new file mode 100644 index 00000000000..1e017749c54 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleDetailsParameters-test.tsx @@ -0,0 +1,33 @@ +/* + * SonarQube + * Copyright (C) 2009-2019 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import { shallow } from 'enzyme'; +import RuleDetailsParameters from '../RuleDetailsParameters'; +import { mockRuleDetailsParameter } from '../../../../helpers/testMocks'; + +it('should render correctly', () => { + expect(shallowRender()).toMatchSnapshot(); +}); + +function shallowRender(props: Partial = {}) { + const params = [mockRuleDetailsParameter(), mockRuleDetailsParameter()]; + + return shallow(); +} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsParameters-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsParameters-test.tsx.snap new file mode 100644 index 00000000000..374a33057d7 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsParameters-test.tsx.snap @@ -0,0 +1,83 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should render correctly 1`] = ` +
+

+ coding_rules.parameters +

+ + + + + + + + + + + +
+ 1 + +

+

+ coding_rules.parameters.default_value +
+ + 1 + +
+
+ 1 + +

+

+ coding_rules.parameters.default_value +
+ + 1 + +
+
+
+`; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx index d63d251974a..2ca069c1a46 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx @@ -119,6 +119,7 @@ export default class IssuesSourceViewer extends React.PureComponent { const component = selectedLocation ? selectedLocation.component : openIssue.component; const allMessagesEmpty = locations !== undefined && locations.every(location => !location.msg); + const highlightedLocations = locations.filter(location => location.component === component); // do not load issues when open another file for a location diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx index fd091c1c940..c1213f0f1d6 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx @@ -18,8 +18,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import * as classNames from 'classnames'; import Helmet from 'react-helmet'; +import { FormattedMessage } from 'react-intl'; +import * as classNames from 'classnames'; import { getMigrationStatus, getSystemStatus, migrateDatabase } from '../../../api/system'; import DateFromNow from '../../../components/intl/DateFromNow'; import TimeFormatter from '../../../components/intl/TimeFormatter'; @@ -201,18 +202,32 @@ export default class App extends React.PureComponent { {!isSonarCloud() && ( <> -

-

+

+ + {translate('maintenance.sonarqube_is_under_maintenance_link.1')} + + ) + }} + /> +

+

+ + {translate('maintenance.sonarqube_is_under_maintenance_link.2')} + + ) + }} + /> +

)} diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap index 7c718fdcb7e..e0606efd1df 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap @@ -24,20 +24,38 @@ exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = `

+ + maintenance.sonarqube_is_under_maintenance_link.1 + , + } } - } - /> + /> +

+ + maintenance.sonarqube_is_under_maintenance_link.2 + , + } } - } - /> + /> +

@@ -67,20 +85,38 @@ exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = `

+ + maintenance.sonarqube_is_under_maintenance_link.1 + , + } } - } - /> + /> +

+ + maintenance.sonarqube_is_under_maintenance_link.2 + , + } } - } - /> + /> +

diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx index e27eda543b5..7dadf716969 100644 --- a/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectBranches/components/SettingForm.tsx @@ -21,6 +21,7 @@ import * as React from 'react'; import { setSimpleSettingValue, resetSettingValue } from '../../../api/settings'; import { Button, SubmitButton, ResetButtonLink } from '../../../components/ui/buttons'; import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { sanitizeTranslation } from '../../settings/utils'; interface Props { branch?: string; @@ -96,7 +97,9 @@ export default class SettingForm extends React.PureComponent {
{ it('should work for boolean field when passing "false"', () => check('false', 'settings.boolean.false')); }); + +describe('sanitizeTranslation', () => { + it('should preserve formatting tags', () => { + const allowed = ` + Hi this is in italics and
    +
  • lists
  • +
  • are allowed
  • +
+

+ as well. This is Amazing and this bold
+ and code.is.accepted too +

+ `; + + const clean = sanitizeTranslation(allowed); + expect(clean).toBe(allowed); + }); + + /* + * Test code borrowed from OWASP's sanitizer tests + * https://github.com/OWASP/java-html-sanitizer/blob/master/src/test/resources/org/owasp/html/htmllexerinput1.html + */ + it('should strip everything else', () => { + const clean = sanitizeTranslation(` + + + + + + + + Test File For HtmlLexer & HtmlParser + + + + + + + +
+ Clicky +
+ + + alert("<b>hi</b>"); + + +
<div id=notarealtag onclick=notcode()>
+ + + + < notatag + + + + + + < < < all in one text block > > > + + Make sure that <!-- comments don't obscure the xmp close + <% # some php code here + write("
$horriblySyntacticConstruct1
\n\n"); + %> + + + */alert('hi'); + */alert('hi');--> + + <!--/* */alert('hi');--> + + ' } --> + --> + --> + + + + + + + section in HTML ]]> + + + Bar`); + + expect(clean.replace(/\s+/g, '')).toBe( + `Clickyalert("<b>hi</b>");<divid=notarealtagonclick=notcode()><notatag<<<allinonetextblock>>>Makesurethat<%#somephpcodeherewrite("$horriblySyntacticConstruct1");%>*/alert('hi');*/alert('hi');-->*/alert('hi');-->'}-->--><!--Zoicks-->sectioninHTML]]>Bar` + ); + }); +}); diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx index d17d9ead8a1..9be3fb3820b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx @@ -26,7 +26,8 @@ import { getPropertyName, getPropertyDescription, getSettingValue, - isDefaultOrInherited + isDefaultOrInherited, + sanitizeTranslation } from '../utils'; import AlertErrorIcon from '../../../components/icons-components/AlertErrorIcon'; import AlertSuccessIcon from '../../../components/icons-components/AlertSuccessIcon'; @@ -142,7 +143,7 @@ export class Definition extends React.PureComponent { {description && (
)} diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx index 9e5dc895b7b..7733c37c709 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { groupBy, isEqual, sortBy } from 'lodash'; import DefinitionsList from './DefinitionsList'; import EmailForm from './EmailForm'; -import { getSubCategoryName, getSubCategoryDescription } from '../utils'; +import { getSubCategoryName, getSubCategoryDescription, sanitizeTranslation } from '../utils'; interface Props { category: string; @@ -74,7 +74,7 @@ export default class SubCategoryDefinitionsList extends React.PureComponent )}

{translate('encryption.how_to_use')}

-
+
+
    +
  • + ~/.sonar/sonar-secret.txt, + property: sonar.secretKeyPath, + propreties_file: conf/sonar.properties + }} + /> +
  • +
  • {translate('encryption.how_to_use.content2')}
  • +
  • + sonar.secretKeyPath + }} + /> +
  • +
  • {translate('encryption.how_to_use.content4')}
  • +
+
) : (
diff --git a/server/sonar-web/src/main/js/apps/settings/utils.ts b/server/sonar-web/src/main/js/apps/settings/utils.ts index 09484304223..990a6933591 100644 --- a/server/sonar-web/src/main/js/apps/settings/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/utils.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +import { sanitize } from 'dompurify'; import { translate, hasMessage } from '../../helpers/l10n'; export const DEFAULT_CATEGORY = 'general'; @@ -35,6 +36,12 @@ export interface DefaultInputProps { value: any; } +export function sanitizeTranslation(html: string) { + return sanitize(html, { + ALLOWED_TAGS: ['b', 'br', 'code', 'i', 'li', 'p', 'strong', 'ul'] + }); +} + export function getPropertyName(definition: T.SettingDefinition) { const key = `property.${definition.key}.name`; return hasMessage(key) ? translate(key) : definition.name; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/BuildWrapper.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/BuildWrapper.tsx index 829c09c02d6..3f16344c420 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/BuildWrapper.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/BuildWrapper.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { translate } from '../../../../helpers/l10n'; import { getBaseUrl } from '../../../../helpers/urls'; @@ -38,12 +39,15 @@ export default function BuildWrapper(props: Props) {

{translate('onboarding.analysis.build_wrapper.header', props.os)}

-

+

+ {props.os === 'win' ? '%PATH%' : 'PATH'} + }} + /> +

- {transformedMessage => ( -

- )} + {transformedMessage =>

{transformedMessage}

} -

+

+ + {translate('onboarding.analysis.sq_scanner.docs_link')} + + ) + }} + /> +

); } diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx index 1bf82ddb0b3..a6fe98e0c2e 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/DotNet.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import MSBuildScanner from './MSBuildScanner'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; @@ -52,20 +53,27 @@ export default function DotNet(props: Props) { {translate('onboarding.analysis.msbuild.execute')} - {transformedMessage => ( -

- )} + {transformedMessage =>

{transformedMessage}

}
-

+

+ + {translate('onboarding.analysis.msbuild.docs_link')} + + ) + }} + /> +

); } diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaGradle.tsx index d33568362bb..dfe6ff42834 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaGradle.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaGradle.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import { translate } from '../../../../helpers/l10n'; @@ -45,10 +46,16 @@ export default function JavaGradle(props: Props) {

{translate('onboarding.analysis.java.gradle.header')}

{transformedMessage => ( -

+

+ org.sonarqube, + filename: build.gradle + }} + /> +

)}
@@ -56,18 +63,27 @@ export default function JavaGradle(props: Props) { {translate('onboarding.analysis.java.gradle.text.2')}

-

-

+

+ + {translate('onboarding.analysis.java.gradle.docs_link')} + + ) + }} + /> +

+

+ {props.projectKey + ? translate('onboarding.analysis.auto_refresh_after_analysis') + : translate('onboarding.analysis.browse_url_after_analysis')} +

); } diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaMaven.tsx index 3bc233aa041..778796e0eb0 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/JavaMaven.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; import { translate } from '../../../../helpers/l10n'; @@ -45,18 +46,27 @@ export default function JavaMaven(props: Props) {

-

-

+

+ + {translate('onboarding.analysis.java.maven.docs_link')} + + ) + }} + /> +

+

+ {props.projectKey + ? translate('onboarding.analysis.auto_refresh_after_analysis') + : translate('onboarding.analysis.browse_url_after_analysis')} +

); } diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/MSBuildScanner.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/MSBuildScanner.tsx index 86ea954d2ca..02c69437a2c 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/MSBuildScanner.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/MSBuildScanner.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { translate } from '../../../../helpers/l10n'; interface Props { @@ -28,10 +29,13 @@ export default function MSBuildScanner(props: Props) { return (

{translate('onboarding.analysis.msbuild.header')}

-

+

+ %PATH% }} + /> +

- {transformedMessage => ( -

- )} + {transformedMessage =>

{transformedMessage}

} -

+

+ + {translate('onboarding.analysis.msbuild.docs_link')} + + ) + }} + /> +

); } diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx index 8c4a6529ea7..c9445156179 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/Other.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import SQScanner from './SQScanner'; import CodeSnippet from '../../../../components/common/CodeSnippet'; import InstanceMessage from '../../../../components/common/InstanceMessage'; @@ -51,18 +52,25 @@ export default function Other(props: Props) { {translate('onboarding.analysis.sq_scanner.execute')} - {transformedMessage => ( -

- )} + {transformedMessage =>

{transformedMessage}

}
-

+

+ + {translate('onboarding.analysis.sq_scanner.docs_link')} + + ) + }} + /> +

); } diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/SQScanner.tsx b/server/sonar-web/src/main/js/apps/tutorials/components/commands/SQScanner.tsx index 0ce14360992..674b59e3d50 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/SQScanner.tsx +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/SQScanner.tsx @@ -18,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { translate } from '../../../../helpers/l10n'; interface Props { @@ -31,12 +32,16 @@ export default function SQScanner(props: Props) {

{translate('onboarding.analysis.sq_scanner.header', props.os)}

-

+

+ bin, + env_var: {props.os === 'win' ? '%PATH%' : 'PATH'} + }} + /> +

+ + %PATH% + , + } } - } - /> + /> +

+ + PATH + , + } } - } - /> + /> +

+ + PATH + , + } } - } - /> + /> +

+ + onboarding.analysis.sq_scanner.docs_link + , + } } - } - /> + /> +

`; @@ -85,12 +96,23 @@ exports[`renders correctly 2`] = ` />

+ + onboarding.analysis.sq_scanner.docs_link + , + } } - } - /> + /> +

`; @@ -133,11 +155,22 @@ exports[`renders correctly 3`] = ` />

+ + onboarding.analysis.sq_scanner.docs_link + , + } } - } - /> + /> +

`; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/DotNet-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/DotNet-test.tsx.snap index b296291fc1c..f455da670c8 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/DotNet-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/DotNet-test.tsx.snap @@ -39,12 +39,23 @@ exports[`renders correctly 1`] = ` />

+ + onboarding.analysis.msbuild.docs_link + , + } } - } - /> + /> +

`; @@ -88,11 +99,22 @@ exports[`renders correctly 2`] = ` />

+ + onboarding.analysis.msbuild.docs_link + , + } } - } - /> + /> +

`; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap index 55ca37b75f9..7e1208e8dce 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap @@ -35,20 +35,28 @@ exports[`renders correctly 1`] = ` />

+ + onboarding.analysis.java.gradle.docs_link + , + } } - } - /> + /> +

+ > + onboarding.analysis.browse_url_after_analysis +

`; @@ -87,20 +95,28 @@ exports[`renders correctly 2`] = ` />

+ + onboarding.analysis.java.gradle.docs_link + , + } } - } - /> + /> +

+ > + onboarding.analysis.browse_url_after_analysis +

`; @@ -139,19 +155,27 @@ exports[`renders with projectKey 1`] = ` />

+ + onboarding.analysis.java.gradle.docs_link + , + } } - } - /> + /> +

+ > + onboarding.analysis.auto_refresh_after_analysis +

`; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap index af3ff510ca6..7ee4d3becba 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap @@ -27,20 +27,28 @@ exports[`renders correctly 1`] = ` />

+ + onboarding.analysis.java.maven.docs_link + , + } } - } - /> + /> +

+ > + onboarding.analysis.browse_url_after_analysis +

`; @@ -71,20 +79,28 @@ exports[`renders correctly 2`] = ` />

+ + onboarding.analysis.java.maven.docs_link + , + } } - } - /> + /> +

+ > + onboarding.analysis.browse_url_after_analysis +

`; @@ -115,19 +131,27 @@ exports[`renders with projectKey 1`] = ` />

+ + onboarding.analysis.java.maven.docs_link + , + } } - } - /> + /> +

+ > + onboarding.analysis.auto_refresh_after_analysis +

`; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/MSBuildScanner-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/MSBuildScanner-test.tsx.snap index 740e26ed12b..094b637da72 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/MSBuildScanner-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/MSBuildScanner-test.tsx.snap @@ -9,12 +9,19 @@ exports[`renders correctly 1`] = `

+ + %PATH% + , + } } - } - /> + /> +

+ + onboarding.analysis.msbuild.docs_link + , + } } - } - /> + /> +

`; @@ -97,11 +108,22 @@ exports[`renders correctly 2`] = ` />

+ + onboarding.analysis.msbuild.docs_link + , + } } - } - /> + /> +

`; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/Other-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/Other-test.tsx.snap index 8fe780fe094..bcd28ca14b2 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/Other-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/Other-test.tsx.snap @@ -30,12 +30,23 @@ exports[`renders correctly 1`] = ` />

+ + onboarding.analysis.sq_scanner.docs_link + , + } } - } - /> + /> +

`; @@ -69,12 +80,23 @@ exports[`renders correctly 2`] = ` />

+ + onboarding.analysis.sq_scanner.docs_link + , + } } - } - /> + /> +

`; @@ -108,11 +130,22 @@ exports[`renders correctly 3`] = ` />

+ + onboarding.analysis.sq_scanner.docs_link + , + } } - } - /> + /> +

`; diff --git a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/SQScanner-test.tsx.snap b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/SQScanner-test.tsx.snap index cf6a8de4ce3..6ad4425a0a8 100644 --- a/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/SQScanner-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/tutorials/components/commands/__tests__/__snapshots__/SQScanner-test.tsx.snap @@ -9,12 +9,22 @@ exports[`renders correctly 1`] = `

+ + bin + , + "env_var": + %PATH% + , + } } - } - /> + /> +

+ + bin + , + "env_var": + PATH + , + } } - } - /> + /> +

+ + bin + , + "env_var": + PATH + , + } } - } - /> + /> +

{

diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx index 6df2b62096f..d7e4ab6ee4d 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Domain.tsx @@ -52,6 +52,7 @@ export default function Domain({ domain, query }: Props) { {domain.description && (
)} diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx index 5cf2d7c0a90..7dbf8b77860 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Params.tsx @@ -99,6 +99,7 @@ export default class Params extends React.PureComponent {
diff --git a/server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx b/server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx index 5d82b9c919a..bf21da958f5 100644 --- a/server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx +++ b/server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx @@ -84,10 +84,6 @@ export default class TreeMapRect extends React.PureComponent { const isTextVisible = this.props.width >= 40 && this.props.height >= 45; const isIconVisible = this.props.width >= 24 && this.props.height >= 26; - const label = this.props.prefix - ? `${this.props.prefix}
${this.props.label.substr(this.props.prefix.length)}` - : this.props.label; - return (
{ {this.props.icon} )} - {isTextVisible && ( - - )} + {isTextVisible && + (this.props.prefix ? ( + + {this.props.prefix} +
+ {this.props.label.substr(this.props.prefix.length)} +
+ ) : ( + {this.props.label} + ))}
{this.renderLink()}
diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/TreeMap-test.tsx b/server/sonar-web/src/main/js/components/charts/__tests__/TreeMap-test.tsx index e6ae0718d07..0f5959e5fe2 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/TreeMap-test.tsx +++ b/server/sonar-web/src/main/js/components/charts/__tests__/TreeMap-test.tsx @@ -18,17 +18,28 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { shallow } from 'enzyme'; +import { mount } from 'enzyme'; import TreeMap from '../TreeMap'; +import TreeMapRect from '../TreeMapRect'; +import { mockEvent } from '../../../helpers/testMocks'; -it('should display', () => { +it('should render correctly', () => { const items = [ { key: '1', size: 10, color: '#777', label: 'SonarQube :: Server' }, { key: '2', size: 30, color: '#777', label: 'SonarQube :: Web' }, { key: '3', size: 20, color: '#777', label: 'SonarQube :: Search' } ]; - const chart = shallow( - {}} width={100} /> + const onRectClick = jest.fn(); + const chart = mount( + ); - expect(chart.find('TreeMapRect')).toHaveLength(3); + const rects = chart.find(TreeMapRect); + expect(rects).toHaveLength(3); + + const event: React.MouseEvent = mockEvent({ stopPropagation: jest.fn() }); + (rects.first().instance() as TreeMapRect).handleLinkClick(event); + expect(event.stopPropagation).toHaveBeenCalled(); + + (rects.first().instance() as TreeMapRect).handleRectClick(); + expect(onRectClick).toHaveBeenCalledWith('2'); }); diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx index 66de3381072..09de825c56a 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.tsx @@ -89,6 +89,7 @@ export default class IssueCommentLine extends React.PureComponent
diff --git a/server/sonar-web/src/main/js/helpers/testMocks.ts b/server/sonar-web/src/main/js/helpers/testMocks.ts index 66c6a639e6f..9fd2c05f8f9 100644 --- a/server/sonar-web/src/main/js/helpers/testMocks.ts +++ b/server/sonar-web/src/main/js/helpers/testMocks.ts @@ -619,6 +619,18 @@ export function mockRuleDetails(overrides: Partial = {}): T.RuleD }; } +export function mockRuleDetailsParameter( + overrides: Partial = {} +): T.RuleParameter { + return { + defaultValue: '1', + htmlDesc: 'description', + key: '1', + type: 'number', + ...overrides + }; +} + export function mockShortLivingBranch( overrides: Partial = {} ): T.ShortLivingBranch { diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index f3cd22159f4..41f5e5e3342 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -967,6 +967,23 @@ "@types/d3-interpolate" "*" "@types/d3-selection" "*" +"@types/domhandler@*": + version "2.4.1" + resolved "https://repox.jfrog.io/repox/api/npm/npm/@types/domhandler/-/domhandler-2.4.1.tgz#7b3b347f7762180fbcb1ece1ce3dd0ebbb8c64cf" + integrity sha1-ezs0f3diGA+8sezhzj3Q67uMZM8= + +"@types/dompurify@^0.0.32": + version "0.0.32" + resolved "https://repox.jfrog.io/repox/api/npm/npm/@types/dompurify/-/dompurify-0.0.32.tgz#ccc4148d7f2e0598006611e82e840806fab4b268" + integrity sha1-zMQUjX8uBZgAZhHoLoQIBvq0smg= + +"@types/domutils@*": + version "1.7.2" + resolved "https://repox.jfrog.io/repox/api/npm/npm/@types/domutils/-/domutils-1.7.2.tgz#89422e579c165994ad5c09ce90325da596cc105d" + integrity sha1-iUIuV5wWWZStXAnOkDJdpZbMEF0= + dependencies: + "@types/domhandler" "*" + "@types/enzyme@3.9.1": version "3.9.1" resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.9.1.tgz#3a0ce07e30066dbc26cd3474c8e680af2d249e26" @@ -994,6 +1011,15 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-3.2.3.tgz#2416fee5cac641da2d05a905de5af5cb50162f60" integrity sha512-s4SNWd31cmFP52ilv3LKCh344ayIXmfmcfExsegGspgnk/pQh75Yo6v49uzSE1oFMXp+Sz4GVnesL7rgybX9tQ== +"@types/htmlparser2@*": + version "3.10.0" + resolved "https://repox.jfrog.io/repox/api/npm/npm/@types/htmlparser2/-/htmlparser2-3.10.0.tgz#b94d3b08f813c9eec12990ac6a34d8b17a7aebc9" + integrity sha1-uU07CPgTye7BKZCsajTYsXp668k= + dependencies: + "@types/domhandler" "*" + "@types/domutils" "*" + "@types/node" "*" + "@types/istanbul-lib-coverage@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#2cc2ca41051498382b43157c8227fea60363f94a" @@ -1106,6 +1132,13 @@ "@types/prop-types" "*" csstype "^2.2.0" +"@types/sanitize-html@1.20.0": + version "1.20.0" + resolved "https://repox.jfrog.io/repox/api/npm/npm/@types/sanitize-html/-/sanitize-html-1.20.0.tgz#b3beaa9eacab0e0fa5022d5faa727fea8fb9fc5d" + integrity sha1-s76qnqyrDg+lAi1fqnJ/6o+5/F0= + dependencies: + "@types/htmlparser2" "*" + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -3408,6 +3441,11 @@ domhandler@^2.3.0: dependencies: domelementtype "1" +dompurify@^1.0.11: + version "1.0.11" + resolved "https://repox.jfrog.io/repox/api/npm/npm/dompurify/-/dompurify-1.0.11.tgz#fe0f4a40d147f7cebbe31a50a1357539cfc1eb4d" + integrity sha1-/g9KQNFH98674xpQoTV1Oc/B600= + domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" 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 0264f73fad3..0e1ef8fc0fd 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -936,6 +936,13 @@ property.error.notRegexp=Not a valid Java regular expression property.error.notInOptions=Not a valid option property.category.scm=SCM property.sonar.leak.period.description=Period used to compare measures and track new issues. Values are:
  • Number of days before analysis, for example 5.
  • A custom date. Format is yyyy-MM-dd, for example 2010-12-25
  • 'previous_version' to compare to the previous version in the project history
  • A version, for example '1.2' or 'BASELINE'

When specifying a number of days or a date, the snapshot selected as the baseline for comparison is the first one available inside the corresponding time range. Specifically, the first analysis in the range is considered to be before the New Code Period.

Changing this property only takes effect after subsequent project analyses.

+property.sonar.leak.period.description.intro=Period used to compare measures and track new issues. Values are: +property.sonar.leak.period.description.item1=Number of days before analysis, for example 5. +property.sonar.leak.period.description.item2=A custom date. Format is yyyy-MM-dd, for example 2010-12-25 +property.sonar.leak.period.description.item3='previous_version' to compare to the previous version in the project history +property.sonar.leak.period.description.item4=A version, for example '1.2' or 'BASELINE' +property.sonar.leak.period.description.details1=When specifying a number of days or a date, the snapshot selected as the baseline for comparison is the first one available inside the corresponding time range. Specifically, the first analysis in the range is considered to be before the New Code Period. +property.sonar.leak.period.description.details2=Changing this property only takes effect after subsequent project analyses. property.sonar.branch.longLivedBranches.regex.description=Regular expression used to detect whether a branch is a long living branch (as opposed to short living branch), based on its name. This applies only during first analysis, the type of a branch cannot be changed later. @@ -945,7 +952,7 @@ property.sonar.branch.longLivedBranches.regex.description=Regular expression use # #------------------------------------------------------------------------------ search.shortcut_hint=Hint: Press {shortcut} from anywhere to open this search bar. -search.show_more.hint=Press {0} to display +search.show_more.hint=Press {key} to display search.placeholder=Search for projects and files... search.search_for_projects=Search for projects... search.search_for_users=Search for users... @@ -2938,37 +2945,36 @@ onboarding.language.os.win=Windows onboarding.language.os.mac=macOS onboarding.language.project_key=Define a unique project key +onboarding.analysis.docs=Please visit the {link} for more details. + onboarding.analysis.java.maven.header=Execute the Scanner for Maven from your computer onboarding.analysis.java.maven.text=Running a {instance} analysis with Maven is straighforward. You just need to run the following command in your project's folder. -onboarding.analysis.java.maven.docs=Please visit the official documentation of the Scanner for Maven for more details. +onboarding.analysis.java.maven.docs_link=official documentation of the Scanner for Maven onboarding.analysis.java.gradle.header=Execute the Scanner for Gradle from your computer -onboarding.analysis.java.gradle.text.1=Running an analysis with Gradle is straighforward. You just need to declare the org.sonarqube plugin in your build.gradle file: +onboarding.analysis.java.gradle.text.1=Running an analysis with Gradle is straighforward. You just need to declare the {plugin_code} plugin in your {filename} file: onboarding.analysis.java.gradle.text.2=and run the following command: -onboarding.analysis.java.gradle.docs=Please visit the official documentation of the Scanner for Gradle for more details. +onboarding.analysis.java.gradle.docs_link=official documentation of the Scanner for Gradle onboarding.analysis.msbuild.header=Download and unzip the Scanner for MSBuild -onboarding.analysis.msbuild.text=And add the executable's directory to the %PATH% environment variable +onboarding.analysis.msbuild.text=And add the executable's directory to the {code} environment variable onboarding.analysis.msbuild.execute=Execute the Scanner for MSBuild from your computer onboarding.analysis.msbuild.execute.text=Running a {instance} analysis is straighforward. You just need to execute the following commands at the root of your solution. -onboarding.analysis.msbuild.docs=Please visit the official documentation of the Scanner for MSBuild for more details. +onboarding.analysis.msbuild.docs_link=official documentation of the Scanner for MSBuild onboarding.analysis.build_wrapper.header.linux=Download and unzip the Build Wrapper for Linux onboarding.analysis.build_wrapper.header.win=Download and unzip the Build Wrapper for Windows onboarding.analysis.build_wrapper.header.mac=Download and unzip the Build Wrapper for macOS -onboarding.analysis.build_wrapper.text.linux=And add the executable's directory to the PATH environment variable -onboarding.analysis.build_wrapper.text.win=And add the executable's directory to the %PATH% environment variable -onboarding.analysis.build_wrapper.text.mac=And add the executable's directory to the PATH environment variable +onboarding.analysis.build_wrapper.text=And add the executable's directory to the {env_var} environment variable onboarding.analysis.sq_scanner.header.linux=Download and unzip the Scanner for Linux onboarding.analysis.sq_scanner.header.win=Download and unzip the Scanner for Windows onboarding.analysis.sq_scanner.header.mac=Download and unzip the Scanner for macOS -onboarding.analysis.sq_scanner.text.linux=And add the bin directory to the PATH environment variable -onboarding.analysis.sq_scanner.text.win=And add the bin directory to the %PATH% environment variable -onboarding.analysis.sq_scanner.text.mac=And add the bin directory to the PATH environment variable +onboarding.analysis.sq_scanner.text=And add the {dir} directory to the {env_var} environment variable onboarding.analysis.sq_scanner.execute=Execute the Scanner from your computer onboarding.analysis.sq_scanner.execute.text=Running a {instance} analysis is straighforward. You just need to execute the following commands in your project's folder. -onboarding.analysis.sq_scanner.docs=Please visit the official documentation of the Scanner for more details. +onboarding.analysis.sq_scanner.docs=Please visit the {link} for more details. +onboarding.analysis.sq_scanner.docs_link=official documentation of the Scanner onboarding.project_watcher.not_started=Once your project is analyzed, this page will refresh automatically. onboarding.project_watcher.in_progress=Analysis is in progress, please wait... @@ -3062,8 +3068,10 @@ encryption.encrypt=Encrypt encryption.secret_key_description=Secret key is required to be able to encrypt properties. {moreInformationLink} encryption.secret_key=Secret Key encryption.how_to_use=How To Use -encryption.how_to_use.content=

  • Store the secret key in the file ~/.sonar/sonar-secret.txt of the server. This file can be relocated by defining the property sonar.secretKeyPath in conf/sonar.properties
  • Restrict access to this file by making it readable and by owner only
  • Restart the server if the property sonar.secretKeyPath has been set or changed.
  • For each property that you want to encrypt, generate the encrypted value and replace the original value wherever it is stored (configuration files, command lines).
- +encryption.how_to_use.content1=Store the secret key in the file {secret_file} of the server. This file can be relocated by defining the property {property} in {propreties_file} +encryption.how_to_use.content2=Restrict access to this file by making it readable and by owner only +encryption.how_to_use.content3=Restart the server if the property {property} has been set or changed. +encryption.how_to_use.content4=For each property that you want to encrypt, generate the encrypted value and replace the original value wherever it is stored (configuration files, command lines). #------------------------------------------------------------------------------ # @@ -3152,8 +3160,10 @@ maintenance.is_down={instance} is down maintenance.sonarqube_is_down.text=Something went wrong. Please contact your system administrator. maintenance.try_again=Try Again maintenance.is_under_maintenance={instance} is under maintenance -maintenance.sonarqube_is_under_maintenance.1=While waiting, you might want to investigate new plugins to extend the current functionality. -maintenance.sonarqube_is_under_maintenance.2=If you are an administrator and have no idea why this message is being shown, you should read the upgrade guide. +maintenance.sonarqube_is_under_maintenance.1=While waiting, you might want to investigate {link} to extend the current functionality. +maintenance.sonarqube_is_under_maintenance_link.1=new plugins +maintenance.sonarqube_is_under_maintenance.2=If you are an administrator and have no idea why this message is being shown, you should read the {link}. +maintenance.sonarqube_is_under_maintenance_link.2=upgrade guide maintenance.is_starting={instance} is starting maintenance.is_up={instance} is up maintenance.all_systems_opetational=All systems operational. -- 2.39.5