Skip to content

Commit d6f5b43

Browse files
committed
migrate all includes
1 parent 03f8c4f commit d6f5b43

45 files changed

Lines changed: 333 additions & 272 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

new-docs/src/content/docs/faq/repositories/how-do-i-reanalyze-my-repository.md renamed to new-docs/src/content/docs/faq/repositories/how-do-i-reanalyze-my-repository.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
title: How do I reanalyze my repository?
33
---
4+
import AdminAccessControlInfo from './../../../includes/AdminAccessControlInfo.astro'
45

56

6-
{% include-markdown "../../assets/includes/admin-access-control-info.md" %}
7+
<AdminAccessControlInfo />
78

89
Reanalyze the last commit in your branch or pull request:
910

new-docs/src/content/docs/getting-started/configuring-your-repository.md renamed to new-docs/src/content/docs/getting-started/configuring-your-repository.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Configuring your repository
33
description: Configure Codacy to match the coding conventions and best practices that your team may already be following or that you want to promote.
44
nav_step: 1
55
---
6+
import NavMultistep from './../../includes/NavMultistep.astro'
67

7-
8-
{% include-markdown "../assets/includes/nav-multistep-quickstart.md" %}
8+
<NavMultistep step={1} />
99

1010
Once you've added your first repository, it's important that you configure Codacy's analysis tools to match the use cases of your team, such as configuring any coding conventions and best practices that your team may already be following or that you want to promote. It's also critical to review the configurations to avoid reporting false positives or any other issues that don't bring value to your team, which can introduce unwanted delays to the development process.
1111

@@ -17,13 +17,13 @@ To configure your repository, follow these steps:
1717
1. [Configuring code patterns](#configuring-code-patterns)
1818
1. [Adding coverage reports](#adding-coverage) (optional)
1919

20-
## 1. Ignoring files {#ignoring-files}
20+
## 1. Ignoring files \{#ignoring-files\}
2121

2222
[Ignore any files and directories](../repositories-configure/ignoring-files.md) that aren't relevant for the Codacy analysis, such as generated code or any third-party libraries included in your repositories.
2323

2424
![Ignoring files](../repositories-configure/images/ignored-files.png)
2525

26-
## 2. Configuring code patterns {#configuring-code-patterns}
26+
## 2. Configuring code patterns \{#configuring-code-patterns\}
2727
[Configure the tools and code patterns](../repositories-configure/configuring-code-patterns.md) that Codacy uses to analyze your repository. If security is important for your team, review the [Security and risk management dashboard](../organizations/managing-security-and-risk.md) to ensure that your configuration detects potential security issues.
2828

2929
:::tip
@@ -32,14 +32,14 @@ To ensure that multiple repositories consistently follow the same global tool an
3232

3333
![Configuring the tools and code patterns](../repositories-configure/images/code-patterns.png)
3434

35-
## 3. Adding coverage to your repository (optional) {#adding-coverage}
35+
## 3. Adding coverage to your repository (optional) \{#adding-coverage\}
3636
If you want to use code coverage to block merging pull requests that don't meet your quality standards, make sure that you [add coverage to your repository](../coverage-reporter/index.md).
3737

3838
It's important that you set up coverage beforehand because Codacy can only report the coverage status for pull requests after receiving reports for the last commits **on both the pull request branch and the target branch**.
3939

4040
![Adding coverage to your repository](../coverage-reporter/images/coverage-codacy-ui.png)
4141

42-
## Next steps {#next-steps}
42+
## Next steps \{#next-steps\}
4343
Once you’re satisfied with your setup, [integrate Codacy with your Git workflow](integrating-codacy-with-your-git-workflow.md) to flag potential issues, block problematic pull requests, and display other useful suggestions directly on your Git provider.
4444

4545
:::tip

new-docs/src/content/docs/getting-started/integrating-codacy-with-your-git-workflow.md renamed to new-docs/src/content/docs/getting-started/integrating-codacy-with-your-git-workflow.mdx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ title: Integrating Codacy with your Git workflow
33
description: Integrate Codacy with your Git workflow to display analysis results and code coverage as status checks on your pull requests and optionally block merging pull requests.
44
nav_step: 2
55
---
6+
import NavMultistep from './../../includes/NavMultistep.astro'
7+
import DefaultGitProviderSettingsTip from './../../includes/DefaultGitProviderSettingsTip.astro'
68

7-
8-
{% include-markdown "../assets/includes/nav-multistep-quickstart.md" %}
9+
<NavMultistep step={2} />
910

1011
Once you've configured your repository to best match your use case, integrate Codacy with your Git workflow to display analysis results and code coverage as status checks on your pull requests.
1112

@@ -17,7 +18,7 @@ To integrate Codacy with your Git workflow, follow these steps:
1718
1. [Configuring the Git provider integration](#git-provider-integration)
1819
1. [Blocking merging pull requests](#blocking-pull-requests) (optional)
1920

20-
## 1. Configuring the quality gate rules {#configuring-gate}
21+
## 1. Configuring the quality gate rules \{#configuring-gate\}
2122
[Review and adjust the quality gates](../repositories-configure/adjusting-quality-gates.md) of your repository to decide which pull requests should fail the Codacy quality gate.
2223

2324
:::tip
@@ -28,7 +29,6 @@ Codacy generally recommends that on a first stage you configure rules that focus
2829
- High severity issues
2930
- Security issues
3031
- Considerable drops in code coverage
31-
3232
:::
3333

3434
:::caution
@@ -37,18 +37,14 @@ Codacy generally recommends that on a first stage you configure rules that focus
3737

3838
![Adjusting the quality gates](../repositories-configure/images/quality-settings-gates.png)
3939

40-
## 2. Configuring the Git provider integration {#git-provider-integration}
40+
## 2. Configuring the Git provider integration \{#git-provider-integration\}
4141
Make sure you enable the option **Status checks** ([GitHub](../repositories-configure/integrations/github-integration.md#status-checks)) or **Pull request status** ([GitLab](../repositories-configure/integrations/gitlab-integration.md#pull-request-status) and [Bitbucket](../repositories-configure/integrations/bitbucket-integration.md#pull-request-status)).
4242

43-
{%
44-
include-markdown "../assets/includes/default-git-provider-settings-tip.md"
45-
start="<!--default-settings-start-->"
46-
end="<!--default-settings-end-->"
47-
%}
43+
<DefaultGitProviderSettingsTip />
4844

4945
![Enabling your Git provider integration](../repositories-configure/integrations/images/github-integration.png)
5046

51-
## 3. Blocking merging pull requests (optional) {#blocking-pull-requests}
47+
## 3. Blocking merging pull requests (optional) \{#blocking-pull-requests\}
5248
Once you've tested out Codacy for a while and you're happy with the level of feedback provided, you can decide to enforce the quality gates and use Codacy to block merging pull requests on your Git provider. This is the best way to protect your code from unwelcome changes and fully integrate code quality and coverage analysis into your development pipeline.
5349

5450
:::caution

new-docs/src/content/docs/organizations/organization-overview.md renamed to new-docs/src/content/docs/organizations/organization-overview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Organization overview
33
description: The Organization overview provides an overview of the repositories belonging to your Git provider organization. Here you can compare their statuses and check for items that require your attention.
44
---
5+
import DashboardApiReportNote from './../../includes/DashboardApiReportNote.astro'
56

67

78
The **Organization overview** provides an overview of the repositories belonging to your Git provider organization that you [follow on Codacy](managing-repositories.md). Here you can compare their statuses and check for items that require your attention.
@@ -20,7 +21,7 @@ On this page, you can also see the **Organization setup** area, which provides y
2021

2122
The following sections provide a detailed description of the repository-related dashboard areas.
2223

23-
{% include-markdown "../assets/includes/dashboard-api-report-note.md" %}
24+
<DashboardApiReportNote />
2425

2526
## Overall quality chart
2627

@@ -30,7 +31,6 @@ The **Overall quality** chart compares the repositories that you follow regardin
3031
- The overall quality chart calculates metrics and displays data only for the **repositories that you follow** on Codacy. This means that depending on their list of followed repositories, two users can see different results on this chart.
3132

3233
- The overall quality chart displays information for **at most the last 100 updated repositories**.
33-
3434
:::
3535

3636
![Overall quality chart](images/organization-overview-overall-quality.png)
@@ -56,7 +56,7 @@ The **Last updated repositories** list displays the last updated repositories, s
5656
:::note
5757
The exact value of the last updated date of the repositories depends on your Git provider:
5858

59-
- **GitHub:** date of the last commit to any branch of the repository (value of `pushed_at` from the [GitHub Repositories API](https://docs.github.com/en/rest/repos/repos#list-organization-repositories){: target=_"blank"}).
59+
- **GitHub:** date of the last commit to any branch of the repository (value of `pushed_at` from the [GitHub Repositories API](https://docs.github.com/en/rest/repos/repos#list-organization-repositories)).
6060
- **GitLab:** date when the project was last updated (value of `last_activity_at` from the [GitLab Groups API](https://docs.gitlab.com/ee/api/groups.html)). Note that this value is only updated [at most once per hour](https://gitlab.com/gitlab-org/gitlab/-/issues/20952)).
6161
- **Bitbucket:** date when the repository was last updated (value of `updated_on` from the [Bitbucket Repositories API](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories)). **On Bitbucket Server** Codacy can't obtain this information and the list displays the repositories in alphabetical order.
6262

new-docs/src/content/docs/organizations/roles-and-permissions-for-organizations.md renamed to new-docs/src/content/docs/organizations/roles-and-permissions-for-organizations.mdx

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Roles and permissions for organizations
33
description: List of operations that users can perform on Codacy depending on their role on the Git provider, and how to configure repository management permissions.
44
---
5+
import AdminAccessInfo from './../../includes/AdminAccessInfo.astro'
56

67

78
By default, Codacy assigns each organization member a role corresponding to that member's role on your Git provider. Each Codacy role, from most restrictive (repository read) to most capable (organization admin), corresponds to a set of permissions that determine what each member can do on Codacy.
@@ -21,8 +22,8 @@ To review the permissions granted by each role, see the tables for each Git prov
2122

2223
To list and manage the members of your Codacy organization, see the [Managing people](managing-people.md) page.
2324

24-
## Configuring repository management permissions {#change-analysis-configuration}
25-
{% include-markdown "../assets/includes/admin-access-info.md" %}
25+
## Configuring repository management permissions \{#change-analysis-configuration\}
26+
<AdminAccessInfo />
2627

2728
By default, only users with the Codacy role **repository write** can change analysis configurations.
2829

@@ -40,7 +41,7 @@ To change this, open your organization **Settings**, page **Roles and permission
4041

4142
## Managing the organization manager role
4243

43-
{% include-markdown "../assets/includes/admin-access-info.md" %}
44+
<AdminAccessInfo />
4445

4546
To grant an organization member additional permissions, you can assign that member the organization manager role. This role isn't influenced by a member's Git provider role.
4647

@@ -404,7 +405,7 @@ The table below maps the GitLab Cloud and GitLab Enterprise roles to the corresp
404405

405406
The table below maps the Bitbucket Cloud and Bitbucket Server roles to the corresponding Codacy roles and the operations that they're allowed to perform:
406407

407-
<table>
408+
<table class="roles-and-permissions">
408409
<thead>
409410
<tr>
410411
<th>Bitbucket role</th>
@@ -517,36 +518,3 @@ The table below maps the Bitbucket Cloud and Bitbucket Server roles to the corre
517518

518519
- [Managing people](managing-people.md)
519520
- [Accepting new people to your organization](changing-your-plan-and-billing.md#allowing-new-people-to-join-your-organization)
520-
521-
<!-- vale off -->
522-
<style>
523-
/*Center text in all cells except the first column*/
524-
td:not(:first-child), th:not(:first-child) {
525-
text-align: center !important;
526-
}
527-
528-
/*Background color for row containing the Codacy permission levels*/
529-
table:not(data-exclude) tr:nth-child(1) td {
530-
background-color: #EBF1FF;
531-
}
532-
533-
/*Add vertical borders and disable horizontal borders*/
534-
td {
535-
border-left: 1px solid var(--md-default-fg-color--lightest);
536-
border-top: 1px solid var(--md-default-fg-color--lightest);
537-
}
538-
td:nth-child(1) {
539-
border-left: 0;
540-
}
541-
542-
/*Background for cells marking various operations*/
543-
.yes {
544-
background-color: #E6F4EA;
545-
}
546-
.no {
547-
background-color: #FFF1EB;
548-
}
549-
.maybe {
550-
background-color: #F2F9FC;
551-
}
552-
</style>

new-docs/src/content/docs/repositories-configure/codacy-configuration-file.md renamed to new-docs/src/content/docs/repositories-configure/codacy-configuration-file.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Codacy configuration file
33
description: 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.
44
---
5+
import CoverageIgnore from './../../includes/CoverageIgnore.astro'
56

67

78
Codacy supports configuring certain advanced features through a configuration file, such as:
@@ -80,11 +81,11 @@ To use a Codacy configuration file:
8081
codacy-analysis-cli validate-configuration --directory `pwd`
8182
```
8283

83-
## Ignoring files using a Codacy configuration file {#ignore-files}
84+
## Ignoring files using a Codacy configuration file \{#ignore-files\}
8485
The Codacy configuration file gives you more flexibility in [ignoring or excluding files](ignoring-files.md) from the Codacy analysis.
8586

8687
:::note
87-
{% include-markdown "../assets/includes/coverage-ignore.md" %}
88+
<CoverageIgnore />
8889
:::
8990

9091
### Syntax for ignoring files
@@ -126,10 +127,9 @@ engines:
126127
languages:
127128
- "typescript"
128129
```
129-
130130
:::
131131

132-
## Including specific files using a Codacy configuration file {#include-files}
132+
## Including specific files using a Codacy configuration file \{#include-files\}
133133
The Codacy configuration file allows you to explicitly specify files or directories to include in the analysis. This is particularly useful for [bypassing files or directories that are ignored by default](./ignoring-files.md#default-ignored-files) or specified in `exclude_paths`.
134134

135135
:::note
@@ -153,22 +153,22 @@ include_paths:
153153

154154
In this example, while all directories matching `lib*` are excluded, `lib-a` is specifically included for analysis, as well as any files within `libs`.
155155

156-
## Adjusting tool configurations {#tool-conf}
156+
## Adjusting tool configurations \{#tool-conf\}
157157
:::note
158158
The Codacy configuration file lets you [configure tools](#tool-specific-configurations), but you can't enable or disable them. A tool can only be enabled or disabled on the [Code patterns page](configuring-code-patterns.md) by users with the [necessary permissions](../organizations/roles-and-permissions-for-organizations.md).
159159
:::
160160

161161
### Which tools can be configured and which name should I use?
162162

163-
<!--NOTE
163+
{/*<!--NOTE
164164
When adding a new supported tool, make sure that you update the following pages:
165165

166166
docs/getting-started/supported-languages-and-tools.md
167167
docs/repositories-configure/local-analysis/client-side-tools.md (if the tool runs client-side)
168168
docs/organizations/managing-security-and-risk.md (if the tool reports security issues)
169169
docs/repositories-configure/configuring-code-patterns.md (supported configuration files table, or list of tools that don't support configuration files)
170170
docs/repositories-configure/codacy-configuration-file.md (list of tool short names to use on the Codacy configuration file)
171-
-->
171+
-->*/}
172172

173173
You can use the Codacy configuration file to configure all tools supported by Codacy except the [client-side tools](local-analysis/client-side-tools.md).
174174

@@ -273,11 +273,11 @@ If you're using Python 3.4.\* or later as your programming language, disable the
273273

274274
#### PMD CPD (Duplication)
275275

276-
<!--NOTE
276+
{/*<!--NOTE
277277
Reference for all options:
278278

279279
https://github.com/codacy/codacy-duplication-pmdcpd/blob/c799cb3a80d1f3b3a8eb9868f63abee13e3e81c4/src/main/scala/com/codacy/duplication/pmd/Cpd.scala#L128
280-
-->
280+
-->*/}
281281

282282
Codacy uses [PMD's Copy/Paste Detector (CPD)](https://docs.pmd-code.org/latest/) to identify duplicated blocks of code [on the supported languages](../getting-started/supported-languages-and-tools.md).
283283

@@ -321,14 +321,14 @@ engines:
321321
ignoreUsings: false
322322
```
323323

324-
## Configuring languages using a Codacy configuration file {#languages}
324+
## Configuring languages using a Codacy configuration file \{#languages\}
325325
You can use a Codacy configuration file to manage the languages that Codacy analyzes in your repository.
326326

327327
:::note
328328
Codacy applies the language settings from the Codacy configuration file as well as any settings defined [in the Codacy UI](languages.md).
329329
:::
330330

331-
### Adding custom file extensions {#file-extensions}
331+
### Adding custom file extensions \{#file-extensions\}
332332
To [add custom file extensions to languages](languages.md#configuring-file-extensions) using a Codacy configuration file, you must define one or more extensions under `languages.<LANGUAGE>.extensions`. Keep in mind that some tools might not work out of the box with those extensions.
333333

334334
For example:
@@ -341,7 +341,7 @@ languages:
341341
- ".scss"
342342
```
343343

344-
### Disabling analysis of a language {#disable-language}
344+
### Disabling analysis of a language \{#disable-language\}
345345
To [disable the analysis of a specific language](languages.md#disable-language) using a Codacy configuration file, set `languages.<LANGUAGE>.enabled` to `false`. The analysis is enabled by default for all languages.
346346

347347
For example:

0 commit comments

Comments
 (0)