*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { DotNetProps } from './DotNet';
import DotNetExecute from './DotNetExecute';
<h4 className="spacer-bottom huge-spacer-top">
{translate('onboarding.analysis.msbuild.header')}
</h4>
- <p className="spacer-bottom markdown">
+ <p className="markdown">
<FormattedMessage
defaultMessage={translate('onboarding.analysis.msbuild.text')}
id="onboarding.analysis.msbuild.text"
- values={{ code: <code>%PATH%</code> }}
+ values={{
+ code: <code>%PATH%</code>,
+ link: (
+ <a
+ href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
+ rel="noopener noreferrer"
+ target="_blank">
+ {translate('onboarding.analysis.msbuild.docs_link')}
+ </a>
+ )
+ }}
/>
</p>
- <p>
- <Link
- className="button"
- to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
- target="_blank">
- {translate('download_verb')}
- </Link>
- </p>
</div>
<DotNetExecute commands={commands} />
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { OSs } from '../../types';
os: OSs;
}
-export default function SQScanner(props: Props) {
+export default function DownloadScanner(props: Props) {
const { os } = props;
return (
<div>
id="onboarding.analysis.sq_scanner.text"
values={{
dir: <code>bin</code>,
- env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>
+ env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>,
+ link: (
+ <a
+ href="https://redirect.sonarsource.com/doc/download-scanner.html"
+ rel="noopener noreferrer"
+ target="_blank">
+ {translate('onboarding.analysis.sq_scanner.docs_link')}
+ </a>
+ )
}}
/>
</p>
- <p>
- <Link className="button" to="/documentation/analysis/scan/sonarscanner/" target="_blank">
- {translate('download_verb')}
- </Link>
- </p>
</div>
);
}
<DownloadBuildWrapper
os="linux"
/>
- <SQScanner
+ <DownloadScanner
os="linux"
/>
<ExecBuildWrapper
onboarding.analysis.msbuild.header
</h4>
<p
- className="spacer-bottom markdown"
+ className="markdown"
>
<FormattedMessage
defaultMessage="onboarding.analysis.msbuild.text"
"code": <code>
%PATH%
</code>,
+ "link": <a
+ href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ onboarding.analysis.msbuild.docs_link
+ </a>,
}
}
/>
</p>
- <p>
- <Link
- className="button"
- onlyActiveOnIndex={false}
- style={Object {}}
- target="_blank"
- to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
- >
- download_verb
- </Link>
- </p>
</div>
<DotNetExecute
commands={
"env_var": <code>
PATH
</code>,
+ "link": <a
+ href="https://redirect.sonarsource.com/doc/download-scanner.html"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ onboarding.analysis.sq_scanner.docs_link
+ </a>,
}
}
/>
</p>
- <p>
- <Link
- className="button"
- onlyActiveOnIndex={false}
- style={Object {}}
- target="_blank"
- to="/documentation/analysis/scan/sonarscanner/"
- >
- download_verb
- </Link>
- </p>
</div>
`;
"env_var": <code>
PATH
</code>,
+ "link": <a
+ href="https://redirect.sonarsource.com/doc/download-scanner.html"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ onboarding.analysis.sq_scanner.docs_link
+ </a>,
}
}
/>
</p>
- <p>
- <Link
- className="button"
- onlyActiveOnIndex={false}
- style={Object {}}
- target="_blank"
- to="/documentation/analysis/scan/sonarscanner/"
- >
- download_verb
- </Link>
- </p>
</div>
`;
"env_var": <code>
%PATH%
</code>,
+ "link": <a
+ href="https://redirect.sonarsource.com/doc/download-scanner.html"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ onboarding.analysis.sq_scanner.docs_link
+ </a>,
}
}
/>
</p>
- <p>
- <Link
- className="button"
- onlyActiveOnIndex={false}
- style={Object {}}
- target="_blank"
- to="/documentation/analysis/scan/sonarscanner/"
- >
- download_verb
- </Link>
- </p>
</div>
`;
exports[`renders correctly 1`] = `
<div>
- <SQScanner
+ <DownloadScanner
os="linux"
/>
<ExecScanner
onboarding.analysis.java.gradle.text.1.sonarcloud=Declare the {plugin} plugin in your {file} file:
onboarding.analysis.java.gradle.text.2.sonarcloud=and add the following lines to your {file} file:
-onboarding.analysis.msbuild.header=Download and unzip the Scanner for MSBuild
-onboarding.analysis.msbuild.text=And add the executable's directory to the {code} environment variable
+onboarding.analysis.msbuild.header=Download and unzip the Scanner for .NET
+onboarding.analysis.msbuild.text=Visit the {link} to download the latest version, and add the executable's directory to the {code} environment variable
onboarding.analysis.msbuild.execute=Execute the Scanner for .NET 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_link=official documentation of the Scanner for .NET
-onboarding.analysis.msbuild.header.sonarcloud=Download and unzip the Scanner for MSBuild
-onboarding.analysis.msbuild.text.sonarcloud=And add the executable's directory to the <code>%PATH%</code> environment variable
-onboarding.analysis.msbuild.execute.sonarcloud=Execute the Scanner for MSBuild from your computer
-onboarding.analysis.msbuild.execute.text.sonarcloud=Execute the following commands at the root of your solution.
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=And add the {dir} directory to the {env_var} environment variable
-onboarding.analysis.sq_scanner.text.linux=And add the <code>bin</code> directory to the <code>PATH</code> environment variable
-onboarding.analysis.sq_scanner.text.win=And add the <code>bin</code> directory to the <code>%PATH%</code> environment variable
-onboarding.analysis.sq_scanner.text.mac=And add the <code>bin</code> directory to the <code>PATH</code> environment variable
-onboarding.analysis.sq_scanner.text.ci=And add the <code>bin</code> directory to the <code>PATH</code> environment variable
-onboarding.analysis.sq_scanner.text.sonarcloud=Add the following lines to your {file} file:
+onboarding.analysis.sq_scanner.text=Visit the {link} to download the latest version, 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.execute.text.custom=Run the following commands in your project's folder.