Skip to content

Commit

Permalink
Deployed b4e4a61 to . with MkDocs 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklem committed Apr 2, 2024
1 parent 996c336 commit 040d48a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 43 deletions.
2 changes: 1 addition & 1 deletion feed_rss_created.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion feed_rss_updated.xml

Large diffs are not rendered by default.

66 changes: 36 additions & 30 deletions repositories-configure/codacy-configuration-file/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="description" content="Use the Codacy configuration file to configure advanced features on Codacy with more control such as ignoring files for duplication or a specific tool, configuring the root directory to start the analysis, and adding custom file extensions to languages.">


<meta http-equiv="last-modified" content="2024-01-26 16:42:49">
<meta http-equiv="last-modified" content="2024-04-02 11:28:11">


<link rel="canonical" href="https://docs.codacy.com/repositories-configure/codacy-configuration-file/">
Expand Down Expand Up @@ -817,22 +817,22 @@
<ul class="md-nav__list" data-md-scrollfix>

<li class="md-nav__item">
<a href="#syntax-for-ignoring-files" class="md-nav__link">
Syntax for ignoring files
<a href="#using-a-codacy-configuration-file" class="md-nav__link">
Using a Codacy configuration file
</a>

</li>

<li class="md-nav__item">
<a href="#which-tools-can-be-configured-and-which-name-should-i-use" class="md-nav__link">
Which tools can be configured and which name should I use?
<a href="#ignore-files" class="md-nav__link">
Ignoring files using a Codacy configuration file
</a>

</li>

<li class="md-nav__item">
<a href="#tool-specific-configurations" class="md-nav__link">
Tool-specific configurations
<a href="#tool-conf" class="md-nav__link">
Adjusting tool configurations
</a>

</li>
Expand Down Expand Up @@ -4080,37 +4080,32 @@ <h1 id="codacy-configuration-file">Codacy configuration file<a class="headerlink
<p>Codacy supports configuring certain advanced features through a configuration file, such as:</p>
<ul>
<li>
<p>Ignoring files globally, for duplication, or a specific tool</p>
<p><a href="#ignore-files">Ignoring files</a> globally, for duplication, or a specific tool</p>
</li>
<li>
<p>Configuring a specific repository directory on which to start the analysis</p>
<p>Adjusting <a href="#tool-conf">tool-specific configurations</a></p>
</li>
<li>
<p>Adding custom file extensions to languages, keeping in mind that some tools might not work out of the box with those extensions</p>
<p>Configuring a specific repository directory on which to start the analysis</p>
</li>
<li>
<p>Adjusting <a href="#tool-specific-configurations">tool-specific configurations</a></p>
<p>Adding custom file extensions to languages, keeping in mind that some tools might not work out of the box with those extensions</p>
</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul>
<li>If a Codacy configuration file exists in your repository, the <a href="../ignoring-files/">Ignored files settings</a> defined on the Codacy UI don't apply and you must ignore files using the configuration file instead.</li>
<li>To disable a tool you must use the <a href="../configuring-code-patterns/">Code patterns page</a> instead.</li>
<li>To exclude files from coverage analysis only, you must ignore them directly in the tool you're using to generate coverage reports and ensure that the reports you upload to Codacy don't include coverage information for those files.</li>
</ul>
<h2 id="using-a-codacy-configuration-file">Using a Codacy configuration file<a class="headerlink" href="#using-a-codacy-configuration-file" title="Permanent link">#</a></h2>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>If your repository has a Codacy configuration file, the <a href="../ignoring-files/">Ignored files settings</a> defined on the Codacy UI don't apply and you must <a href="#syntax-for-ignoring-files">ignore files using the configuration file</a> instead.</p>
</div>
<p>To use a Codacy configuration file:</p>
<ol>
<li>
<p>Create a text file with the name <code>.codacy.yml</code> or <code>.codacy.yaml</code> on the root of your repository.</p>
<p>The file must start with a line containing a triple dash (<code>---</code>).</p>
</li>
<li>
<p>Add your settings to the configuration file based on the example template below.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>The configuration file must start with a line containing a triple dash (<code>---</code>).</p>
</div>
<p>If you defined any <a href="../ignoring-files/">Ignored files settings</a> for the repository, make sure you <a href="#syntax-for-ignoring-files">add those settings</a> to the Codacy configuration file.</p>
<div class="highlight"><pre><span></span><code><span class="nn">---</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="nt">rubocop</span><span class="p">:</span>
Expand Down Expand Up @@ -4141,7 +4136,13 @@ <h1 id="codacy-configuration-file">Codacy configuration file<a class="headerlink
</code></pre></div>
</li>
</ol>
<h2 id="syntax-for-ignoring-files">Syntax for ignoring files<a class="headerlink" href="#syntax-for-ignoring-files" title="Permanent link">#</a></h2>
<h2 id="ignore-files">Ignoring files using a Codacy configuration file<a class="headerlink" href="#ignore-files" title="Permanent link">#</a></h2>
<p>The Codacy configuration file gives you more flexibility in <a href="../ignoring-files/">ignoring or excluding files</a> from the Codacy analysis.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>To exclude files from coverage analysis only, you must ignore them directly in the tool you're using to generate coverage reports and ensure that the reports you upload to Codacy don't include coverage information for those files.</p>
</div>
<h3 id="syntax-for-ignoring-files">Syntax for ignoring files<a class="headerlink" href="#syntax-for-ignoring-files" title="Permanent link">#</a></h3>
<p>To ignore files using a Codacy configuration file, you must define one or more patterns under <code>exclude_paths</code> using the <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher%28java.lang.String%29">Java glob syntax</a>:</p>
<table>
<thead>
Expand Down Expand Up @@ -4183,7 +4184,12 @@ <h2 id="syntax-for-ignoring-files">Syntax for ignoring files<a class="headerlink
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;test/README.md&quot;</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;**/*.resource&quot;</span>
</code></pre></div>
<h2 id="which-tools-can-be-configured-and-which-name-should-i-use">Which tools can be configured and which name should I use?<a class="headerlink" href="#which-tools-can-be-configured-and-which-name-should-i-use" title="Permanent link">#</a></h2>
<h2 id="tool-conf">Adjusting tool configurations<a class="headerlink" href="#tool-conf" title="Permanent link">#</a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The Codacy configuration file lets you <a href="#tool-specific-configurations">configure tools</a>, but you can't enable or disable them. A tool can only be enabled or disabled on the <a href="../configuring-code-patterns/">Code patterns page</a> by users with the <a href="../../organizations/roles-and-permissions-for-organizations/">necessary permissions</a>.</p>
</div>
<h3 id="which-tools-can-be-configured-and-which-name-should-i-use">Which tools can be configured and which name should I use?<a class="headerlink" href="#which-tools-can-be-configured-and-which-name-should-i-use" title="Permanent link">#</a></h3>
<p>You can use the Codacy configuration file to configure all tools supported by Codacy except the <a href="../local-analysis/client-side-tools/">client-side tools</a>.</p>
<p>The following are the tool names that must be used in the Codacy configuration file:</p>
<div class="highlight"><pre><span></span><code>ameba
Expand Down Expand Up @@ -4233,24 +4239,24 @@ <h2 id="which-tools-can-be-configured-and-which-name-should-i-use">Which tools c
<li><code>pylint</code> - Use the name <code>pylintpython3</code> for <strong>Pylint</strong>.</li>
<li><code>tailor</code> - The tool <strong>Tailor</strong> <a href="../../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation/">is deprecated</a>. If you are using <strong>SwiftLint</strong> instead, use the name <code>swiftlint</code>.</li>
</ul>
<h2 id="tool-specific-configurations">Tool-specific configurations<a class="headerlink" href="#tool-specific-configurations" title="Permanent link">#</a></h2>
<h3 id="tool-specific-configurations">Tool-specific configurations<a class="headerlink" href="#tool-specific-configurations" title="Permanent link">#</a></h3>
<p>By default, Codacy tries to detect which language is used on each source code file, and uses a set of default options for identifying duplicate blocks of code. However, some false positives may occur.</p>
<p>The tools below support specifying the language or language version used in the source code files that you're analyzing, or tuning the duplication detection.</p>
<h3 id="cppcheck">Cppcheck<a class="headerlink" href="#cppcheck" title="Permanent link">#</a></h3>
<h4 id="cppcheck">Cppcheck<a class="headerlink" href="#cppcheck" title="Permanent link">#</a></h4>
<p>If you're using Cppcheck to analyze C or C++ source code files, add the following configuration to your Codacy configuration file to define the programming language you're using. The supported languages are <code>c</code> and <code>c++</code>:</p>
<div class="highlight"><pre><span></span><code><span class="nn">---</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="nt">cppcheck</span><span class="p">:</span>
<span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">c++</span>
</code></pre></div>
<h3 id="php_codesniffer">PHP_CodeSniffer<a class="headerlink" href="#php_codesniffer" title="Permanent link">#</a></h3>
<h4 id="php_codesniffer">PHP_CodeSniffer<a class="headerlink" href="#php_codesniffer" title="Permanent link">#</a></h4>
<p>If you're using the <a href="https://github.com/PHPCompatibility/PHPCompatibility">PHP Compatibility</a> coding standard for PHP_CodeSniffer, add the following configuration to your Codacy configuration file to <a href="https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions">define the PHP version</a> you're using:</p>
<div class="highlight"><pre><span></span><code><span class="nn">---</span>
<span class="nt">engines</span><span class="p">:</span>
<span class="w"> </span><span class="nt">phpcs</span><span class="p">:</span>
<span class="w"> </span><span class="nt">php_version</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5.5</span>
</code></pre></div>
<h3 id="legacy-pylint-19">Legacy Pylint 1.9.*<a class="headerlink" href="#legacy-pylint-19" title="Permanent link">#</a></h3>
<h4 id="legacy-pylint-19">Legacy Pylint 1.9.*<a class="headerlink" href="#legacy-pylint-19" title="Permanent link">#</a></h4>
<p>If you're using the legacy Pylint 1.9.* to analyze Python source code files, add the following configuration to your Codacy configuration file to define the Python language version you're using. The supported versions are <code>2</code> and <code>3</code>:</p>
<div class="highlight"><pre><span></span><code><span class="nn">---</span>
<span class="nt">engines</span><span class="p">:</span>
Expand All @@ -4261,7 +4267,7 @@ <h3 id="legacy-pylint-19">Legacy Pylint 1.9.*<a class="headerlink" href="#legacy
<p class="admonition-title">Tip</p>
<p>If you're using Python 3.4.* or later as your programming language, disable the tool <strong>Pylint (legacy)</strong> and enable the tool <strong>Pylint</strong> on your repository <a href="../configuring-code-patterns/">Code patterns page</a> instead. For more information, see <a href="https://pylint.pycqa.org/en/latest/whatsnew/2/2.0/index.html">What's New in Pylint 2.0</a>.</p>
</div>
<h3 id="pmd-cpd-duplication">PMD CPD (Duplication)<a class="headerlink" href="#pmd-cpd-duplication" title="Permanent link">#</a></h3>
<h4 id="pmd-cpd-duplication">PMD CPD (Duplication)<a class="headerlink" href="#pmd-cpd-duplication" title="Permanent link">#</a></h4>
<p>Codacy uses <a href="https://docs.pmd-code.org/latest/">PMD's Copy/Paste Detector (CPD)</a> to identify duplicated blocks of code <a href="../../getting-started/supported-languages-and-tools/">on the supported languages</a>.</p>
<p>By default, Codacy only reports duplicate code blocks that have the following minimum token length, depending on the language:</p>
<table>
Expand Down Expand Up @@ -4492,7 +4498,7 @@ <h3>Share your feedback 📢</h3>
<div class="md-source-date">
<small>

Last modified <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">January 26, 2024</span>
Last modified <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">April 2, 2024</span>

</small>
</div>
Expand Down
35 changes: 25 additions & 10 deletions repositories-configure/ignoring-files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="description" content="Ignore or exclude files from the Codacy analysis and see the list of files that Codacy already ignores by default.">


<meta http-equiv="last-modified" content="2023-11-27 09:34:24">
<meta http-equiv="last-modified" content="2024-04-02 11:28:11">


<link rel="canonical" href="https://docs.codacy.com/repositories-configure/ignoring-files/">
Expand Down Expand Up @@ -4069,26 +4069,40 @@ <h1 id="ignoring-files">Ignoring files<a class="headerlink" href="#ignoring-file
<p>In some situations, you may want to ignore or exclude files from the Codacy analysis.</p>
<p>To exclude files from your repository analysis open your repository <strong>Settings</strong>, tab <strong>Ignored Files</strong>, and select the files you want to ignore. This view only shows the files on your main branch.</p>
<p><img alt="Ignored files" src="../images/ignored-files.png" /></p>
<p>You can also ignore files using your own <a href="../configuring-code-patterns/#using-your-own-tool-configuration-files">tool configuration files</a>, although this depends on the option being supported by each tool.</p>
<p>If you need more flexibility in ignoring files, use a Codacy configuration file to <a href="../codacy-configuration-file/#syntax-for-ignoring-files">define a custom list of file paths to exclude</a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul>
<li>
<p>See below the files that Codacy <a href="#default-ignored-files">ignores by default</a>.</p>
</li>
<li>
<p>You can also ignore files using your own <a href="../configuring-code-patterns/#using-your-own-tool-configuration-files">tool configuration files</a>, although this depends on the option being supported by each tool.</p>
</li>
<li>
<p>To exclude files from coverage analysis only, you must ignore them directly in the tool you're using to generate coverage reports and ensure that the reports you upload to Codacy don't include coverage information for those files.</p>
</li>
</ul>
</div>
<p>If you need more flexibility in ignoring files, use a Codacy configuration file to <a href="../codacy-configuration-file/#syntax-for-ignoring-files">define a custom list of file paths to exclude</a>.</p>
<div class="admonition important">
<p class="admonition-title">Important</p>
<p>If your repository has a <a href="../codacy-configuration-file/">Codacy configuration file</a>, the <strong>Ignored files</strong> settings defined on the Codacy UI don't apply and you must <a href="../codacy-configuration-file/#ignore-files">ignore files using the configuration file</a> instead.</p>
</div>
<p><img alt="Ignored files" src="../images/ignored-files-configuration-file.png" /></p>
<h2 id="default-ignored-files">Default ignored files<a class="headerlink" href="#default-ignored-files" title="Permanent link">#</a></h2>
<p>By default, Codacy ignores all the files that match the regular expressions below. If you want to override these defaults, use a Codacy configuration file to <a href="../codacy-configuration-file/#syntax-for-ignoring-files">define a custom list of file paths to exclude</a>.</p>
<p>By default, Codacy ignores all the files that match the regular expressions below.</p>
<div class="highlight"><pre><span></span><code>.*[\.-]min\.css
.*[\.-]min\.js
.*node_modules/.*
.*bower_components
.*bower_components/.*
.*vendor/.*
.*third[_-]?[Pp]arty
.*third[_-]?[Pp]arty/.*
.*docs?/.*
.*samples
.*samples?/.*
.*releases?/.*
.*builds
.*builds?/.*
.*dist/.*
.*external
.*external/.*
.*libs/.*
.*d3\.js
.*angular(-resource|)?\.js
Expand All @@ -4105,6 +4119,7 @@ <h2 id="default-ignored-files">Default ignored files<a class="headerlink" href="
.*bootstrap\.js
.*bootstrap\.css
.*font-awesome\.css
.*\.[Dd]esigner\.cs
</code></pre></div>


Expand Down Expand Up @@ -4262,7 +4277,7 @@ <h3>Share your feedback 📢</h3>
<div class="md-source-date">
<small>

Last modified <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">November 27, 2023</span>
Last modified <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">April 2, 2024</span>

</small>
</div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 040d48a

Please sign in to comment.