<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://air.imag.fr/index.php?action=history&amp;feed=atom&amp;title=SonarQube_Scanner</id>
	<title>SonarQube Scanner - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://air.imag.fr/index.php?action=history&amp;feed=atom&amp;title=SonarQube_Scanner"/>
	<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;action=history"/>
	<updated>2026-06-19T13:50:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44882&amp;oldid=prev</id>
		<title>Zoran.Chanet: /* Configuration */</title>
		<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44882&amp;oldid=prev"/>
		<updated>2019-02-08T12:30:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configuration&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:30, 8 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Afin que le runner nouvellement installé bénéficie simplement de la configuration décidée en amont, cette configuration est faite pour le projet, dans le fichier &amp;lt;code&amp;gt;sonar-project.properties&amp;lt;/code&amp;gt; dans le dossier racine du projet. Ce fichier spécifie la configuration utilisée par le scanner pour l’analyse du projet.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Afin que le runner nouvellement installé bénéficie simplement de la configuration décidée en amont, cette configuration est faite pour le projet, dans le fichier &amp;lt;code&amp;gt;sonar-project.properties&amp;lt;/code&amp;gt; dans le dossier racine du projet. Ce fichier spécifie la configuration utilisée par le scanner pour l’analyse du projet.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Comme expliqué dans la page dédiée à [[GitLab CI/CD]], le fichier &amp;lt;code&amp;gt;.gitlab-ci.yml&amp;lt;/code&amp;gt; définit le comportement du pipeline. Ici, il nous est donc utile à télécharger, installer et utiliser le scanner.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Comme expliqué dans la page dédiée à [[GitLab CI/CD]], le fichier &amp;lt;code&amp;gt;.gitlab-ci.yml&amp;lt;/code&amp;gt; définit le comportement du pipeline. Ici, il nous est donc utile à télécharger, installer et utiliser le scanner.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le fichier &amp;lt;code&amp;gt;sonar-project.properties&amp;lt;/code&amp;gt; définit les variables de configuration utilisées par le scanner.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Le fichier &amp;lt;code&amp;gt;sonar-project.properties&amp;lt;/code&amp;gt; définit les variables de configuration utilisées par le&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; scanner. Il est également possible de configurer le scanner en ligne de commande, en ajoutant les options sous la forme &amp;lt;code&amp;gt;-D &amp;lt;property-name&amp;gt;=&amp;lt;property-value&amp;gt;&amp;lt;/code&amp;gt; lors de l&#039;appel au&lt;/ins&gt; scanner.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== .gitlab-ci.yml ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== .gitlab-ci.yml ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zoran.Chanet</name></author>
	</entry>
	<entry>
		<id>https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44873&amp;oldid=prev</id>
		<title>Zoran.Chanet: /* sonar-project.properties */</title>
		<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44873&amp;oldid=prev"/>
		<updated>2019-02-08T10:36:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;sonar-project.properties&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:36, 8 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.login=&amp;lt;authentication-token&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.login=&amp;lt;authentication-token&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.projectVersion=1.0&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.projectVersion=1.0&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Optional metadata&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Optional metadata&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Default: master&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Default: master&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zoran.Chanet</name></author>
	</entry>
	<entry>
		<id>https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44872&amp;oldid=prev</id>
		<title>Zoran.Chanet: /* sonar-project.properties */</title>
		<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44872&amp;oldid=prev"/>
		<updated>2019-02-08T10:36:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;sonar-project.properties&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:36, 8 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.projectKey=&amp;lt;project-key&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.projectKey=&amp;lt;project-key&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.organization=&amp;lt;organization&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.organization=&amp;lt;organization&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-added&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.login=&amp;lt;authentication-token&amp;gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.login=&amp;lt;authentication-token&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.projectVersion=1.0&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; sonar.projectVersion=1.0&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Optional metadata&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Default: master&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # sonar.branch.name=&amp;lt;branch-name&amp;gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Comma-separated paths to directories with sources (required)&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; # Comma-separated paths to directories with sources (required)&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zoran.Chanet</name></author>
	</entry>
	<entry>
		<id>https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44851&amp;oldid=prev</id>
		<title>Zoran.Chanet: Created page with &quot;= Auteur =  CHANET Zoran  = Introduction = Cette page explique rapidement le fonctionnement des scanners SonarQube, et en explique la configuration afin...&quot;</title>
		<link rel="alternate" type="text/html" href="https://air.imag.fr/index.php?title=SonarQube_Scanner&amp;diff=44851&amp;oldid=prev"/>
		<updated>2019-02-07T10:26:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Auteur = &lt;a href=&quot;/index.php/User:Zoran.Chanet&quot; title=&quot;User:Zoran.Chanet&quot;&gt; CHANET Zoran&lt;/a&gt;  = Introduction = Cette page explique rapidement le fonctionnement des scanners SonarQube, et en explique la configuration afin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Auteur =&lt;br /&gt;
[[User:Zoran.Chanet | CHANET Zoran]]&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
Cette page explique rapidement le fonctionnement des scanners SonarQube, et en explique la configuration afin qu&amp;#039;il analyse un projet au sein d&amp;#039;un pipeline d&amp;#039;intégration continue [[GitLab CI/CD]] et envoie les données récoltées à [https://sonarcloud.io/ SonarCloud]. Il est également possible d&amp;#039;installer un server SonarQube et de configurer le scanner pour qu&amp;#039;il envoie les informations sur ce server (&amp;lt;code&amp;gt;sonar.host.url&amp;lt;/code&amp;gt;). Pour l&amp;#039;installation d&amp;#039;un tel serveur, voir [[SonarQube]].&lt;br /&gt;
&lt;br /&gt;
= Scanner =&lt;br /&gt;
Le scanner est celui qui nous permettra de parcourir les fichiers et de relever les erreurs. Il doit être installé sur la machine qui l’utilise. Dans le cas de l&amp;#039;intégration continue [[GitLab CI/CD]], il doit donc être installé sur le runner qui exécute le job correspondant. Afin d’éviter de devoir contrôler précisément quels runners sont utilisés pour le job, et de devoir synchroniser les installations sur tous les runners du projet, il est possible de télécharger et installer le scanner au début du script dans le fichier &amp;lt;code&amp;gt;.gitlab-ci.yml&amp;lt;/code&amp;gt; qui définit le pipeline.&lt;br /&gt;
&lt;br /&gt;
= Serveur =&lt;br /&gt;
Le scanner se contente d’analyser le code. Pour obtenir le bel affichage auquel nous a habitué [https://www.sonarqube.org/ SonarQube], le résultat de cette analyse doit être envoyé à un serveur. Dans le cas de l&amp;#039;intégration continue [[GitLab CI/CD]], puisque le scan tourne sur le runner, il faut que le serveur soit actif et exposé (si le serveur sonar était installé sur le runner et lancé en local avant le scan, il serait détruit à l’arrêt du runner). Il est possible d&amp;#039;utiliser [https://sonarcloud.io/ SonarCloud], un serveur sonar public et gratuit pour les projets opensource. Il faut alors configurer le projet scanné pour que l’analyse soit envoyée à SonarCloud, en renseignant le bon projet, la bonne compagnie et le bon token d’authentification (il faut que l’utilisateur ait le droit de lancer une analyse).&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
Afin que le runner nouvellement installé bénéficie simplement de la configuration décidée en amont, cette configuration est faite pour le projet, dans le fichier &amp;lt;code&amp;gt;sonar-project.properties&amp;lt;/code&amp;gt; dans le dossier racine du projet. Ce fichier spécifie la configuration utilisée par le scanner pour l’analyse du projet.&amp;lt;br&amp;gt;&lt;br /&gt;
Comme expliqué dans la page dédiée à [[GitLab CI/CD]], le fichier &amp;lt;code&amp;gt;.gitlab-ci.yml&amp;lt;/code&amp;gt; définit le comportement du pipeline. Ici, il nous est donc utile à télécharger, installer et utiliser le scanner.&amp;lt;br&amp;gt;&lt;br /&gt;
Le fichier &amp;lt;code&amp;gt;sonar-project.properties&amp;lt;/code&amp;gt; définit les variables de configuration utilisées par le scanner.&lt;br /&gt;
&lt;br /&gt;
== .gitlab-ci.yml ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;/!\&amp;lt;/span&amp;gt; Ce fichier est un &amp;lt;code&amp;gt;.yml&amp;lt;/code&amp;gt;, l’identation (avec des espaces et non des tabulations) est &amp;#039;&amp;#039;&amp;#039;importante&amp;#039;&amp;#039;&amp;#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Le script sonar-analysis télécharge d&amp;#039;abord une archive de scanner (ici, la version &amp;#039;3.3.0.1492&amp;#039;), puis l&amp;#039;extrait (au cas où le scanner ne puisse utiliser unzip, un fichier python est défini pour extraire l&amp;#039;archive). Après avoir donné au runner les droits d&amp;#039;exécution du scanner, l&amp;#039;analyse est lancée.&lt;br /&gt;
 stages:&lt;br /&gt;
   - test&lt;br /&gt;
 &lt;br /&gt;
 sonar-analysis:&lt;br /&gt;
   stage: test&lt;br /&gt;
   script:&lt;br /&gt;
     - wget &amp;quot;https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.3.0.1492-linux.zip&amp;quot;&lt;br /&gt;
     - echo &amp;quot;import zipfile&amp;quot; &amp;gt; unzip.py&lt;br /&gt;
     - echo &amp;quot;&amp;quot; &amp;gt;&amp;gt; unzip.py&lt;br /&gt;
     - echo &amp;quot;with zipfile.ZipFile(&amp;#039;sonar-scanner-cli-3.3.0.1492-linux.zip&amp;#039;, \&amp;quot;r\&amp;quot;) as z:&amp;quot; &amp;gt;&amp;gt; unzip.py&lt;br /&gt;
     - echo &amp;quot;  z.extractall(\&amp;quot;.\&amp;quot;)&amp;quot; &amp;gt;&amp;gt; unzip.py&lt;br /&gt;
     - python unzip.py&lt;br /&gt;
     - rm unzip.py&lt;br /&gt;
     - rm sonar-scanner-cli-3.3.0.1492-linux.zip&lt;br /&gt;
     - chmod -R +x sonar-scanner-3.3.0.1492-linux/&lt;br /&gt;
     - sonar-scanner-3.3.0.1492-linux/bin/sonar-scanner&lt;br /&gt;
&lt;br /&gt;
== sonar-project.properties ==&lt;br /&gt;
 # sonarqube server&lt;br /&gt;
 sonar.host.url=https://sonarcloud.io&lt;br /&gt;
 &lt;br /&gt;
 # Required metadata&lt;br /&gt;
 # must be unique in a given SonarQube instance&lt;br /&gt;
 sonar.projectKey=&amp;lt;project-key&amp;gt;&lt;br /&gt;
 sonar.organization=&amp;lt;organization&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 sonar.login=&amp;lt;authentication-token&amp;gt;&lt;br /&gt;
 sonar.projectVersion=1.0&lt;br /&gt;
 &lt;br /&gt;
 # Comma-separated paths to directories with sources (required)&lt;br /&gt;
 # Path is relative to the sonar-project.properties file. Replace &amp;quot;\&amp;quot; by &amp;quot;/&amp;quot; on Windows.&lt;br /&gt;
 # This property is optional if sonar.modules is set.&lt;br /&gt;
 sonar.sources=.&lt;br /&gt;
 sonar.exclusions=sonar-scanner-3.3.0.1492-linux/**,&amp;lt;paths-to-exclude-from-scan&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 # Language&lt;br /&gt;
 #sonar.language=javascript&lt;br /&gt;
 sonar.c.file.suffixes=-&lt;br /&gt;
 sonar.cpp.file.suffixes=-&lt;br /&gt;
 sonar.objc.file.suffixes=-&lt;br /&gt;
 &lt;br /&gt;
 # Encoding of the source code. Default is default system encoding&lt;br /&gt;
 sonar.sourceEncoding=UTF-8&lt;br /&gt;
&lt;br /&gt;
= Sources =&lt;br /&gt;
[https://docs.sonarqube.org/latest/setup/get-started-2-minutes/ https://docs.sonarqube.org/latest/setup/get-started-2-minutes/]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://docs.sonarqube.org/latest/analysis/analysis-parameters/ https://docs.sonarqube.org/latest/analysis/analysis-parameters/]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/]&lt;/div&gt;</summary>
		<author><name>Zoran.Chanet</name></author>
	</entry>
</feed>