Skip to content

Commit

Permalink
Small updates in Quality gate
Browse files Browse the repository at this point in the history
  • Loading branch information
smth-to-smb committed Feb 16, 2024
1 parent 3f73100 commit 4632558
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions topics/quality-gate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

<var name="protectionrule" value="repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule"/>

<p><emphasis>Quality gate</emphasis> are quality control techniques that let you
control your code quality and build software that meets your quality expectations. If a quality gate condition
fails, %product% terminates using exit code 255, which makes a CI/CD workflow or pipeline fail. For example, if
a quality gate for a project is set to 10 problems and code coverage is set to 40%, a build workflow will fail
if %product% detects either an eleventh problem or code coverage below the 40% threshold. </p>
<p><emphasis>Quality gates</emphasis> are techniques that let you control your code quality and build software that
meets your quality expectations. If a quality gate condition fails, %product% terminates using exit code 255,
which makes a CI/CD workflow or pipeline fail. For example, if a quality gate for a project is set to 10 problems
and code coverage is set to 40%, a build workflow will fail if %product% detects either an eleventh problem or
code coverage below the 40% threshold.</p>

<p>The terms <emphasis>quality gate</emphasis>, <emphasis>threshold</emphasis> and <emphasis>fail threshold</emphasis>
are used interchangeably.</p>

<p>You can configure a single quality gate for an entire project, multiple quality gates for each separate
<a href="faq.xml" anchor="faq-severities">problem severity</a>, and
<p>You can configure a single quality gate for the total number of project problems, multiple quality gates for
each separate <a href="faq.xml" anchor="faq-severities">problem severity</a>, and
<a href="code-coverage.md">code coverage</a> thresholds as explained in the table below.</p>

<table>
Expand Down Expand Up @@ -49,17 +49,17 @@

<p>%product% follows these rules:</p>
<list>
<li>Given a <a anchor="quality-gate-project-threshold">project quality gate</a> of <emphasis>A</emphasis>, when finding <emphasis>A</emphasis> problems, the run will succeed. When finding <emphasis>A+1</emphasis> problems, the run will fail.</li>
<li>Given a <a anchor="quality-gate-project-threshold">total quality gate</a> of <emphasis>A</emphasis>, when finding <emphasis>A</emphasis> problems, the run will succeed. When finding <emphasis>A+1</emphasis> problems, the run will fail.</li>
<li>Given a <a anchor="quality-gate-severity-threshold">severity quality gate</a> of <emphasis>B</emphasis>, when finding <emphasis>B</emphasis> problems, the run will succeed. When finding <emphasis>B+1</emphasis> problems, the run will fail.</li>
<li>Given a <a anchor="quality-gate-code-coverage">code coverage threshold</a> of <emphasis>C</emphasis>, when <emphasis>C%</emphasis> of lines are covered, the run will succeed. If only <emphasis>C-1%</emphasis> are covered, the run will fail.</li>
<li>Given a <a anchor="quality-gate-code-coverage">code coverage quality gate</a> of <emphasis>C</emphasis>, when <emphasis>C%</emphasis> of lines are covered, the run will succeed. If only <emphasis>C-1%</emphasis> are covered, the run will fail.</li>
</list>

<tip>If you configure a quality gate and <a href="baseline.xml">baseline</a> together, you'll be able to keep the number
of new problems under control, and the overall technical debt will not grow beyond a certain threshold.</tip>

</chapter>

<chapter id="quality-gate-project-threshold" title="Project quality gate">
<chapter id="quality-gate-project-threshold" title="Total problems">

<p>You can configure a single quality gate for the entire project using the <code>fail-threshold</code> option
available in all %product% <a href="linters.md">linters</a>, see examples below.</p>
Expand Down Expand Up @@ -216,7 +216,7 @@
</code>
</chapter>

<chapter id="quality-gate-severity-threshold" title="Severity quality gate">
<chapter id="quality-gate-severity-threshold" title="Severity-specific problems">

<p>All <a href="linters.md">linters</a> except <a href="qodana-dotnet-community.md"/> let you configure
separate quality gates for each <a href="faq.xml" anchor="faq-severities">problem severity</a>, and
Expand Down

0 comments on commit 4632558

Please sign in to comment.