diff --git a/docusaurus/README.md b/docusaurus/README.md index b28211a9bb..fe9dbfba06 100644 --- a/docusaurus/README.md +++ b/docusaurus/README.md @@ -6,12 +6,14 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati ```bash yarn +or npm install ``` ## Local Development ```bash yarn start +or npm start ``` This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. @@ -20,22 +22,11 @@ This command starts a local development server and opens up a browser window. Mo ```bash yarn build +or npm run build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. ## Deployment -Using SSH: - -```bash -USE_SSH=true yarn deploy -``` - -Not using SSH: - -```bash -GIT_USER= yarn deploy -``` - -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. +Handled by GitHub actions into Github Pages. \ No newline at end of file diff --git a/docusaurus/docs/_includes/AdminAccessControlInfo.mdx b/docusaurus/docs/_includes/AdminAccessControlInfo.mdx index 7d9034565c..86778ac9f9 100644 --- a/docusaurus/docs/_includes/AdminAccessControlInfo.mdx +++ b/docusaurus/docs/_includes/AdminAccessControlInfo.mdx @@ -1,3 +1,3 @@ :::note -Organization admins can [manage access to this feature](/organizations/roles-and-permissions-for-organizations#change-analysis-configuration) +Organization admins can [manage access to this feature](/organizations/roles-and-permissions-for-organizations.mdx#change-analysis-configuration) ::: \ No newline at end of file diff --git a/docusaurus/docs/_includes/ApiExamplePaginationImportant.mdx b/docusaurus/docs/_includes/ApiExamplePaginationImportant.mdx index 71abd02404..8d61d31731 100644 --- a/docusaurus/docs/_includes/ApiExamplePaginationImportant.mdx +++ b/docusaurus/docs/_includes/ApiExamplePaginationImportant.mdx @@ -1,3 +1,3 @@ :::caution -[Learn how to use pagination](/codacy-api/using-the-codacy-api#using-pagination) to ensure that you process all results returned by the API. +[Learn how to use pagination](/codacy-api/using-the-codacy-api.mdx#using-pagination) to ensure that you process all results returned by the API. ::: \ No newline at end of file diff --git a/docusaurus/docs/_includes/ServiceAccountIntegration.mdx b/docusaurus/docs/_includes/ServiceAccountIntegration.mdx index 3d2a99ac5c..8a5333f571 100644 --- a/docusaurus/docs/_includes/ServiceAccountIntegration.mdx +++ b/docusaurus/docs/_includes/ServiceAccountIntegration.mdx @@ -6,5 +6,5 @@ which may happen when a user leaves the team or the organization. For more information and instructions on how to set up a dedicated service account see -[Why did Codacy stop commenting on pull requests?](/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests#outdated-permissions) +[Why did Codacy stop commenting on pull requests?](/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.mdx#outdated-permissions) ::: diff --git a/docusaurus/docs/account/emails.mdx b/docusaurus/docs/account/emails.mdx index fb0cd84e65..6776324a66 100644 --- a/docusaurus/docs/account/emails.mdx +++ b/docusaurus/docs/account/emails.mdx @@ -6,7 +6,7 @@ To manage the email addresses associated with your account and your email notifi ![Email settings](images/emails-notifications.png) -## Updating your email addresses ||updating|| +## Updating your email addresses \{#updating\} Codacy automatically links to your Codacy account the email addresses from the Git provider associated with your current session. On the **Emails** page, you can verify which email addresses are linked to your Codacy account. @@ -32,7 +32,7 @@ To update the email addresses associated with your Codacy account, do the follow When developers commit **from GitHub or Bitbucket**, Codacy automatically associates all the commit email addresses from the same Git provider user with a single Codacy committer. For developers that never logged in to the Codacy app, this mechanism requires that they [set their Git email address](#git-config) and add all their email addresses to their [GitHub account](https://github.com/settings/emails) or [Bitbucket account](https://bitbucket.org/account/settings/email/). ::: -### Setting your Git email address ||git-config|| +### Setting your Git email address \{#git-config\} Unless you explicitly [configure your email address](https://git-scm.com/docs/git-config#Documentation/git-config.txt-useremail), Git automatically uses an email address based on the username and hostname of your workstation, and associates this email address with your commits. diff --git a/docusaurus/docs/account/managing-your-profile.mdx b/docusaurus/docs/account/managing-your-profile.mdx index b8c74fca34..b416fa7640 100644 --- a/docusaurus/docs/account/managing-your-profile.mdx +++ b/docusaurus/docs/account/managing-your-profile.mdx @@ -20,11 +20,11 @@ To manage your profile information such as your name and avatar, click on your a When you delete your account on Codacy: - Your profile information and all data related to your personal repositories are completely removed from Codacy -- Codacy will [stop analyzing any repositories added to Codacy using your account](../faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md) {/*!--NOTE See https://github.com/codacy/docs/pull/1354#discussion_r950190842 for more context -->*/} +- Codacy will [stop analyzing any repositories added to Codacy using your account](../faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests) {/*!--NOTE See https://github.com/codacy/docs/pull/1354#discussion_r950190842 for more context -->*/} This operation doesn't make any changes on your Git provider. To delete your account, click the button **Delete account** and confirm that you really want to proceed. :::note -If you're the last organization admin of any of your organizations, you must either add someone else as an owner or [delete those organizations](../organizations/what-are-organizations.md#deleting-an-organization) before you can delete your account. +If you're the last organization admin of any of your organizations, you must either add someone else as an owner or [delete those organizations](../organizations/what-are-organizations.mdx#deleting-an-organization) before you can delete your account. diff --git a/docusaurus/docs/chart/_order.ts b/docusaurus/docs/chart/_order.ts new file mode 100644 index 0000000000..9919044de1 --- /dev/null +++ b/docusaurus/docs/chart/_order.ts @@ -0,0 +1,55 @@ +export const chartOrder = [ + 'chart/index', + 'chart/requirements', + { + type: 'category' as const, + label: 'Setting up Kubernetes', + items: [ + 'chart/infrastructure/eks-quickstart', + 'chart/infrastructure/microk8s-quickstart' + ], + }, + { + type: 'category' as const, + label: 'Configuring Codacy', + items: [ + { + type: 'category' as const, + label: 'Integrations', + items: [ + 'chart/configuration/integrations/github-cloud', + 'chart/configuration/integrations/github-enterprise', + 'chart/configuration/integrations/github-app-create', + 'chart/configuration/integrations/gitlab-cloud', + 'chart/configuration/integrations/gitlab-enterprise', + 'chart/configuration/integrations/bitbucket-cloud', + 'chart/configuration/integrations/bitbucket-server', + 'chart/configuration/integrations/email' + ] + }, + 'chart/configuration/caching', + 'chart/configuration/monitoring', + 'chart/configuration/logging' + ], + }, + { + type: 'category' as const, + label: 'Maintenance and operations', + items: [ + 'chart/maintenance/license', + 'chart/maintenance/upgrade', + 'chart/maintenance/uninstall', + 'chart/maintenance/database' + ], + }, + { + type: 'category' as const, + label: 'Troubleshooting', + items: [ + 'chart/troubleshoot/troubleshoot', + 'chart/troubleshoot/logs-collect', + 'chart/troubleshoot/k8s-cheatsheet' + ], + }, +]; + diff --git a/docusaurus/docs/chart/assets/images/codacy-logo.svg b/docusaurus/docs/chart/assets/images/codacy-logo.svg new file mode 100644 index 0000000000..445fd701f7 --- /dev/null +++ b/docusaurus/docs/chart/assets/images/codacy-logo.svg @@ -0,0 +1 @@ +codacy-white \ No newline at end of file diff --git a/docusaurus/docs/chart/assets/includes/images/self-hosted-version.png b/docusaurus/docs/chart/assets/includes/images/self-hosted-version.png new file mode 100644 index 0000000000..d5d07c4061 Binary files /dev/null and b/docusaurus/docs/chart/assets/includes/images/self-hosted-version.png differ diff --git a/docusaurus/docs/chart/assets/includes/self-hosted-version.mdx b/docusaurus/docs/chart/assets/includes/self-hosted-version.mdx new file mode 100644 index 0000000000..5f0c544117 --- /dev/null +++ b/docusaurus/docs/chart/assets/includes/self-hosted-version.mdx @@ -0,0 +1,5 @@ +:::tip +To see the version of your Codacy Self-hosted instance click your avatar on the top right-hand corner of any Codacy page: + +![Obtaining the Codacy Self-hosted version](./images/self-hosted-version.png) +::: \ No newline at end of file diff --git a/docusaurus/docs/chart/assets/javascripts/extra.js b/docusaurus/docs/chart/assets/javascripts/extra.js new file mode 100644 index 0000000000..806152e890 --- /dev/null +++ b/docusaurus/docs/chart/assets/javascripts/extra.js @@ -0,0 +1,28 @@ +// Uncomment to automatically expand all parents in the sidebar tree +// document.addEventListener("DOMContentLoaded", function() { +// load_navpane(); +// }); + +function load_navpane() { + var width = window.innerWidth; + if (width <= 1200) { + return; + } + + var nav = document.getElementsByClassName("md-nav"); + for (var i = 0; i < nav.length; i++) { + if (typeof nav.item(i).style === "undefined") { + continue; + } + + if (nav.item(i).getAttribute("data-md-level") && nav.item(i).getAttribute("data-md-component")) { + nav.item(i).style.display = "block"; + nav.item(i).style.overflow = "visible"; + } + } + + var nav = document.getElementsByClassName("md-nav__toggle"); + for (var i = 0; i < nav.length; i++) { + nav.item(i).checked = true; + } +} diff --git a/docusaurus/docs/chart/assets/stylesheets/extra.css b/docusaurus/docs/chart/assets/stylesheets/extra.css new file mode 100644 index 0000000000..1fc8eced84 --- /dev/null +++ b/docusaurus/docs/chart/assets/stylesheets/extra.css @@ -0,0 +1,24 @@ +.md-header { + background-color: #101e35 !important; +} + +.md-header img { + border: 0 none; + width: 95px !important; + height: 27px !important; +} + +@media only screen and (min-width: 76.25em) { + .md-main__inner { + max-width: 80%; + } + .md-sidebar--primary { + left: 20px; + } + .md-sidebar--secondary { + right: 20px; + margin-left: 0; + -webkit-transform: none; + transform: none; + } +} diff --git a/docusaurus/docs/chart/configuration/caching.mdx b/docusaurus/docs/chart/configuration/caching.mdx new file mode 100644 index 0000000000..d0e84fc010 --- /dev/null +++ b/docusaurus/docs/chart/configuration/caching.mdx @@ -0,0 +1,54 @@ +--- +title: Caching +description: Configure Codacy Self-hosted to use an external NFS server to improve the performance of the cloned repository cache. +--- + + +Codacy Self-hosted includes a built-in NFS server provisioner that deploys a shared volume to cache the cloned repository files while they're being analyzed by each tool. However, if you're dealing with big repositories or a high volume of analysis, using an NFS server external to the cluster will improve the performance of the cache. + +To use your own external NFS server: + +1. Edit the file `values-production.yaml` that you [used to install Codacy](../index.mdx#helm-upgrade). + +1. Set `listener.nfsserverprovisioner.enabled: "false"` and define the remaining `listener.cache.*` values as described below: + + ```yaml + listener: + nfsserverprovisioner: + enabled: false + cache: + name: listener-cache + path: /data + nfs: + server: # IP address of the external NFS server + path: /var/nfs/data/ # External NFS server directory or file system to be mounted + ``` + +1. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +1. Validate that the `repository-listener` pod is now using the external NFS server: + + ```bash + $ kubectl describe pod -n codacy codacy-listener-<...> + + [...] + + Volumes: + listener-cache: + Type: NFS (an NFS mount that lasts the lifetime of a pod) + Server: + Path: /var/nfs/data/ + ReadOnly: false + ``` diff --git a/docusaurus/docs/chart/configuration/integrations/bitbucket-cloud.mdx b/docusaurus/docs/chart/configuration/integrations/bitbucket-cloud.mdx new file mode 100644 index 0000000000..b71faadfeb --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/bitbucket-cloud.mdx @@ -0,0 +1,80 @@ +--- +title: Bitbucket Cloud +description: Instructions on how to set up the Codacy Self-hosted integration with Bitbucket Cloud. +--- + +Follow the instructions below to set up the Codacy Self-hosted integration with Bitbucket Cloud. + +## Create an OAuth consumer \{#create-oauth\} + +To integrate Codacy with Bitbucket Cloud, you must register an OAuth consumer for Codacy on Bitbucket. + +You can create a consumer on any existing individual or team account. To create a consumer, do the following: + +1. On Bitbucket, click on your avatar on the bottom left-hand corner and select **Bitbucket settings**. + +2. Select **OAuth** on the left sidebar and click the button **Add consumer**. + +3. Fill in the fields to create the OAuth consumer: + + - **Name:** Name of the OAuth consumer. For example, `Codacy`. + + - **Callback URL:** Copy the URL below, replacing the HTTP protocol and hostname with the correct values for your Codacy instance. + + ``` + https://codacy.example.com/login/Bitbucket?codacy_skip_ga=1 + ``` + + - **This is a private consumer:** Enable the check box. + + - Add the permissions: + + - **Account:** Write + - **Team membership:** Read + - **Projects:** Read + - **Repositories:** Admin + - **Pull requests:** Write + - **Issues:** Write + - **Webhooks:** Read and write + + ![Bitbucket consumer configuration](images/bitbucket-consumer-configuration.png) + + ![Bitbucket consumer permissions](images/bitbucket-consumer-permissions.png) + +4. Click Save, and then click the name of the new OAuth consumer to take note of the generated key and secret. + + ![Bitbucket consumer key and secret](images/bitbucket-consumer-key-and-secret.png) + +## Configure Bitbucket Cloud on Codacy \{#configure\} + +After creating the OAuth consumer on Bitbucket Cloud, you must configure it on Codacy: + +1. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +2. Set `global.bitbucket.enabled: "true"` and define the remaining values as described below using the information obtained when you created the OAuth consumer: + + ```yaml + global: + bitbucket: + enabled: "true" + login: "true" # Show login button for Bitbucket Cloud + key: "" # OAuth consumer key + secret: "" # OAuth consumer secret + ``` + +3. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + :::caution + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + ::: + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to use Bitbucket Cloud to authenticate to Codacy. diff --git a/docusaurus/docs/chart/configuration/integrations/bitbucket-server.mdx b/docusaurus/docs/chart/configuration/integrations/bitbucket-server.mdx new file mode 100644 index 0000000000..bd95ca0e03 --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/bitbucket-server.mdx @@ -0,0 +1,94 @@ +--- +title: Bitbucket Server +description: Instructions on how to set up the Codacy Self-hosted integration with Bitbucket Server. +--- + +Follow the instructions below to set up the Codacy Self-hosted integration with Bitbucket Server. + +## Create a Bitbucket Server application link + +To integrate Codacy with Bitbucket Server, you must create an application link on your Bitbucket Server instance: + +1. Create a key pair to sign and validate the requests between Codacy and the Bitbucket Server instance. + + Run the following command to create the key pair using the RSA algorithm in the PKCS#8 format: + + ```bash + bash <(curl -fsSL https://raw.githubusercontent.com/codacy/chart/master/docs/configuration/integrations/generate-bitbucket-server-secrets.sh) + ``` + + Store the keys in a safe place for usage in the next steps and as a backup. + +2. Open `/plugins/servlet/applinks/listApplicationLinks`, where `` is the URL of your Bitbucket Server instance. + +3. Create a new application link with the URL of your Codacy instance. + + :::caution + **If you're using Bitbucket Server 7.20 or later** you must select the application type **Atlassian product** while creating the new application link. + + This [forces the integration to use OAuth 1.0](https://confluence.atlassian.com/bitbucketserver/link-to-other-applications-1018764620.html#Linktootherapplications-LinktoAtlassianproductsorexternalapplicationsusingOAuth1.0) and is necessary to ensure the compatibility between Codacy and older versions of Bitbucket that only supported OAuth 1.0. + ::: + + ![Bitbucket Server application link](images/bitbucket-server-application-link.png) + + If Bitbucket Server may warn you that there was no response from the URL you entered. This is expected, and you can click **Continue** after verifying that the URL is correct. + + ![No response from Codacy instance URL](images/bitbucket-server-no-response.png) + +4. Fill in the fields: + + - **Application Name:** Name of the application. For example, `Codacy`. + - **Application Type:** Select `Generic Application`. + + The remaining fields should be left blank. + + ![Bitbucket Server application link naming](images/bitbucket-server-link-naming.png) + +5. After creating the new application link, click **Edit** to add an incoming authentication. + +6. Fill in the fields of the incoming authentication: + + - **Consumer Key:** Enter the `consumerKey` generated previously. + - **Consumer Name:** Name of the consumer. For example, `Codacy`. + - **Public Key:** Enter the `consumerPublicKey` generated previously. + + The remaining fields should be left blank. + + ![Bitbucket Server incoming authentication](images/bitbucket-server-incoming-authentication.png) + +## Configure Bitbucket Server on Codacy + +After creating the Bitbucket Server application link, you must configure it on Codacy: + +1. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +2. Set `global.bitbucketEnterprise.enabled: "true"` and define the remaining values as described below and with the information obtained when you created the Bitbucket Server application link: + + ```yaml + bitbucketEnterprise: + enabled: "true" + login: "true" # Show login button for Bitbucket Server + hostname: "bitbucket.example.com" # Hostname of your Bitbucket Server instance + protocol: "https" # Protocol of your Bitbucket Server instance + port: 7990 # Port of your Bitbucket Server instance + consumerKey: "" # Generated when creating the Bitbucket Server application link + consumerPublicKey: "" # Generated when creating the Bitbucket Server application link + consumerPrivateKey: "" # Generated when creating the Bitbucket Server application link + contextPath: "" # Context path of your Bitbucket Server, if configured + ``` + +3. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to use Bitbucket Server to authenticate to Codacy. diff --git a/docusaurus/docs/chart/configuration/integrations/email.mdx b/docusaurus/docs/chart/configuration/integrations/email.mdx new file mode 100644 index 0000000000..01b425351e --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/email.mdx @@ -0,0 +1,42 @@ +--- +title: SMTP server +description: Instructions on how to set up Codacy Self-hosted to send emails using your SMTP server. +--- + +Follow the instructions below to set up Codacy Self-hosted to send emails using your SMTP server: + +1. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +2. Set `global.email.enabled: "true"` and define the remaining values with the credentials for your SMTP server: + + ```yaml + email: + enabled: "true" + replyTo: "notifications@mycompany.com" # Reply-to field on sent emails + smtp: + protocol: "smtp" # SMTP protocol to use, either smtps or smtp + hostname: "smtp.example.com" # Hostname of your SMTP server + # username: "" # Optional username to authenticate on your SMTP server + # password: "" # Optional password to authenticate on your SMTP server + # port: 25 # Optional port of your SMTP server, the default is 25 + ``` + +3. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + :::caution + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + ::: + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to: + +- Invite new users via email +- Receive commit and pull request email notifications diff --git a/docusaurus/docs/chart/configuration/integrations/generate-bitbucket-server-secrets.sh b/docusaurus/docs/chart/configuration/integrations/generate-bitbucket-server-secrets.sh new file mode 100755 index 0000000000..ec48e1cc98 --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/generate-bitbucket-server-secrets.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -e + +TMP_WORKDIR=$(mktemp -d) + +cleanup() +{ + if [ -d "$TMP_WORKDIR" ]; then + rm -r $TMP_WORKDIR &>/dev/null + fi +} +trap cleanup EXIT + +cd $TMP_WORKDIR +openssl genrsa -out bbkey +openssl pkcs8 -nocrypt -in bbkey -out bbkey.pkcs8 -topk8 +openssl rsa -in bbkey -pubout -out bbkey.pub + +BB_CONSUMER_KEY=$(openssl rand -base64 10 | tr -dc 'a-zA-Z0-9') +BB_PUBLIC_KEY=$(cat $TMP_WORKDIR/bbkey.pub | head -n-1 | tail -n+2 | tr -d '\n') +BB_PRIVATE_KEY=$(cat $TMP_WORKDIR/bbkey.pkcs8 | head -n-1 | tail -n+2 | tr -d '\n') + +echo "=> These are your secrets for Bitbucket Server. Please keep them in a safe place." +echo "" +echo "# consumerKey" +echo "$BB_CONSUMER_KEY" +echo "" +echo "# consumerPublicKey" +echo "$BB_PUBLIC_KEY" +echo "" +echo "# consumerPrivateKey" +echo "$BB_PRIVATE_KEY" diff --git a/docusaurus/docs/chart/configuration/integrations/github-app-create.mdx b/docusaurus/docs/chart/configuration/integrations/github-app-create.mdx new file mode 100644 index 0000000000..2f6428a26d --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/github-app-create.mdx @@ -0,0 +1,46 @@ +--- +title: Creating a GitHub App +--- + +You must create and correctly set up a [GitHub App](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps) to allow Codacy Self-hosted to integrate with GitHub. + +To create the GitHub App: + +1. **If you're using GitHub Cloud**, open [https://github.com/settings/apps/new](https://github.com/settings/apps/new). + + **If you're using GitHub Enterprise**, open `https://github.example.com/settings/apps/new`, replacing the HTTP protocol and hostname with the correct values for your GitHub Enterprise instance. + +2. Configure the new GitHub App using the values listed on the table below, replacing `https://codacy.example.com` with the correct base URL of your Codacy instance. + + | Field | Value | + | --------------------------------------- | ------------------------------------------------------- | + | GitHub App name | Codacy | + | Homepage URL | \`https://codacy.example.com\` | + | User authorization callback URL | \`https://codacy.example.com\` | + | Request user authorization (OAuth) during installation | Enabled

Make sure this option is selected to request that the installing user grants access to their identity during the installation of your Codacy GitHub App. | + | Webhook URL | For GitHub Cloud:
`https://codacy.example.com/2.0/events/gh/organization`

For GitHub Enterprise:
`https://codacy.example.com/2.0/events/ghe/organization` | + | **Repository permissions** | | + | Administration | Read & write | + | Checks | Read & write | + | Issues | Read & write | + | Metadata | Read only | + | Pull requests | Read & write | + | Webhooks | Read & write | + | Commit statuses | Read & write | + | **Organization permissions** | | + | Members | Read only | + | Webhooks | Read & write | + | **User permissions** | | + | Email addresses | Read only | + | Git SSH keys | Read & write | + | Where can this GitHub App be installed? | Any account | + +3. Scroll to the bottom of the page, click **Generate a private key**, and save the `.pem` file containing the private key. + +4. Take note of the following information, as you'll need it to configure Codacy: + + - GitHub App name + - App ID + - Client ID + - Client secret + - Private key (contents of the `.pem` file generated in the previous step) diff --git a/docusaurus/docs/chart/configuration/integrations/github-cloud.mdx b/docusaurus/docs/chart/configuration/integrations/github-cloud.mdx new file mode 100644 index 0000000000..8da251d5fd --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/github-cloud.mdx @@ -0,0 +1,41 @@ +--- +title: GitHub Cloud +description: Instructions on how to set up the Codacy Self-hosted integration with GitHub Cloud. +--- + +Follow the instructions below to set up the Codacy Self-hosted integration with GitHub Cloud: + +1. Follow the instructions on [creating a GitHub App](github-app-create.mdx). + +2. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +3. Set `global.github.enabled: "true"` and define the remaining values as described below using the information obtained when you created the GitHub App: + + ```yaml + github: + enabled: "true" + login: "true" # Show login button for GitHub Cloud + clientId: "" # Client ID + clientSecret: "" # Client secret + app: + name: "codacy" # GitHub App name + id: "1234" # App ID + privateKey: "" # Contents of the .pem file without newlines or the BEGIN/END lines + ``` + +4. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + :::caution + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + ::: + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to use GitHub Cloud to authenticate to Codacy. diff --git a/docusaurus/docs/chart/configuration/integrations/github-enterprise.mdx b/docusaurus/docs/chart/configuration/integrations/github-enterprise.mdx new file mode 100644 index 0000000000..93ce5a54ad --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/github-enterprise.mdx @@ -0,0 +1,45 @@ +--- +title: GitHub Enterprise +description: Instructions on how to set up the Codacy Self-hosted integration with GitHub Enterprise. +--- + +Follow the instructions below to set up the Codacy Self-hosted integration with GitHub Enterprise: + +1. Follow the instructions on [creating a GitHub App](github-app-create.mdx). + +2. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +3. Set `global.githubEnterprise.enabled: "true"` and define the remaining values as described below using the information obtained when you created the GitHub App: + + ```yaml + githubEnterprise: + enabled: "true" + login: "true" # Show login button for GitHub Enterprise + hostname: "github.example.com" # Hostname of your GitHub Enterprise instance + protocol: "https" # Protocol of your GitHub Enterprise instance + port: 443 # Port of your GitHub Enterprise instance + disableSSL: "false" # Disable certificate validation + isPrivateMode: "true" # Status of private mode on your GitHub Enterprise instance + clientId: "" # GitHub App Client ID + clientSecret: "" # GitHub App Client secret + app: + name: "codacy" # GitHub App name + id: "1234" # GitHub App ID + privateKey: "" # Contents of the .pem file without newlines or the BEGIN/END lines + ``` + +4. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to use GitHub Enterprise to authenticate to Codacy. diff --git a/docusaurus/docs/chart/configuration/integrations/gitlab-cloud.mdx b/docusaurus/docs/chart/configuration/integrations/gitlab-cloud.mdx new file mode 100644 index 0000000000..0c380d461e --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/gitlab-cloud.mdx @@ -0,0 +1,77 @@ +--- +title: GitLab Cloud +description: Instructions on how to set up the Codacy Self-hosted integration with GitLab Cloud. +--- + + +Follow the instructions below to set up the Codacy Self-hosted integration with GitLab Cloud. + +## Create a GitLab application \{#create-application\} + +To integrate Codacy with GitLab Cloud, you must create a GitLab application: + +1. Open [https://gitlab.com/-/profile/applications](https://gitlab.com/-/profile/applications). + +2. Fill in the fields to register your Codacy instance on GitLab: + + - **Name:** Name of the application. For example, `Codacy`. + + - **Redirect URI:** Copy the URLs below, replacing the HTTP protocol and hostname with the correct values for your Codacy instance. This field is case sensitive. + + ```text + https://codacy.example.com/login/GitLab + https://codacy.example.com/add/addProvider/GitLab + https://codacy.example.com/add/addService/GitLab + https://codacy.example.com/add/addPermissions/GitLab + ``` + + - **Scopes:** Enable the scopes: + + - `api` + - `read_user` + - `read_repository` + - `openid` + + ![GitLab Cloud application](images/gitlab-cloud-application.png) + +3. Click **Save application** and take note of the generated Application Id and Secret. + +:::note +You can ignore the following error that GitLab may display when you test or save the new GitLab application: + +![GitLab appplication test error](images/gitlab-application-test-error.png) + +This happens because GitLab tests the new application by calling an endpoint that Codacy doesn't implement. +::: + +## Configure GitLab Cloud on Codacy \{#configure\} + +After creating the GitLab application, you must configure it on Codacy: + +1. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +2. Set `global.gitlab.enabled: "true"` and define the remaining values as described below using the information obtained when you created the GitLab application: + + ```yaml + gitlab: + enabled: "true" + login: "true" # Show login button for GitLab Cloud + clientId: "" # Application ID + clientSecret: "" # Secret + ``` + +3. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to use GitLab Cloud to authenticate to Codacy. diff --git a/docusaurus/docs/chart/configuration/integrations/gitlab-enterprise.mdx b/docusaurus/docs/chart/configuration/integrations/gitlab-enterprise.mdx new file mode 100644 index 0000000000..80dfa53116 --- /dev/null +++ b/docusaurus/docs/chart/configuration/integrations/gitlab-enterprise.mdx @@ -0,0 +1,104 @@ +--- +title: GitLab Enterprise +description: Instructions on how to set up the Codacy Self-hosted integration with GitLab Enterprise. +--- + +Follow the instructions below to set up the Codacy Self-hosted integration with GitLab Enterprise: + +## Create a GitLab application \{#create-application\} + +To integrate Codacy with GitLab Enterprise, you must create a GitLab application: + +1. Open `/-/profile/applications` as a GitLab admin, where `` is the URL of your GitLab Enterprise instance. + +2. Fill in the fields to register your Codacy instance on GitLab: + + - **Name:** Name of the application. For example, `Codacy`. + + - **Redirect URI:** Copy the URLs below, replacing the HTTP protocol and hostname with the correct values for your Codacy instance. This field is case sensitive. + + ```text + https://codacy.example.com/login/GitLabEnterprise + https://codacy.example.com/add/addProvider/GitLabEnterprise + https://codacy.example.com/add/addService/GitLabEnterprise + https://codacy.example.com/add/addPermissions/GitLabEnterprise + ``` + + - **Scopes:** Enable the scopes: + + - `api` + - `read_user` + - `read_repository` + - `openid` + + ![GitLab Enterprise application](images/gitlab-enterprise-application.png) + +3. Click **Save application** and take note of the generated Application Id and Secret. + +:::note +You can ignore the following error that GitLab Enterprise may display when you test or save the new GitLab application: + +![GitLab Enterprise appplication test error](images/gitlab-application-test-error.png) + +This happens because GitLab Enterprise tests the new application by calling an endpoint that Codacy doesn't implement. +::: + +## Configure GitLab Enterprise on Codacy \{#configure\} + +After creating the GitLab application, you must configure it on Codacy: + +1. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade). + +2. Set `global.gitlabEnterprise.enabled: "true"` and define the remaining values as described below using the information obtained when you created the GitLab application: + + ```yaml + gitlabEnterprise: + enabled: "true" + login: "true" # Show login button for GitLab Enterprise + hostname: "gitlab.example.com" # Hostname of your GitLab Enterprise instance + protocol: "https" # Protocol of your GitLab Enterprise instance + port: 443 # Port of your GitLab Enterprise instance + clientId: "" # Application ID + clientSecret: "" # Secret + ``` + +3. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +After this is done you will be able to use GitLab Enterprise to authenticate to Codacy. + +## Detect changes to repositories and organizations + +Optionally, Codacy can automatically detect the following changes to repositories and organizations on your GitLab Enterprise instance: + +- **For repositories:** renames, deletes, and visibility changes +- **For organizations:** renames, deletes, and access removed + +To do this, you must configure a [System Hook](https://docs.gitlab.com/ee/system_hooks/system_hooks.html) on your GitLab Enterprise instance to notify Codacy of the changes: + +1. Open `/admin/hooks` as a GitLab admin, where `` is the URL of your GitLab Enterprise instance. + +2. Fill in the fields to create the System Hook: + + - **URL:** The URL of your Codacy instance with the path `/2.0/events/gle/organization`. For example, `http://codacy.example.com/2.0/events/gle/organization` + + - **Secret Token:** Copy the Application Secret from the GitLab application that you created previously, or from the value of `clientSecret` in the file `values-production.yaml` that you used to install Codacy. + + - **Trigger:** Enable the trigger `Repository update events` + + - **SSL verification:** Enable the SSL verification. + + ![GitLab Enterprise System Hook](images/gitlab-enterprise-system-hook.png) + +3. Click **Save Changes** to save the System Hook. diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-configuration.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-configuration.png new file mode 100644 index 0000000000..49996b34d7 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-configuration.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-key-and-secret.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-key-and-secret.png new file mode 100644 index 0000000000..af77ce1a21 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-key-and-secret.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-permissions.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-permissions.png new file mode 100644 index 0000000000..e471892e32 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-consumer-permissions.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-application-link.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-application-link.png new file mode 100644 index 0000000000..bd594ef7dd Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-application-link.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-incoming-authentication.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-incoming-authentication.png new file mode 100644 index 0000000000..c4e44d11ba Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-incoming-authentication.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-link-naming.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-link-naming.png new file mode 100644 index 0000000000..7dadb196a0 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-link-naming.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-no-response.png b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-no-response.png new file mode 100644 index 0000000000..d2fca23cd0 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/bitbucket-server-no-response.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/gitlab-application-test-error.png b/docusaurus/docs/chart/configuration/integrations/images/gitlab-application-test-error.png new file mode 100644 index 0000000000..9974f2dbd7 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/gitlab-application-test-error.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/gitlab-cloud-application.png b/docusaurus/docs/chart/configuration/integrations/images/gitlab-cloud-application.png new file mode 100644 index 0000000000..c22236c5f4 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/gitlab-cloud-application.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/gitlab-enterprise-application.png b/docusaurus/docs/chart/configuration/integrations/images/gitlab-enterprise-application.png new file mode 100644 index 0000000000..f09dcbc283 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/gitlab-enterprise-application.png differ diff --git a/docusaurus/docs/chart/configuration/integrations/images/gitlab-enterprise-system-hook.png b/docusaurus/docs/chart/configuration/integrations/images/gitlab-enterprise-system-hook.png new file mode 100644 index 0000000000..e5ddfa29f4 Binary files /dev/null and b/docusaurus/docs/chart/configuration/integrations/images/gitlab-enterprise-system-hook.png differ diff --git a/docusaurus/docs/chart/configuration/logging.mdx b/docusaurus/docs/chart/configuration/logging.mdx new file mode 100644 index 0000000000..f4a7c92fb8 --- /dev/null +++ b/docusaurus/docs/chart/configuration/logging.mdx @@ -0,0 +1,95 @@ +--- +title: Logging +description: Configure log levels and log retention periods for your Codacy Self-hosted instance. +--- + +Currently, Codacy Self-hosted supports two types of log configurations: + +- **[Log level](#configuring-the-log-level):** The severity of the messages that will be shown in logs. +- **[Log retention period](#configuring-the-log-retention-period):** The period during which logs will be stored, before being removed by the cleanup job specified in the configuration. + +The sections below provide instructions on how to configure each logging configuration. + +## Configuring the log level \{#configuring-the-log-level\} + +The log level defines the minimum severity of the events contained in the logs, and affects the necessary storage space in MinIO. + +:::caution + We recommend that you don't use a log level lower than WARN, as the logs are useful to troubleshoot any issues in your Codacy Self-hosted instance. +::: + +Codacy supports configuring the log level of the following components: + +- `codacy-api` +- `engine` +- `listener` +- `worker-manager` + +Follow these instructions to configure the log level: + +1. Edit the value of `.config.logLevel` in the `values-production.yaml` file that is used to install Codacy, as shown in the example below. + + ```yaml + worker-manager: + replicaCount: 2 + config: + logLevel: WARN + resources: + limits: + cpu: 500m + memory: 1000Mi + requests: + cpu: 200m + memory: 200Mi + ``` + + The list of supported values for `logLevel` is shown below. Note that each level also prints the information of the levels higher than it: + + - **DEBUG (default):** Logs detailed information on the flow through the system. **This is the most verbose level**. + - **INFO:** Logs interesting events such as application startup and shutdown, important events on the flow of the system, or behavior that is skipped for expected reasons. + - **WARN:** Logs runtime events that are unexpected, or undesirable, but not necessarily wrong such as the use of deprecated APIs. + - **ERROR:** Only logs runtime errors, or unexpected conditions that prevent the expected behavior from happening. **This is the least verbose level**. + +1. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +## Configuring the log retention period {#configuring-the-log-retention-period} + +The log retention period is the number of days during which logs will be stored before being removed by the [MinIO bucket lifecycle configuration policy](https://docs.min.io/docs/minio-bucket-lifecycle-guide.html) that we provide in the template [lifecycle-police-job.yaml](https://github.com/codacy/chart/blob/master/codacy/templates/fluentd/lifecycle-police-job.yaml). + +Follow these instructions to configure the log retention period: + +1. Adjust the retention period of your logs by editing the value of `fluentdoperator.expirationDays` in the `values.yaml` file, as shown in the example below. + + ```yaml + fluentdoperator: + enabled: true + defaultConfigmap: codacy-fluentd-config + bucketName: logs + expirationDays: 7 + ``` + +1. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` diff --git a/docusaurus/docs/chart/configuration/monitoring.mdx b/docusaurus/docs/chart/configuration/monitoring.mdx new file mode 100644 index 0000000000..a3c12b7038 --- /dev/null +++ b/docusaurus/docs/chart/configuration/monitoring.mdx @@ -0,0 +1,144 @@ +--- +title: Monitoring +description: Instructions on how to set up monitoring for your Codacy Self-hosted instance. +--- + +Currently, Codacy Self-hosted supports two monitoring solutions: + +- **[Crow](#setting-up-monitoring-using-crow):** A simple, lightweight, and built-in monitoring solution, enabled by default when you install Codacy. +- **[Prometheus + Grafana + Loki](#setting-up-monitoring-using-grafana-prometheus-and-loki):** A comprehensive third-party monitoring solution, recommended for more advanced usage. + +The sections below provide instructions on how to set up each monitoring solution. + +## Setting up monitoring using Crow \{#setting-up-monitoring-using-crow\} + +Crow displays information about the projects that are pending analysis and the jobs currently running on Codacy. + +Crow is installed alongside Codacy when the Helm chart is deployed to the cluster. By default, you can access Crow as follows: + +- **URL:** `http:///monitoring`, where `` is the hostname of your Codacy instance +- **Username:** `codacy` +- **Password:** `C0dacy123` + +We highly recommend that you define a custom password for Crow, if you haven't already done it when installing Codacy: + +1. Edit the value of `global.crow.config.passwordAuth.password` in the `values-production.yaml` file that you used to install Codacy: + + ```yaml + global: + crow: + config: + passwordAuth: + password: C0dacy123 + ``` + +2. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +## Setting up monitoring using Grafana, Prometheus, and Loki \{#setting-up-monitoring-using-grafana-prometheus-and-loki\} + +[Prometheus](https://prometheus.io) is an open-source systems monitoring and alerting toolkit. Logs can be collected using [Loki](https://grafana.com/oss/loki/), which is a horizontally-scalable, highly-available, multi-tenant log aggregation system. Its data can be visualized with [Grafana](https://grafana.com), a widely used open source analytics and monitoring solution. + +This solution is considerably more resource demanding than Crow, and is recommended only for more advanced usage. Furthermore, its installation, configuration, and management require a deeper knowledge of Kubernetes as each component must be carefully tweaked to match your specific use case, using as starting point the `.yaml` values files provided by us. + +The instructions below cover the basic installation of these monitoring services using the [Kube Prometheus Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack). + +:::important +**If you're using MicroK8s** run `alias kubectl=microk8s.kubectl`. +::: + +### 1. Install custom resources + +Add the custom resources required for installing the monitoring bundle in your cluster: + +```bash +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.58.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +``` + +### 2. Installing Loki + +Obtain the configuration file for Loki, [`values-loki.yaml`](../values-files/values-loki.yaml), and install it by running the command below. While the default storage class setting for Loki persistence should suit most use cases, you may need to adjust it to your specific Kubernetes installation. For instance, for MicroK8s use `storageClassName: microk8s-hostpath`. + +```bash +helm repo add grafana https://grafana.github.io/helm-charts + +kubectl create namespace monitoring + +helm upgrade --install --atomic --timeout 600s loki grafana/loki \ + --version 2.14.1 --namespace monitoring --values values-loki.yaml +``` + +### 3. Installing Promtail + +Promtail is an agent that ships the contents of local logs to a Loki instance. + +Obtain the configuration file for Promtail, [`values-promtail.yaml`](../values-files/values-promtail.yaml), and install it by running the command below. + +```bash +helm upgrade --install --atomic --timeout 600s promtail grafana/promtail \ + --version 2.2.0 --namespace monitoring --values values-promtail.yaml + +``` + +### 4. Installing Prometheus and Grafana + +Obtain the configuration file for the [Kube Prometheus Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), [`values-prometheus-operator.yaml`](../values-files/values-prometheus-operator.yaml). Then: + +1. Edit the Grafana password for the `admin` user and the hostname for Grafana in the `values-prometheus-operator.yaml` file. + +2. Install the bundle on your cluster by running the command below. + +```bash +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts +helm repo update + +helm upgrade --install --atomic --timeout 600s monitoring prometheus-community/kube-prometheus-stack \ + --version 39.9.0 --namespace monitoring --values values-prometheus-operator.yaml +``` + +Grafana will be available on the domain you configured in your `values-prometheus-operator.yaml` file, with Prometheus and Loki configured as datasources. Follow the [Kubernetes documentation](https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-services/#accessing-services-running-on-the-cluster) if you need to access other monitoring services that are now running on your cluster, using the method that best suits your use case. + +### 5. Enable service dashboards + +Now that you have Prometheus and Grafana installed you can enable metrics reporting for Codacy components. + +1. Create a file named `values-monitoring.yaml` with the following content: + + ```yaml + global: + metrics: + kamon: + enabled: true + prometheusReporter: + enabled: true + serviceMonitor: + enabled: true + grafana: + enabled: true + ``` + +2. Apply this configuration by performing a Helm upgrade. To do so append `--values values-monitoring.yaml` to the command [used to install Codacy](../index.mdx#helm-upgrade): + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-monitoring.yaml + ``` diff --git a/docusaurus/docs/chart/images/charts.png b/docusaurus/docs/chart/images/charts.png new file mode 100644 index 0000000000..95a4d41fca Binary files /dev/null and b/docusaurus/docs/chart/images/charts.png differ diff --git a/docusaurus/docs/chart/images/codacy-architecture.svg b/docusaurus/docs/chart/images/codacy-architecture.svg new file mode 100644 index 0000000000..cf4821a75d --- /dev/null +++ b/docusaurus/docs/chart/images/codacy-architecture.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docusaurus/docs/chart/images/k8s-love.png b/docusaurus/docs/chart/images/k8s-love.png new file mode 100644 index 0000000000..b5482ed039 Binary files /dev/null and b/docusaurus/docs/chart/images/k8s-love.png differ diff --git a/docusaurus/docs/chart/index.mdx b/docusaurus/docs/chart/index.mdx new file mode 100644 index 0000000000..1cc254ea98 --- /dev/null +++ b/docusaurus/docs/chart/index.mdx @@ -0,0 +1,144 @@ +--- +title: Installing Codacy Self-hosted +description: Install and configure Codacy Self-hosted on Kubernetes or MicroK8s. +--- + +This documentation guides you on how to install Codacy Self-hosted on Kubernetes or MicroK8s. + +:::caution + **If you're running the legacy Codacy Self-hosted solution running on Docker** please contact [support@codacy.com](mailto:support@codacy.com) so that we can assist you with the migration to Codacy Self-hosted running on Kubernetes or MicroK8s. +::: + +To install Codacy you must complete these main steps: + +1. **Setting up the system requirements** + + Ensure that your infrastructure meets the hardware and system requirements to run Codacy. + +2. **Installing Codacy** + + Install Codacy on the cluster using our [Helm chart](https://github.com/codacy/chart/) that includes all the necessary components and dependencies. + +3. **Configuring Codacy** + + Configure integrations with Git providers and set up monitoring. + +The next sections include detailed instructions on how to complete each step of the installation process. Make sure that you complete each step before advancing to the next one. + +## 1. Setting up the system requirements + +Before you start, you must prepare and provision the database server and Kubernetes or MicroK8s cluster that will host Codacy. + +Carefully review and set up the system requirements to run Codacy by following the instructions on the page below: + +- [System requirements](./requirements.mdx) + +Optionally, you can follow one of the guides below to quickly create a new Kubernetes or MicroK8s cluster that satisfies the characteristics described in the system requirements: + +- [Creating an Amazon EKS cluster](./infrastructure/eks-quickstart.mdx) +- [Creating a MicroK8s cluster](./infrastructure/microk8s-quickstart.mdx) + +## 2. Installing Codacy + +Install Codacy on an existing cluster using our Helm chart: + +1. Make sure that you have the following tools installed on your machine: + + - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) within one minor version difference of your cluster + + :::caution + **If you're using MicroK8s** you don't need to install kubectl because you will execute all `kubectl` commands as `microk8s.kubectl` commands instead. To simplify this, [check how to create an alias](./infrastructure/microk8s-quickstart.mdx#notes-on-installing-codacy) for `kubectl`. + ::: + + - [Helm](https://helm.sh/docs/intro/install/) version >= 3.9 + +2. Create a cluster namespace called `codacy` that will group all resources related to Codacy. + + ```bash + kubectl create namespace codacy + ``` + +3. Add the Docker registry credentials provided by Codacy together with your license to a cluster Secret. This is necessary because some Codacy Docker images are currently private. + + Substitute `` and `` with the Docker registry username and password and run the following command: + + ```bash + kubectl create secret docker-registry docker-credentials \ + --docker-username= \ + --docker-password= \ + --namespace codacy + ``` + +4. Download the template file [`values-production.yaml`](./values-files/values-production.yaml) and use a text editor of your choice to edit the value placeholders as described in the comments. + +5. Create an address record on your DNS provider mapping the hostname you used in the previous step to the IP address of your Ingress controller. + + :::caution + **If you're using MicroK8s** you must map the hostname to the public IP address of the machine running MicroK8s. + ::: + +### Helm upgrade \{#helm-upgrade\} + +6. Add Codacy's chart repository to your Helm client and install the Codacy chart using the file `values-production.yaml` created previously. + + :::caution + **If you're using MicroK8s** you must download and use the file [`values-microk8s.yaml`](./values-files/values-microk8s.yaml) together with the file `values-production.yaml` by uncommenting the last line in the `helm upgrade` command below. + ::: + + ```bash + helm repo add codacy-stable https://charts.codacy.com/stable/ + helm repo update + helm upgrade --install codacy codacy-stable/codacy \ + --namespace codacy \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml + # --values values-microk8s.yaml + ``` + +7. By now all the Codacy pods should be starting in the cluster. Run the following command **and wait for all the pods to have the status Running**, which can take several minutes: + + ```bash + $ kubectl get pods -n codacy + NAME READY STATUS RESTARTS AGE + codacy-api-f7897b965-fgn67 1/1 Running 0 8m57s + codacy-api-f7897b965-kkqsx 1/1 Running 0 8m57s + codacy-crow-7c957d45f6-b8zp2 1/1 Running 2 8m57s + codacy-crowdb-0 1/1 Running 0 8m57s + codacy-engine-549bcb69d9-cgrqf 1/1 Running 1 8m57s + codacy-engine-549bcb69d9-sh5f4 1/1 Running 1 8m57s + codacy-fluentdoperator-x5vr2 2/2 Running 0 8m57s + codacy-listener-868b784dcf-npdfh 1/1 Running 0 8m57s + codacy-listenerdb-0 1/1 Running 0 8m57s + codacy-minio-7cfdc7b4f4-254gz 1/1 Running 0 8m57s + codacy-nfsserverprovisioner-0 1/1 Running 0 8m57s + codacy-portal-774d9fc596-rwqj5 1/1 Running 2 8m56s + codacy-rabbitmq-ha-0 1/1 Running 0 8m57s + codacy-ragnaros-69459775b5-hmj4d 1/1 Running 3 8m57s + codacy-remote-provider-service-8fb8556b-rr4ws 1/1 Running 0 8m56s + codacy-worker-manager-656dbf8d6d-n4j7c 1/1 Running 0 8m57s + ``` + +## 3. Configuring Codacy + +After successfully installing Codacy on your cluster, you're now ready to perform the post-install configuration steps: + +1. Use a browser to navigate to the Codacy hostname previously configured on the file `values-production.yaml`. + +2. Log in using your Git provider account. This automatically creates a Codacy administrator account with your credentials. + +3. Follow Codacy's onboarding process, which will guide you through the following steps: + + - Configuring one or more of the following supported integrations: + - [GitHub Cloud](./configuration/integrations/github-cloud.mdx) + - [GitHub Enterprise](./configuration/integrations/github-enterprise.mdx) + - [GitLab Cloud](./configuration/integrations/gitlab-cloud.mdx) + - [GitLab Enterprise](./configuration/integrations/gitlab-enterprise.mdx) + - [Bitbucket Cloud](./configuration/integrations/bitbucket-cloud.mdx) + - [Bitbucket Server](./configuration/integrations/bitbucket-server.mdx) + - [Email](./configuration/integrations/email.mdx) + - Creating an initial organization + - Inviting users to Codacy + +4. As a last step we recommend that you [set up monitoring](./configuration/monitoring.mdx) on your Codacy instance. + +If you run into any issues while configuring Codacy, be sure to [check our troubleshooting guide](./troubleshoot/troubleshoot.mdx) for more help. diff --git a/docusaurus/docs/chart/infrastructure/EKS/aws-terraform-minimum-admin-policy.json b/docusaurus/docs/chart/infrastructure/EKS/aws-terraform-minimum-admin-policy.json new file mode 100644 index 0000000000..33154abebb --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/aws-terraform-minimum-admin-policy.json @@ -0,0 +1,132 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "iam:CreateRole", + "iam:DeleteRole", + "iam:GetRole", + "iam:TagRole", + "iam:PassRole", + "iam:CreateInstanceProfile", + "iam:DeleteInstanceProfile", + "iam:GetInstanceProfile", + "iam:ListInstanceProfiles", + "iam:AddRoleToInstanceProfile", + "iam:RemoveRoleFromInstanceProfile", + "iam:ListInstanceProfilesForRole", + "iam:AttachRolePolicy", + "iam:DetachRolePolicy", + "iam:ListAttachedRolePolicies" + ], + "Resource": [ + "arn:aws:iam::*:role/codacy-*", + "arn:aws:iam::*:instance-profile/codacy-*" + ] + }, + { + "Effect": "Allow", + "Action": [ + "ec2:*Tags", + "ec2:Describe*", + "ec2:CreateVpc", + "ec2:CreateSubnet", + "ec2:CreateRouteTable", + "ec2:CreateRoute", + "ec2:CreateInternetGateway", + "ec2:AttachInternetGateway", + "ec2:AssociateRouteTable", + "ec2:ModifyVpcAttribute", + "ec2:DeleteVpc", + "ec2:DeleteSubnet", + "ec2:DeleteRouteTable", + "ec2:DeleteRoute", + "ec2:ModifyRoute", + "ec2:DeleteInternetGateway", + "ec2:CreateSecurityGroup", + "ec2:DeleteSecurityGroup", + "ec2:ModifySubnetAttribute", + "ec2:DisassociateRouteTable", + "ec2:DetachInternetGateway", + "ec2:AllocateAddress", + "ec2:ReleaseAddress", + "ec2:RevokeSecurityGroupEgress", + "ec2:RevokeSecurityGroupIngress", + "ec2:AuthorizeSecurityGroupEgress", + "ec2:AuthorizeSecurityGroupIngress", + "ec2:CreateNatGateway", + "ec2:DeleteNatGateway", + "ec2:CreateLaunchConfiguration", + "ec2:DeleteLaunchConfiguration" + ], + "Resource": "*" + }, + { + "Effect": "Allow", + "Action": "dynamodb:*", + "Resource": "arn:aws:dynamodb:*:*:table/codacy-*" + }, + { + "Effect": "Allow", + "Action": "s3:*", + "Resource": [ + "arn:aws:s3:::codacy*", + "arn:aws:s3:::codacy*/*" + ] + }, + { + "Effect": "Allow", + "Action": [ + "s3:ListAllMyBuckets", + "s3:CreateBucket", + "s3:GetBucketLocation" + ], + "Resource": "arn:aws:s3:::*" + }, + { + "Effect": "Allow", + "Action": [ + "ssm:GetParameters", + "ssm:GetParameter" + ], + "Resource": "arn:aws:ssm:*:*:parameter/aws/service/*" + }, + { + "Effect": "Allow", + "Action": "ssm:DescribeParameters", + "Resource": "arn:aws:ssm:*:*:*" + }, + { + "Effect": "Allow", + "Action": "ssm:*", + "Resource": "arn:aws:ssm:*:*:parameter/codacy*" + }, + { + "Effect": "Allow", + "Action": "logs:*", + "Resource": "arn:aws:logs:*:*:log-group:/aws/eks/codacy*" + }, + { + "Effect": "Allow", + "Action": "logs:DescribeLogGroups", + "Resource": "arn:aws:logs:*:*:log-group::log-stream:" + }, + { + "Effect": "Allow", + "Action": "eks:*", + "Resource": "arn:aws:eks:*:*:cluster/codacy*" + }, + { + "Effect": "Allow", + "Action": "autoscaling:Describe*", + "Resource": "*" + }, + { + "Effect": "Allow", + "Action": "autoscaling:*", + "Resource": "arn:aws:autoscaling:*:*:*codacy*" + } + ] +} + diff --git a/docusaurus/docs/chart/infrastructure/EKS/backend/config.tf b/docusaurus/docs/chart/infrastructure/EKS/backend/config.tf new file mode 100644 index 0000000000..fdfeca1014 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/backend/config.tf @@ -0,0 +1,17 @@ +# config.tf - terraform and providers configuration + +terraform { + required_version = "~> 0.12" +} + +provider "aws" { + # Set your AWS configuration here. For more information see the terraform + # provider information: https://www.terraform.io/docs/providers/aws/index.html + # You might need to set AWS_SDK_LOAD_CONFIG=1 to use your aws credentials file + region = var.aws_region + version = "~> 2.33" +} + +provider "random" { + version = "~> 2.2" +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/backend/outputs.tf b/docusaurus/docs/chart/infrastructure/EKS/backend/outputs.tf new file mode 100644 index 0000000000..9c31814976 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/backend/outputs.tf @@ -0,0 +1,7 @@ +output "state_bucket_name" { + value = aws_s3_bucket.state.id +} + +output "lock_table_name" { + value = aws_dynamodb_table.lock.name +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/backend/state_and_lock.tf b/docusaurus/docs/chart/infrastructure/EKS/backend/state_and_lock.tf new file mode 100644 index 0000000000..41369ec7f5 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/backend/state_and_lock.tf @@ -0,0 +1,50 @@ +# state_and_lock.tf - setup s3 state storage and dynamodb lock table +# For more info see https://www.terraform.io/docs/backends/types/s3.html + +resource "aws_s3_bucket" "state" { + bucket = "${var.project_tag}-terraform-state-${random_string.rand.result}" + acl = "private" + + ### To destroy uncomment this: + #force_destroy = true + ############################## + + ### To destroy comment this: + versioning { + enabled = true + } + + lifecycle { + prevent_destroy = true + } + ########################### + + tags = var.custom_tags +} + +resource "aws_dynamodb_table" "lock" { + name = "${var.project_tag}-terraform-lock" + hash_key = "LockID" + read_capacity = 20 + write_capacity = 20 + + attribute { + name = "LockID" + type = "S" + } + + ### To destroy comment this: + lifecycle { + prevent_destroy = true + } + ########################### + + tags = var.custom_tags +} + +resource "random_string" "rand" { + length = 22 + special = false + upper = false + number = false +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/backend/variables.tf b/docusaurus/docs/chart/infrastructure/EKS/backend/variables.tf new file mode 100644 index 0000000000..07c9d01b68 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/backend/variables.tf @@ -0,0 +1,19 @@ +# variables.tf - user settings. For provider settings see config.tf + +variable "project_tag" { + description = "Project tag to add to s3 and dynamodb names" + type = string + default = "codacy" +} + +variable "custom_tags" { + description = "Map of custom tags to apply to every resource" + type = map(string) + default = {} +} + +variable "aws_region" { + description = "AWS region where to deploy the infrastructure" + type = string + default = "eu-west-1" +} \ No newline at end of file diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/cluster_masters.tf b/docusaurus/docs/chart/infrastructure/EKS/main/cluster_masters.tf new file mode 100644 index 0000000000..f966d49399 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/cluster_masters.tf @@ -0,0 +1,84 @@ +# cluster_masters.tf - this creates the kubernetes cluster masters + +resource "aws_eks_cluster" "main" { + name = "${var.project_slug}-cluster" + version = var.k8s_version + + role_arn = aws_iam_role.eks_master.arn + + vpc_config { + security_group_ids = [aws_security_group.eks_master.id] + subnet_ids = var.create_network_stack ? [aws_subnet.private1[0].id, aws_subnet.private2[0].id] : var.subnet_ids + } + + # for more info see: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html + enabled_cluster_log_types = [ + "api", + "audit", + "authenticator", + "controllerManager", + "scheduler", + ] + + depends_on = [ + aws_cloudwatch_log_group.eks, + aws_iam_role.eks_master, + aws_security_group.eks_master + ] + + tags = var.custom_tags + +} + +### security group +resource "aws_security_group" "eks_master" { + name = "${var.project_slug}-cluster-master" + description = "${var.project_name} master SG" + vpc_id = var.create_network_stack ? aws_vpc.main[0].id : var.vpc_id + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = merge( + map("Name", "${var.project_name} cluster master"), + var.custom_tags + ) +} + +### cluster masters role +resource "aws_iam_role" "eks_master" { + name = "${var.project_slug}-master-role" + assume_role_policy = data.aws_iam_policy_document.eks_master.json + tags = var.custom_tags +} + +data "aws_iam_policy_document" "eks_master" { + statement { + principals { + identifiers = ["eks.amazonaws.com"] + type = "Service" + } + actions = ["sts:AssumeRole"] + } +} + +### managed polices for EKS. See https://docs.aws.amazon.com/eks/latest/userguide/service_IAM_role.html +resource "aws_iam_role_policy_attachment" "eks_service" { + policy_arn = "arn:aws:iam::aws:policy/AmazonEKSServicePolicy" + role = aws_iam_role.eks_master.name +} +resource "aws_iam_role_policy_attachment" "eks_cluster" { + policy_arn = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy" + role = aws_iam_role.eks_master.name +} + +### cloudwatch control plane logs +resource "aws_cloudwatch_log_group" "eks" { + name = "/aws/eks/${var.project_slug}-cluster/cluster" + retention_in_days = 7 + tags = var.custom_tags +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/cluster_workers.tf b/docusaurus/docs/chart/infrastructure/EKS/main/cluster_workers.tf new file mode 100644 index 0000000000..4741a6eba9 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/cluster_workers.tf @@ -0,0 +1,196 @@ +# cluster_workers.tf - this creates the workers autoscaling groups and launch configs, make the security group setups, +# and joins the worker nodes to the cluster. + +resource "aws_autoscaling_group" "workers" { + name = "${var.project_slug}-asg" + launch_configuration = aws_launch_configuration.workers.id + min_size = var.k8s_worker_min + max_size = var.k8s_worker_max + desired_capacity = var.k8s_worker_desired + vpc_zone_identifier = var.create_network_stack ? [aws_subnet.private1[0].id, aws_subnet.private2[0].id] : var.subnet_ids + + tag { + key = "Name" + value = "${var.project_slug}-worker" + propagate_at_launch = true + } + tag { + key = "kubernetes.io/cluster/${var.project_slug}-cluster" + value = "owned" + propagate_at_launch = true + } + tag { + key = "k8s.io/cluster-autoscaler/enabled" + value = "owned" + propagate_at_launch = false + } + + dynamic "tag" { + for_each = var.custom_tags + + content { + key = tag.key + value = tag.value + propagate_at_launch = true + } + } + + lifecycle { + create_before_destroy = true + } + +} + +resource "aws_launch_configuration" "workers" { + image_id = data.aws_ssm_parameter.eks_worker_ami.value + instance_type = var.k8s_worker_type + iam_instance_profile = aws_iam_instance_profile.eks_worker.name + name_prefix = var.project_slug + + user_data_base64 = base64encode(local.k8s_worker_userdata) + + security_groups = [ + aws_security_group.eks_worker.id + ] + + root_block_device { + volume_type = "gp2" + volume_size = var.k8s_worker_disk_size + delete_on_termination = true + } + + lifecycle { + create_before_destroy = true + } + + depends_on = [ + aws_iam_instance_profile.eks_worker + ] +} + +# Get an authentication token to communicate with an EKS cluster, using the "kubernetes" provider. +resource "kubernetes_config_map" "aws_auth" { + metadata { + name = "aws-auth" + namespace = "kube-system" + } + + data = { + mapRoles = <<-YAML + - rolearn: ${aws_iam_role.eks_worker.arn} + username: system:node:{{EC2PrivateDNSName}} + groups: + - system:bootstrappers + - system:nodes + YAML + } + depends_on = [ + aws_eks_cluster.main, + aws_autoscaling_group.workers + ] +} + +### join nodes to the cluster +locals { + k8s_worker_userdata = <<-END_USERDATA + #!/bin/bash + set -o xtrace + sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm + sudo systemctl start amazon-ssm-agent + sudo systemctl enable amazon-ssm-agent + /etc/eks/bootstrap.sh --apiserver-endpoint '${aws_eks_cluster.main.endpoint}' --b64-cluster-ca '${aws_eks_cluster.main.certificate_authority.0.data}' '${var.project_slug}-cluster' ${var.k8s_worker_bootstrap_extra_flags} + END_USERDATA +} + + +### worker nodes instance profile +resource "aws_iam_instance_profile" "eks_worker" { + name = "${var.project_slug}-worker" + role = aws_iam_role.eks_worker.name +} + +resource "aws_iam_role" "eks_worker" { + name = "${var.project_slug}-worker-role" + assume_role_policy = data.aws_iam_policy_document.eks_worker.json + tags = var.custom_tags +} + +data "aws_iam_policy_document" "eks_worker" { + statement { + principals { + identifiers = ["ec2.amazonaws.com"] + type = "Service" + } + actions = ["sts:AssumeRole"] + } +} + +### managed policies for worker nodes. See: https://docs.aws.amazon.com/eks/latest/userguide/worker_node_IAM_role.html +resource "aws_iam_role_policy_attachment" "eks_worker" { + policy_arn = "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy" + role = aws_iam_role.eks_worker.name +} +resource "aws_iam_role_policy_attachment" "eks_cni" { + policy_arn = "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy" + role = aws_iam_role.eks_worker.name +} +resource "aws_iam_role_policy_attachment" "ecr_read_only" { + policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly" + role = aws_iam_role.eks_worker.name +} +### managed policy for systems manager +resource "aws_iam_role_policy_attachment" "ssm" { + count = var.enable_ssm ? 1 : 0 + policy_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore" + role = aws_iam_role.eks_worker.name +} + +### security groups setup +resource "aws_security_group" "eks_worker" { + name = "${var.project_slug}-cluster-worker" + description = "${var.project_name} worker SG" + vpc_id = var.create_network_stack ? aws_vpc.main[0].id : var.vpc_id + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = merge( + map( + "Name", "${var.project_slug}-worker-sg", + "kubernetes.io/cluster/${var.project_slug}-cluster", "owned" + ), + var.custom_tags + ) +} + +resource "aws_security_group_rule" "allow_worker_worker" { + description = "Allow worker-worker connections" + security_group_id = aws_security_group.eks_worker.id + source_security_group_id = aws_security_group.eks_worker.id + type = "ingress" + protocol = "-1" + from_port = 0 + to_port = 65535 +} +resource "aws_security_group_rule" "allow_master_worker" { + description = "Allow worker connections from masters" + security_group_id = aws_security_group.eks_worker.id + source_security_group_id = aws_security_group.eks_master.id + type = "ingress" + protocol = "tcp" + from_port = 1025 + to_port = 65535 +} +resource "aws_security_group_rule" "allow_worker_master" { + description = "Allow connections from worker nodes" + security_group_id = aws_security_group.eks_master.id + source_security_group_id = aws_security_group.eks_worker.id + type = "ingress" + protocol = "tcp" + from_port = 443 + to_port = 443 +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/config.tf b/docusaurus/docs/chart/infrastructure/EKS/main/config.tf new file mode 100644 index 0000000000..295d1142cc --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/config.tf @@ -0,0 +1,39 @@ +# config.tf - terraform and providers configuration + +terraform { + required_version = "~> 0.12" + # Using a backend is recommended. See https://www.terraform.io/docs/backends/index.html + # You may use the provided S3 backend configuration by + # 1. first running `terraform apply` on the `backend/` directory, + # 2. getting the state bucket name with `terraform output state_bucket_name` + # 3. uncommenting the following lines, filling in the required infomation (bucket name and region) + # and (re)initializing terraform with `terraform init -reconfigure -backend=true` + + #backend "s3" { + # encrypt = true + # bucket = "YOUR_S3_BUCKET_NAME_HERE" + # dynamodb_table = "codacy-terraform-lock" + # region = "YOUR_REGION_HERE" + # key = "codacy/cluster.tfstate" + #} +} + +provider "aws" { + # Set your AWS configuration here. For more information see the terraform + # provider information: https://www.terraform.io/docs/providers/aws/index.html + # You might need to set AWS_SDK_LOAD_CONFIG=1 to use your aws credentials file + region = var.aws_region + version = "~> 2.33" +} + +provider "kubernetes" { + host = aws_eks_cluster.main.endpoint + cluster_ca_certificate = base64decode(aws_eks_cluster.main.certificate_authority.0.data) + token = data.aws_eks_cluster_auth.eks_cluster_auth.token + # Change `load_config_file` to `true` if, when reapplying, you obtain an error with content similar to: + # + # Error: configmaps "aws-auth" is forbidden: User "system:anonymous" cannot get resource "configmaps" in API group "" in the namespace "kube-system" + # + load_config_file = false + version = "~> 1.5" +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/constants.tf b/docusaurus/docs/chart/infrastructure/EKS/main/constants.tf new file mode 100644 index 0000000000..62094e74b5 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/constants.tf @@ -0,0 +1,15 @@ +# constants.tf - AWS constants + +data "aws_availability_zones" "AZs" { + state = "available" +} + +data "aws_region" "current" {} + +data "aws_ssm_parameter" "eks_worker_ami" { + name = "/aws/service/eks/optimized-ami/${var.k8s_version}/amazon-linux-2/recommended/image_id" +} + +data "aws_eks_cluster_auth" "eks_cluster_auth" { + name = aws_eks_cluster.main.name +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/network.tf b/docusaurus/docs/chart/infrastructure/EKS/main/network.tf new file mode 100644 index 0000000000..3b7301477a --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/network.tf @@ -0,0 +1,250 @@ +# network.tf - this creates the base network infrastructure required for the EKS cluster. +# Four subnets (two private and two public) are included in the main VPC, +# split over two availability zones. A NAT gateway is placed in each public +# subnet to allow egress internet access for instances located on private +# subnets. This traffic is sent via the also provided internet gateway. + + +resource "aws_vpc" "main" { + count = var.create_network_stack ? 1 : 0 + + cidr_block = var.vpc_cidr + + tags = merge( + map( + "Name", var.project_name, + "kubernetes.io/cluster/${var.project_slug}-cluster", "shared" + ), + var.custom_tags + ) +} + +### public route table +resource "aws_internet_gateway" "main" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + + tags = merge( + map("Name", var.project_name), + var.custom_tags + ) +} +resource "aws_route_table" "public" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + + tags = merge( + map("Name", "${var.project_name} public route table"), + var.custom_tags + ) +} +resource "aws_route" "public" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.public[0].id + gateway_id = aws_internet_gateway.main[0].id + destination_cidr_block = "0.0.0.0/0" +} + +### public subnet 1 +resource "aws_subnet" "public1" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + cidr_block = var.public_subnet1_cidr + availability_zone = data.aws_availability_zones.AZs.names[0] + + map_public_ip_on_launch = true + + tags = merge( + map( + "Name", "${var.project_name} public subnet 1", + "kubernetes.io/cluster/${var.project_slug}-cluster", "shared" + ), + var.custom_tags + ) +} +resource "aws_route_table_association" "public1" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.public[0].id + subnet_id = aws_subnet.public1[0].id +} + + +### public subnet 2 +resource "aws_subnet" "public2" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + cidr_block = var.public_subnet2_cidr + availability_zone = data.aws_availability_zones.AZs.names[1] + + map_public_ip_on_launch = true + + tags = merge( + map( + "Name", "${var.project_name} public subnet 2", + "kubernetes.io/cluster/${var.project_slug}-cluster", "shared" + ), + var.custom_tags + ) +} +resource "aws_route_table_association" "public2" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.public[0].id + subnet_id = aws_subnet.public2[0].id +} + +### private subnet 1 +resource "aws_subnet" "private1" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + cidr_block = var.private_subnet1_cidr + availability_zone = data.aws_availability_zones.AZs.names[0] + + tags = merge( + map( + "Name", "${var.project_name} private subnet 1", + "kubernetes.io/cluster/${var.project_slug}-cluster", "shared" + ), + var.custom_tags + ) +} + +### private subnet 1 route table +resource "aws_eip" "public1" { + count = var.create_network_stack ? 1 : 0 + + depends_on = [aws_internet_gateway.main[0]] + vpc = true + + tags = var.custom_tags +} +resource "aws_nat_gateway" "public1" { + count = var.create_network_stack ? 1 : 0 + + allocation_id = aws_eip.public1[0].id + subnet_id = aws_subnet.public1[0].id + + tags = var.custom_tags +} +resource "aws_route_table" "private1" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + + tags = var.custom_tags +} +resource "aws_route" "private1" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.private1[0].id + destination_cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.public1[0].id +} +resource "aws_route_table_association" "private1" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.private1[0].id + subnet_id = aws_subnet.private1[0].id +} + +### private subnet 2 +resource "aws_subnet" "private2" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + cidr_block = var.private_subnet2_cidr + availability_zone = data.aws_availability_zones.AZs.names[1] + + tags = merge( + map( + "Name", "${var.project_name} private subnet 2", + "kubernetes.io/cluster/${var.project_slug}-cluster", "shared" + ), + var.custom_tags + ) +} + +### private subnet 2 route table +resource "aws_eip" "public2" { + count = var.create_network_stack ? 1 : 0 + + depends_on = [aws_internet_gateway.main[0]] + vpc = true + + tags = var.custom_tags +} +resource "aws_nat_gateway" "public2" { + count = var.create_network_stack ? 1 : 0 + + allocation_id = aws_eip.public2[0].id + subnet_id = aws_subnet.public2[0].id + + tags = var.custom_tags +} +resource "aws_route_table" "private2" { + count = var.create_network_stack ? 1 : 0 + + vpc_id = aws_vpc.main[0].id + + tags = var.custom_tags +} +resource "aws_route" "private2" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.private2[0].id + destination_cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.public2[0].id +} +resource "aws_route_table_association" "private2" { + count = var.create_network_stack ? 1 : 0 + + route_table_id = aws_route_table.private2[0].id + subnet_id = aws_subnet.private2[0].id +} + +### vpc endpoints +data aws_iam_policy_document "allow_all" { + statement { + actions = ["*"] + principals { + identifiers = ["*"] + type = "AWS" + } + resources = ["*"] + } +} + +resource "aws_vpc_endpoint" "s3" { + count = var.create_vpc_endpoints && var.create_network_stack ? 1 : 0 + + service_name = "com.amazonaws.${data.aws_region.current.name}.s3" + vpc_id = aws_vpc.main[0].id + route_table_ids = [ + aws_route_table.private1[0].id, + aws_route_table.private2[0].id + ] + policy = data.aws_iam_policy_document.allow_all.json + + tags = var.custom_tags +} + +resource "aws_vpc_endpoint" "dynamodb" { + count = var.create_vpc_endpoints && var.create_network_stack ? 1 : 0 + + service_name = "com.amazonaws.${data.aws_region.current.name}.dynamodb" + vpc_id = aws_vpc.main[0].id + route_table_ids = [ + aws_route_table.private1[0].id, + aws_route_table.private2[0].id + ] + policy = data.aws_iam_policy_document.allow_all.json + + tags = var.custom_tags +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/outputs.tf b/docusaurus/docs/chart/infrastructure/EKS/main/outputs.tf new file mode 100644 index 0000000000..e43cdf266d --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/outputs.tf @@ -0,0 +1,29 @@ +output "cluster_endpoint" { + value = aws_eks_cluster.main.endpoint +} + +locals { + aws_auth_configmap = <<-EOF + + + apiVersion: v1 + kind: ConfigMap + metadata: + name: aws-auth + namespace: kube-system + data: + mapRoles: | + - rolearn: ${aws_iam_role.eks_worker.arn} + username: system:node:{{EC2PrivateDNSName}} + groups: + - system:bootstrappers + - system:nodes + EOF +} + +output "aws_auth_configmap" { + # Add this to your cluster by running: + # terraform output aws_auth_configmap | kubectl apply -f - + # + value = local.aws_auth_configmap +} diff --git a/docusaurus/docs/chart/infrastructure/EKS/main/variables.tf b/docusaurus/docs/chart/infrastructure/EKS/main/variables.tf new file mode 100644 index 0000000000..b4aea8c20c --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/EKS/main/variables.tf @@ -0,0 +1,140 @@ +# variables.tf - user settings. For terraform settings see config.tf + +### project +variable "aws_region" { + description = "AWS region where to deploy the infrastructure" + type = string + default = "eu-west-1" +} + +variable "project_name" { + description = "Base project name, used to tag resources" + type = string + default = "Codacy" +} + +variable "project_slug" { + description = "Base project slug, used to name resources" + type = string + default = "codacy" +} + +variable "custom_tags" { + description = "Map of custom tags to apply to every resource" + type = map(string) + default = {} +} + +### kubernetes +variable "k8s_version" { + description = "Kubernetes version to use in the cluster" + type = string + default = "1.16" +} + +variable "k8s_worker_type" { + description = "Instance type used for kubernetes worker nodes" + type = string + default = "m5.2xlarge" +} + +variable "k8s_worker_bootstrap_extra_flags" { + description = "Additional flags to pass to the kubernetes worker node bootstrap script" + type = string + default = "" +} + +variable "k8s_worker_disk_size" { + description = "Size (in GB) of the disk used for kubernetes worker nodes" + type = number + default = 100 +} + +variable "k8s_worker_min" { + description = "Minimimum number of kubernetes worker nodes" + type = number + default = 2 +} + +variable "k8s_worker_max" { + description = "Maximum number of kubernetes worker nodes" + type = number + default = 8 +} + +variable "k8s_worker_desired" { + description = "Desired number of kubernetes worker nodes" + type = number + default = 4 +} + +### network +variable "create_network_stack" { + description = "If true then create the network stack (set to false to use preexisting VPC / networks)" + type = bool + default = true +} + +### create everything +variable "vpc_cidr" { + description = "CIDR of the VPC wich house the EKS cluster" + type = string + default = "10.8.0.0/16" +} + +variable "private_subnet1_cidr" { + description = "CIDR of private subnet 1 (this should be large)" + type = string + default = "10.8.0.0/18" +} + +variable "private_subnet2_cidr" { + description = "CIDR of private subnet 2 (this should be large)" + type = string + default = "10.8.64.0/18" +} + +variable "public_subnet1_cidr" { + description = "CIDR of public subnet 1" + type = string + default = "10.8.128.0/19" +} + +variable "public_subnet2_cidr" { + description = "CIDR of public subnet 2" + type = string + default = "10.8.160.0/19" +} + +variable "create_vpc_endpoints" { + description = "If true then vpc endpoints for DynamoDB and S3" + # This allows direct access to these resources from the private subnet, thus reducing nat gateway trafic. + type = bool + default = false +} + +### use existing vpc and subnets (create_network_stack == false) +variable "vpc_id" { + description = "ID of the vpc where to deploy (only used if create_network_stack == false)" + type = string + default = null +} + +variable "subnet_ids" { + description = "List of subnet IDs to use for the cluster (only used if create_network_stack == false)" + type = list(string) + default = [] +} + +### general +variable "ssm_prefix" { + description = "Prefix used for the SSM parameters" + type = string + default = "/codacy/enterprise" +} + +variable "enable_ssm" { + description = "If true then add systems manager policy to nodes (this allows remote access for authorized users)" + type = bool + default = false +} diff --git a/docusaurus/docs/chart/infrastructure/eks-quickstart.mdx b/docusaurus/docs/chart/infrastructure/eks-quickstart.mdx new file mode 100644 index 0000000000..54824fc88c --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/eks-quickstart.mdx @@ -0,0 +1,184 @@ +--- +title: Creating an Amazon EKS cluster +descriptions: Set up an Amazon EKS cluster to run Codacy Self-hosted, including the necessary underlying infrastructure, using Terraform. +--- + + +Follow the instructions below to set up an Amazon EKS cluster from scratch, including the necessary underlying infrastructure, using Terraform. + +The following diagram is a non-exhaustive overview of what you can expect to have deployed in your AWS account by using this quickstart guide. + +![Codacy Amazon EKS quickstart](images/codacy-chart-eks-quickstart.jpg) + +## 1. Prepare your environment + +Prepare your environment to set up the Amazon EKS cluster: + +1. Make sure that you have the following tools installed on your machine: + + - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version >= 2.0.0 + - [AWS CLI](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-install.html) version 1 + - [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) version >= 0.12 + - [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) version >= 1.14 + +2. Set up the AWS CLI credentials for your AWS account using the [AWS CLI](https://docs.aws.amazon.com/polly/latest/dg/setup-aws-cli.html) and [Terraform](https://www.terraform.io/docs/providers/aws/index.html) documentation as reference. + + Note that, as stated on the [Terraform documentation](https://registry.terraform.io/providers/hashicorp/aws/2.70.1/docs#shared-credentials-file), if your `.aws/credentials` are more complex you might need to set `AWS_SDK_LOAD_CONFIG=1` for Terraform to work correctly: + + ```bash + export AWS_SDK_LOAD_CONFIG=1 + ``` + +3. Clone the Codacy chart repository and change to the directory that includes the provided Terraform configuration files: + + ```bash + git clone https://github.com/codacy/chart.git + cd chart/docs/infrastructure/EKS/ + ``` + + This folder includes the following infrastructure stacks: + + - **backend:** Optional S3 bucket for storing the Terraform state and a DynamoDB table for state locking + - **main:** Amazon EKS cluster, including the setup of all network and node infrastructure to go from zero to a fully functional cluster + + You must have administration privileges on AWS to deploy (and eventually destroy) this infrastructure. The policy file [aws-terraform-minimum-admin-policy.json](./EKS/aws-terraform-minimum-admin-policy.json) lists the minimum privileges that are required. + +## 2. Set up the Terraform state storage backend + +The [backend](https://www.terraform.io/docs/backends/index.html) stores the current and historical state of your infrastructure. + +Although using the backend is optional, we recommend that you deploy it, particularly if you're planning to use these Terraform templates to make modifications to the cluster in the future: + +1. Initialize Terraform and deploy the infrastructure described in the `backend/` directory, then follow Terraform's instructions: + + ```bash + cd backend/ + terraform init && terraform apply + ``` + + This creates an Amazon S3 bucket with a unique name to save the infrastructure state. + +2. Take note of the value of `state_bucket_name` in the output of the command. + +3. Edit the `main/config.tf` file and follow the instructions included in the comments to set the name of the Amazon S3 bucket created above and enable the use of the backend in those infrastructure stacks. + +## 3. Create a vanilla Amazon EKS cluster + +Create a cluster that includes all the required network and node setup: + +1. Initialize Terraform and deploy the infrastructure described in the `main/` directory, then follow Terraform's instructions: + + ```bash + cd ../main/ + terraform init && terraform apply + ``` + + This process takes around 10 minutes. + +2. Consider if you want to tailor the cluster to your needs by customizing the cluster configuration. + + The cluster configuration (such as the type and number of nodes, network CIDRs, etc.) is exposed as variables in the `main/variables.tf` file. + + To customize the defaults of that file we recommend that you use a [variable definitions file](https://www.terraform.io/docs/configuration/variables.html#variable-definitions-tfvars-files) and set the variables in a file named `terraform.tfvars` in the directory `main/`. The following is an example `terraform.tfvars`: + + ```text + some_key = "a_string_value" + another_key = 3 + someting_else = true + ``` + + Subsequently running `terraform apply` loads the variables in the `terraform.tfvars` file by default: + + ```bash + terraform apply + ``` + +3. Set up the kubeconfig file that stores the information needed by `kubectl` to connect to the new cluster by default: + + ```bash + aws eks update-kubeconfig --name codacy-cluster --alias codacy-cluster + ``` + +4. Get information about the pods in the cluster to test that the cluster was created and that `kubectl` can successfully connect to the cluster: + + ```bash + kubectl get pods -A + ``` + +## 4. Prepare to set up the Ingress Controller + +Prepare your infrastructure for the Ingress Controller setup, which is performed later during the installation process: + +1. Make sure that your network resources are correctly tagged, and create the following required tags if they are missing: + + | Resource Type | Key = Value | + | ---------------- | --------------------------------------------------------------------------------------------- | + | VPC | `kubernetes.io/cluster/codacy-cluster` = `shared` | + | Subnet (public) | `kubernetes.io/cluster/codacy-cluster` = `shared`
`kubernetes.io/role/elb` = `1` | + | Subnet (private) | `kubernetes.io/cluster/codacy-cluster` = `shared`
`kubernetes.io/role/internal-elb` = `1` | + + For more information refer to the [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html). + +2. Add the following chart repositories to Helm: + + ```bash + helm repo add stable https://charts.helm.sh/stable + helm repo update + ``` + +## 5. Install the NGINX Ingress Controller + +Install the NGINX Ingress Controller: + +1. Download the configuration file [`values-nginx.yaml`](../values-files/values-nginx.yaml) for the NGINX Ingress Controller. + + If you wish to use a private load balancer or restrict the IP range for the provisioned load balancer edit the file and enable the required annotation and/or the corresponding setting where indicated. + +2. Install the NGINX Ingress Controller. + + **If you're using Kubernetes version `<= 1.21`**, run: + + ```bash + kubectl create namespace codacy + helm upgrade --install --namespace codacy --version 1.39.0 codacy-nginx-ingress stable/nginx-ingress -f values-nginx.yaml + ``` + + **If you're using Kubernetes version 1.22 or later**, run: + + ``` + kubectl create namespace codacy + helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx + helm repo update + helm upgrade --install --namespace codacy --version 4.8.3 nginx-ingress ingress-nginx/ingress-nginx -f values-nginx.yaml + ``` + +## Uninstalling the Amazon EKS cluster + +:::warning +If you proceed beyond this point you'll permanently delete and break things. +::: + +1. Delete the Kubernetes cluster. + + Run the following command in the `main/` directory: + + ```bash + terraform destroy + ``` + + This process takes around 10 minutes. + +2. Remove the Terraform backend. + + If you created the Terraform backend with the provided stack you can now safely delete it. + + The backend is purposely created with extra settings to prevent its accidental destruction. To destroy it cleanly you must first disable these settings by editing the file `backend/state_and_lock.tf` and following the instructions included in the comments. + + Afterwards, run the following command in the `backend/` directory: + + ```bash + terraform apply && terraform destroy + ``` + + Note that you first have to run `terraform apply` to update the settings, and only + then will `terraform destroy` be able to destroy the backend. diff --git a/docusaurus/docs/chart/infrastructure/images/codacy-chart-eks-quickstart.jpg b/docusaurus/docs/chart/infrastructure/images/codacy-chart-eks-quickstart.jpg new file mode 100644 index 0000000000..c30168af33 Binary files /dev/null and b/docusaurus/docs/chart/infrastructure/images/codacy-chart-eks-quickstart.jpg differ diff --git a/docusaurus/docs/chart/infrastructure/microk8s-quickstart.mdx b/docusaurus/docs/chart/infrastructure/microk8s-quickstart.mdx new file mode 100644 index 0000000000..a51e4f0fb9 --- /dev/null +++ b/docusaurus/docs/chart/infrastructure/microk8s-quickstart.mdx @@ -0,0 +1,147 @@ +--- +title: Creating a MicroK8s cluster +descriptions: Set up a MicroK8s instance to run Codacy Self-hosted, including all the necessary dependencies and configurations. +--- + + +Follow the instructions below to set up a MicroK8s instance from scratch, including all the necessary dependencies and configurations. + +[MicroK8s](https://microk8s.io/) is a lightweight, fully conformant, single-package Kubernetes developed by Canonical. The project is [publicly available on GitHub](https://github.com/ubuntu/microk8s). + +## 1. Prepare your environment + +Prepare your environment to set up the MicroK8s instance. + +- You will need a machine running [Ubuntu Server 20.04 LTS](https://ubuntu.com/download/server) that: + + - Is correctly provisioned with the resources described for MicroK8s in the [system requirements](../requirements.mdx#kubernetes-or-microk8s-cluster-setup) + - Is able to establish a connection to the PostgreSQL instance described in the [system requirements](../requirements.mdx#postgresql-server-setup) + +- Make sure that you have [Helm](https://helm.sh/docs/intro/install/) version 3.8.1 installed. + +The next steps assume that you're starting from a clean install of Ubuntu Server and require that you run commands on a local or remote command line session on the machine. + +## 2. Installing MicroK8s + +Install MicroK8s on the machine: + +1. Make sure that the package `nfs-common` is installed: + + ```bash + sudo apt update && sudo apt install nfs-common -y + ``` + +2. Install MicroK8s from the `1.19/stable` channel: + + ```bash + sudo snap install microk8s --classic --channel=1.19/stable + sudo usermod -a -G microk8s $USER + sudo su - $USER + ``` + +3. Check that MicroK8s is running: + + ```bash + microk8s.status --wait-ready + ``` + +4. If you're running MicroK8s using a single node, disable high-availability clustering for improved performance: + + ```bash + microk8s.disable ha-cluster + ``` + +## 3. Configuring MicroK8s + +Now that MicroK8s is running on the machine we can proceed to enabling the necessary addons: + +1. Configure MicroK8s to allow privileged containers: + + ```bash + sudo mkdir -p /var/snap/microk8s/current/args + sudo echo "--allow-privileged=true" >> /var/snap/microk8s/current/args/kube-apiserver + microk8s.status --wait-ready + ``` + +2. Enable the following MicroK8s addons: + + ```bash + microk8s.enable dns + microk8s.status --wait-ready + microk8s.enable storage + microk8s.status --wait-ready + microk8s.enable ingress + microk8s.status --wait-ready + ``` + + !!! important + Check the output of the commands to make sure that all the addons are enabled correctly. + + If by chance any of the addons fails to be enabled, re-execute the `microk8s.enable` command for that addon. + +3. Restart MicroK8s and its services to make sure that all configurations are working: + + ```bash + microk8s.stop + microk8s.start + microk8s.status --wait-ready + ``` + +4. Export your kubeconfig so that Helm knows on which cluster to install the charts: + + ```bash + microk8s.config > ~/.kube/config + ``` + +5. The addons are now enabled and the MicroK8s instance bootstrapped. However, we must wait for some MicroK8s pods to be ready, as failing to do so can result in the pods entering a `CrashLoopBackoff` state: + + ```bash + microk8s.kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=kube-dns + microk8s.kubectl wait -n kube-system --for=condition=Ready pod -l k8s-app=hostpath-provisioner + # If the following command fails, you probably installed the wrong MicroK8s version + microk8s.kubectl wait --all-namespaces --for=condition=Ready pod -l name=nginx-ingress-microk8s + ``` + +6. Verify that the MicroK8s configuration was successful: + + ```bash + microk8s.status --wait-ready + ``` + + The output of the command should be the following: + + ```text + microk8s is running + addons: + knative: disabled + jaeger: disabled + fluentd: disabled + gpu: disabled + cilium: disabled + storage: enabled + registry: disabled + rbac: disabled + ingress: enabled + dns: enabled + metrics-server: disabled + linkerd: disabled + prometheus: disabled + istio: disabled + dashboard: disabled + ``` + +After these steps you have ensured that DNS, HTTP, and NGINX Ingress are enabled and working properly inside the MicroK8s instance. + +## Notes on installing Codacy \{#notes-on-installing-codacy\} + +You can now follow the generic [Codacy installation instructions](../index.mdx#2-installing-codacy) but please note the following: + +- You must execute all `kubectl` commands as `microk8s.kubectl` commands instead. + + To simplify this, we suggest that you create an alias so that you can run the commands directly as provided on the instructions: + + ```bash + alias kubectl=microk8s.kubectl + ``` + +- When running the `helm upgrade` command that installs the Codacy chart, you will be instructed to also use the file [`values-microk8s.yaml`](../values-files/values-microk8s.yaml) that downsizes some component limits, making it easier to fit Codacy in the lightweight MicroK8s solution. diff --git a/docusaurus/docs/chart/maintenance/database.mdx b/docusaurus/docs/chart/maintenance/database.mdx new file mode 100644 index 0000000000..7e3199f4f2 --- /dev/null +++ b/docusaurus/docs/chart/maintenance/database.mdx @@ -0,0 +1,87 @@ +--- +title: Database migration guide +description: Instructions on how to migrate your Codacy Self-hosted database. +--- + + +Migrating databases between pods is a straightforward process with 3 steps: + +1. Dump the databases to a dump file. +2. Apply the dump file. +3. Delete the dump file. + +You will have to dump all the following databases: + +1. accounts +2. analysis +3. filestore +4. jobs +5. metrics +6. results + +## Requirements + +The following operations must be executed by a user which has elevated access (`SUPERUSER`) in the Postgres databases. + +## Dumping your current data out of a running Postgres + +You will need to know the following: + +- `$HOSTNAME` - the hostname where the database is located. +- `$DB_USER` - the username with privileged access to the database that will perform the dump. +- `$DB` - the database that you would like to export. +- `$DB_PASSWORD` - the database password. + +### pg_dump + +The following command lets you extract a given database into a dump file: + +```bash +PGPASSWORD=$DB_PASSWORD pg_dump -h $SRC_HOSTNAME -p $SRC_HOSTPORT -U $DB_USER --clean -Fc $db > /tmp/$db.dump +``` + +This will dump the file with the `.dump` extension into the `/tmp` folder. + +[For more information and additional options, please check the official documentation.](https://www.postgresql.org/docs/12/app-pgdump.html) + +### pg_restore + +To restore a database, you can run a `pg_restore` command to consume the dump file and replicate the data onto Postgres: + +```bash +PGPASSWORD=$DB_PASSWORD pg_restore -h $DEST_HOSTNAME -p $DEST_HOSTPORT -U $DB_USER -j 8 -d $db -n public --clean $db.dump +``` + +With the custom format from `pg_dump` (by using `-Fc`) we can now invoke `pg_restore` with multiple parallel jobs. This should make the restoration of the databases quicker, depending on which value you provide for the number of parallel jobs to execute. We provide a value of 8 parallel jobs in the example above (`-j 8`). + +:::note +If you run into any problems while restoring, make sure that you have the database created in that Postgres instance (e.g. before restoring the jobs database the Postgres instance should have an empty database called `jobs` created there). +::: + +For more information and additional options, please check the [official documentation](https://www.postgresql.org/docs/12/app-pgrestore.html). + +## Sample script + +Assuming you have the same `$DB_USER` and `$DB_PASSWORD`, and that you want to migrate all the databases from the same hostname to the same destination hostname, you could migrate your databases with the following sample script: + +```bash +SRC_HOSTNAME=$1 +SRC_HOSTPORT=$2 +DEST_HOSTNAME=$3 +DEST_HOSTPORT=$4 +DB_USER=$5 +DB_PASSWORD=$6 + +declare -a dbs=(accounts analysis filestore jobs metrics results) +for db in ${dbs[@]} +do + PGPASSWORD=$DB_PASSWORD pg_dump -h $SRC_HOSTNAME -p $SRC_HOSTPORT -U $DB_USER --clean -Fc $db > /tmp/$db.dump + PGPASSWORD=$DB_PASSWORD pg_restore -h $DEST_HOSTNAME -p $DEST_HOSTPORT -U $DB_USER -d $db -n public --clean $db.dump +done +``` + +As an example, you could run the script as follows: + +```bash +migrateDBs.sh postgres–instance1.us-east-1.rds.amazonaws.com 25060 postgres–instance1.eu-west-1.rds.amazonaws.com 25060 super_user secret_password +``` diff --git a/docusaurus/docs/chart/maintenance/license.mdx b/docusaurus/docs/chart/maintenance/license.mdx new file mode 100644 index 0000000000..786557bdbd --- /dev/null +++ b/docusaurus/docs/chart/maintenance/license.mdx @@ -0,0 +1,38 @@ +--- +title: Updating your Codacy license +description: Some changes to your Codacy plan require that you update your Codacy Self-hosted license with a new one provided by a Codacy representative. +--- + +Some changes to your Codacy plan require that you update your Codacy Self-hosted license with a new one provided by a Codacy representative: + +1. Edit the value of `codacy-api.config.license` in the `values-production.yaml` file that you used to install Codacy: + + ```yaml + codacy-api: + config: + license: <--- insert your Codacy license here ---> + ``` + +2. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.mdx#helm-upgrade): + + !!! important + **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. + + To do this, uncomment the last line before running the `helm upgrade` command below. + + ```bash + helm upgrade (...options used to install Codacy...) \ + --version {{ extra.codacy_self_hosted_version }} \ + --values values-production.yaml \ + # --values values-microk8s.yaml + ``` + +## Checking the expiration date of your Codacy license + +To check the expiration date of your Codacy license, do the following: + +1. Click the **Admin** link in the top right-hand corner. + +1. On the **Dashboard** page, search for your organization and click the organization identifier to navigate to its details. + +1. On the **Organization details**, check your **Plan expiry date**. diff --git a/docusaurus/docs/chart/maintenance/uninstall.mdx b/docusaurus/docs/chart/maintenance/uninstall.mdx new file mode 100644 index 0000000000..e44b1c0cd5 --- /dev/null +++ b/docusaurus/docs/chart/maintenance/uninstall.mdx @@ -0,0 +1,30 @@ +--- +title: Uninstalling Codacy +--- + +To ensure a clean removal you should uninstall Codacy Self-hosted before destroying the cluster. + +To do so run: + +```bash +helm -n codacy uninstall codacy +kubectl -n codacy delete --all pod & +kubectl -n codacy delete --all pvc & +kubectl -n codacy delete --all job & +sleep 5 +kubectl -n codacy patch pvc -p '{"metadata":{"finalizers":null}}' $(kubectl -n codacy get pvc -o jsonpath='{.items[*].metadata.name}') +sleep 5 +kubectl -n codacy delete pod $(kubectl -n codacy get pod -o jsonpath='{.items[*].metadata.name}') --force --grace-period=0 +kubectl -n codacy get pod & +kubectl -n codacy get pvc & +kubectl -n codacy get job & +``` + +Note that the deletion of `pvc`s in the above command has to run in the background due to a cyclic dependency in one of the components. If you're unsure of the effects of these commands please run each of the `bash` subcommands and validate their output: + +```bash +echo "PVCs to delete:" +kubectl get pvc -n codacy -o jsonpath='{.items[*].metadata.name}' +echo "PODS to delete:" +kubectl get pods -n codacy -o jsonpath='{.items[*].metadata.name}' +``` diff --git a/docusaurus/docs/chart/maintenance/upgrade.mdx b/docusaurus/docs/chart/maintenance/upgrade.mdx new file mode 100644 index 0000000000..e49e1fac7d --- /dev/null +++ b/docusaurus/docs/chart/maintenance/upgrade.mdx @@ -0,0 +1,46 @@ +--- +title: Upgrading Codacy +description: Instructions on how to upgrade Codacy Self-hosted to the latest stable version. +--- + +import SelfHostedVersion from '../assets/includes/self-hosted-version.mdx' + +To upgrade Codacy Self-hosted to the latest stable version: + +1. [Check the release notes](https://docs.codacy.com/release-notes/#self-hosted) for all Codacy Self-hosted versions between your current version and the most recent version for breaking changes and follow the instructions provided carefully. + + !!! warning + Failing to follow the steps to deal with breaking changes can cause the upgrade to fail or cause problems while Codacy is running. + + **In particular, [Codacy Self-hosted v5.0.0](https://docs.codacy.com/release-notes/self-hosted/self-hosted-v5.0.0/) drops the support for legacy manual organizations**. + + + +1. Store all your currently defined configuration values in a file: + + ```bash + helm get values codacy \ + --namespace codacy \ + --output yaml > codacy.yaml + + ``` + + !!! note + If you installed Codacy on a Kubernetes namespace different from `codacy`, make sure that you adjust the namespace when executing the commands in this page. + +1. Review the values stored in the file `codacy.yaml`, making any changes if necessary. + +1. Perform the upgrade using the values stored in the file: + + ```bash + helm repo update + helm upgrade codacy codacy-stable/codacy \ + --version {{ extra.codacy_self_hosted_version }} \ + --namespace codacy \ + --values codacy.yaml + ``` + +1. Update your Codacy command-line tools to the versions with the Git tag `self-hosted-{{ extra.codacy_self_hosted_version }}`: + + - [Codacy Analysis CLI](https://github.com/codacy/codacy-analysis-cli/releases/tag/self-hosted-{{ extra.codacy_self_hosted_version }}) + - [Codacy Coverage Reporter](https://github.com/codacy/codacy-coverage-reporter/releases/tag/self-hosted-{{ extra.codacy_self_hosted_version }}) diff --git a/docusaurus/docs/chart/requirements.mdx b/docusaurus/docs/chart/requirements.mdx new file mode 100644 index 0000000000..0608ff8892 --- /dev/null +++ b/docusaurus/docs/chart/requirements.mdx @@ -0,0 +1,164 @@ +--- +title: System requirements +description: Before installing Codacy Self-hosted you must ensure that you have your infrastructure correctly provisioned and configured. +--- + +Before installing Codacy Self-hosted you must ensure that you have the following infrastructure correctly provisioned and configured: + +- [Git provider](#git-provider) +- [Kubernetes or MicroK8s cluster](#kubernetes-or-microk8s-cluster-setup) +- [PostgreSQL server](#postgresql-server-setup) + +The next sections describe in detail how to set up these prerequisites. + +## Git provider \{#git-provider\} + +To use Codacy Self-hosted, you must use one or more of our [supported Git providers](../faq/general/which-platforms-and-technologies-does-codacy-support). In particular, if you're using a self-hosted Git provider, make sure that your version is supported by Codacy. + +## Kubernetes or MicroK8s cluster setup \{#kubernetes-or-microk8s-cluster-setup\} + +The cluster running Codacy must satisfy the following requirements: + +- The infrastructure hosting the cluster must be provisioned with the hardware and networking requirements described below +- The orchestration platform managing the cluster must be one of: + - [Kubernetes](https://kubernetes.io/) **version 1.22.\*** to **1.26.\*** (1.23 recommended) + - [MicroK8s](https://microk8s.io/) **version 1.19.\*** +- The [NGINX Ingress controller](https://github.com/kubernetes/ingress-nginx) must be installed and correctly set up in the cluster + +### Cluster networking requirements + +The cluster must be configured to accept and establish connections on the following ports: + +| | Service | Protocol/Port | Notes | +| -------- | ------------ | ------------- | ------------------------------------------------------------------ | +| Inbound | SSH | TCP/22 | **MicroK8s only**, to access the infrastructure remotely. | +| Inbound | HTTP | TCP/80 | Allow access to the Codacy website and API endpoints | +| Inbound | HTTPS | TCP/443 | Allow access to the Codacy website and API endpoints | +| Outbound | PostgreSQL | TCP/5432 | Connection to the PostgreSQL DBMS | +| Outbound | SMTP | TCP/25 | Connection to your SMTP server | +| Outbound | SMTPS | TCP/465 | Connection to your SMTP server over TLS/SSL | +| Outbound | Docker Hub | \* | Connection to Docker Hub to download the required container images | +| Outbound | Git provider | \* | Connection to the ports required by your remote Git provider | + +### Cluster hardware requirements + +The high-level architecture described in the next section is important in understanding how Codacy uses and allocates hardware resources. Below we also provide guidance on [resource provisioning for typical scenarios](#standard-cluster-provisioning). + +For a custom hardware resource recommendation, please contact us at [support@codacy.com](mailto:support@codacy.com). + +#### Codacy architecture + +You can look at Codacy separately as two groups of components: + +- The **"Platform"** contains the UI and other components important to treat and show results +- The **"Analysis"** is the swarm of workers that run **between one and four** linters simultaneously, depending on factors such as the number of files or the programming languages used in your projects + +![High-level Codacy architecture](./images/codacy-architecture.svg) + +Since all components are running on a cluster, you can increase the number of pod replicas in every deployment to give you more resilience and throughput, at a cost of increased resource usage. + +The following is a simplified overview of how to calculate resource allocation for the group of components "Platform" and "Analysis": + +| Group of components | vCPU | Memory | +| ------------------------------------------------------------- | --------------------------- | ------------------------------- | +| Platform
(1 pod replica per component) | 4 | 8 GB | +| Analysis
(1 Analysis Worker pod with **up to** 4 linters) | 5
(per Analysis Worker) | 10 GB
(per Analysis Worker) | + +#### Standard cluster provisioning \{#standard-cluster-provisioning\} + +As described in the section above, Codacy's architecture allows scaling the "Analysis" group of components, meaning that the resources needed for Codacy **depend mainly on the rate of commits** done by your team that Codacy will be analyzing. + +The resources recommended on the following table are based on our experience and are also the defaults in the [`values-production.yaml`](./values-files/values-production.yaml) file. You might need to adapt these defaults taking into account your use case. In particular, you should set the value of `global.workerManager.workers.config.dedicatedMax` to the maximum number of concurrent analysis depending on the available resources and number of replicas per component. + +:::note +For MicroK8s clusters we added an extra 1.5 vCPU and 1.5 GB memory to the "Platform" to account for the MicroK8s platform itself running on the same machine. +::: + +| Installation type | Pod replicas per component | Max. concurrent analysis | Platform resources | Analysis resources | **~ Total resources** | +| -------------------------------------------- | -------------------------- | ------------------------ | --------------------------- | ------------------------- | ----------------------------- | +| Kubernetes
Small Installation | 1 | 2 | 4 vCPUs
8 GB RAM | 10 vCPUs
20 GB RAM | **16 vCPUs
32 GB RAM** | +| Kubernetes
Medium Installation (default) | 2 | 4 | 8 vCPUs
16 GB RAM | 20 vCPUs
40 GB RAM | **32 vCPUs
64 GB RAM** | +| Kubernetes
Big Installation | 2+ | 10+ | 8+ vCPUs
16+ GB RAM | 50+ vCPUs
100+ GB RAM | **60+ vCPUs
110+ GB RAM** | +| MicroK8s
Minimum | 1 | 2 | 5.5 vCPUs
9.5 GB RAM | 10 vCPUs
20 GB RAM | **16 vCPUs
32 GB RAM** | +| MicroK8s
Recommended (default) | 1+ | 2 | 9.5+ vCPUs
17.5+ GB RAM | 10 vCPUs
20 GB RAM | **21+ vCPUs
40+ GB RAM** | + +The storage requirements recommended on the following table **depend mainly on the number of repositories** that Codacy will be analyzing and should be used as a guideline to determine your installation requirements. + +| Component | Bundled in the chart? | **Minimum recommended** | +| ---------- | ---------------------------- | ----------------------- | +| NFS | Yes | **200 GB** | +| RabbitMQ | Yes | **8 GB** | +| Minio | Yes | **20 GB** | +| PostgreSQL | No (external DB recommended) | **500 GB+** | + +:::note +Please note that due to the way Codacy works, a small number of pods will run in privileged mode with the `CAP_SYS_ADMIN` capability. This is required to allow the Worker pods to serve NFS shares to be mounted by the pods running the static code analysis tools. +::: + +## PostgreSQL server setup \{#postgresql-server-setup\} + +Codacy requires a database server to persist data that must satisfy the following requirements: + +- The infrastructure hosting the database server must be provisioned with the hardware requirements described below +- The DBMS server must be [PostgreSQL](https://www.postgresql.org/) **version 11.20** or **version 12.\*** (12.* recommended) +- The PostgreSQL server must be configured to accept connections from the cluster +- The Codacy databases and a dedicated user must be created using the instructions below + +:::important +Google, the developer of Kubernetes, [doesn't recommend running database servers on your cluster](https://cloud.google.com/blog/products/databases/to-run-or-not-to-run-a-database-on-kubernetes-what-to-consider). As such, consider using a managed solution like Amazon RDS or Google Cloud SQL, or running the PostgreSQL server on a dedicated virtual machine. + +We recommend that you use a managed solution to reduce maintenance and configuration costs of the PostgreSQL server. The main cloud providers all have this service that you can use, for example: + +- [Amazon RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/resources/) or [Amazon Aurora PostgreSQL-Compatible Edition](https://aws.amazon.com/rds/aurora/postgresql-features/) +- [Azure Database for PostgreSQL](https://docs.microsoft.com/en-us/azure/postgresql/) +- [Google Cloud SQL for PostgreSQL](https://cloud.google.com/sql/docs/postgres) +- [Digital Ocean Managed Databases](https://www.digitalocean.com/products/managed-databases-postgresql/) +::: + + + +### PostgreSQL hardware requirements + +The following are the minimum specifications recommended for provisioning the PostgreSQL server: + +| vCPUs | Memory | Storage | Max. concurrent connections | +| ----- | ------ | ------- | --------------------------- | +| 4 | 8 GB | 500 GB+ | 300 | + +### Preparing PostgreSQL for Codacy + +Before installing Codacy you must create a set of databases that will be used by Codacy to persist data. We also recommend that you create a dedicated user for Codacy, with access permissions only to the databases that are specific to Codacy: + +1. Connect to the PostgreSQL server as a database admin user. For example, using the `psql` command line client: + + ```bash + psql -U postgres -h + ``` + +2. Create the dedicated user that Codacy will use to connect to PostgreSQL. Make sure that you change the username and password to suit your security needs: + + ```sql + CREATE USER codacy WITH PASSWORD 'codacy'; + ALTER ROLE codacy WITH CREATEDB; + ``` + + Take note of the username and password you define, as you will require them later to configure the connection from Codacy to the PostgreSQL server. + +3. Make sure that you can connect to the PostgreSQL database using the newly created user. For example, using the `psql` command line client: + + ```bash + psql -U codacy -d postgres -h + ``` + +4. Create the databases required by Codacy: + + ```sql + CREATE DATABASE accounts WITH OWNER=codacy; + CREATE DATABASE analysis WITH OWNER=codacy; + CREATE DATABASE results WITH OWNER=codacy; + CREATE DATABASE metrics WITH OWNER=codacy; + CREATE DATABASE filestore WITH OWNER=codacy; + CREATE DATABASE jobs WITH OWNER=codacy; + CREATE DATABASE listener WITH OWNER=codacy; + CREATE DATABASE crow WITH OWNER=codacy; + ``` diff --git a/docusaurus/docs/chart/troubleshoot/extract-codacy-logs.sh b/docusaurus/docs/chart/troubleshoot/extract-codacy-logs.sh new file mode 100755 index 0000000000..adc12ac203 --- /dev/null +++ b/docusaurus/docs/chart/troubleshoot/extract-codacy-logs.sh @@ -0,0 +1,155 @@ +#!/usr/bin/env bash + +#### Helper functions #### + +usage() +{ + echo "Usage: $0 -n [-d ]" + echo "When using the -d flag, must be between 1 and 7" + echo "Example: '$0 -n codacy -d 3' would retrieve the last 3 days of logs from the 'codacy' namespace of the kubernetes cluster" + exit 3 +} + +date_days_ago() { + OS=$(uname) + if [[ "$OS" == "Darwin" ]]; then + date -v -$1\d "+%Y-%m-%d" + elif [[ "$OS" == "Linux" ]]; then + date -d '-$1 day' "+%Y-%m-%d" + else + echo "Unsupported operating system '$OS'" + exit 11 + fi +} + +cleanup() +{ + echo "Cleaning temporary files, exiting..." + if [ -d "$LOGS_DIR" ]; then + rm -r $LOGS_DIR &>/dev/null + fi +} +trap cleanup EXIT + +#### Log extraction script #### + +while getopts "n:d:" option; do + case ${option} in + n ) + NAMESPACE=${OPTARG} + ;; + d ) + if [ $OPTARG -le 0 ] || [ $OPTARG -ge 8 ]; then + usage + else + DAYS=$((${OPTARG}-1)) # Day 0 is today + fi + ;; + \? ) + usage + ;; + esac +done + +[ -z "$NAMESPACE" ] && usage + +CURRENT_DATE_TIME=$(date "+%Y%m%d-%H%M%S") +LOGS_DIR="$(mktemp -d)/codacy_logs_$CURRENT_DATE_TIME" + +echo "Starting log files extraction" + +# Check if zip is available +echo "Checking if zip is installed..." +if ! zip --version &>/dev/null; then + echo "zip not installed" + echo "Please install zip" + exit 4 +fi + + +# Check if kubectl or microk8s.kubectl is available +echo "Checking if kubectl is installed..." +KUBECTL=$(which kubectl || which microk8s.kubectl) +if [ $? -ne 0 ]; then + echo "kubectl not installed" + echo "Please install kubectl version specified in Codacy's documentation (see here - https://docs.codacy.com/chart/#2-installing-codacy) or the version used when installing your cluster" + echo "To install kubectl see https://kubernetes.io/docs/tasks/tools/install-kubectl/ (or https://microk8s.io/docs/ if you are running a microk8s kubernetes cluster)" + exit 4 +fi + +# Check current cluster context +echo "Checking access to kubernetes cluster..." +KUBE_CTX=$($KUBECTL config current-context) +if [ $? -ne 0 ]; then + echo "No kubernetes cluster context configured" + exit 5 +fi + +read -p "Is '$KUBE_CTX' the correct kubernetes cluster for log extraction? (yes/[no]): " ANSWER +if [[ ! "$ANSWER" =~ ^y(es)?$ ]]; then + echo "Please configure correctly your current kubernetes cluster" + exit 6 +fi + +# Create temporary directory for copying logs +if ! mkdir -p $LOGS_DIR; then + echo "Failed to create temporary directory $LOGS_DIR , for log files extraction" + exit 7 +fi + +# Get pod name for the logs pod +echo "Checking if the logs kubernetes pod exists..." +LOGS_POD_NAME=$($KUBECTL get pods -n $NAMESPACE -l app=minio -o jsonpath='{.items[*].metadata.name}') +if [ $? -ne 0 ]; then + echo "Failed to get the name of the logs kubernetes pod, for namespace $NAMESPACE" + echo "Are you sure you are in the right kubernetes cluster context?" + exit 8 +fi + +# Copy logs to local filesystem +echo "Extracting log files..." +if ! $KUBECTL cp $NAMESPACE/$LOGS_POD_NAME:/export/logs $LOGS_DIR; then + echo "Failed to extract log files from kubernetes pod $LOGS_POD_NAME to local directory $LOGS_DIR" + echo "Are you sure you are in the right kubernetes cluster context?" + exit 9 +fi + +# Get descriptions for all the pods +KUBECTL_DESCRIBE_FILE_NAME="describe_pods.txt" +echo "Getting kubectl describe for all codacy pods..." +if ! $KUBECTL describe pods -n $NAMESPACE > $LOGS_DIR/$KUBECTL_DESCRIBE_FILE_NAME; then + echo "Failed to save the codacy pods description to local directory $LOGS_DIR" + echo "Are you sure you are in the right kubernetes cluster context?" + exit 10 +fi + +echo "Compressing extracted log files..." +if [ -n "$DAYS" ]; then + + # Incrementally generate dates with the format specified below, for each day of logs, to make pattern matching easier + while [ $DAYS -ge 0 ]; do + LOGS_DATE=$(date_days_ago $DAYS) + + # Find all log files that match the pattern and add them to the ZIP archive (-9 is maximum, slowest, compression) + find $LOGS_DIR -iname $LOGS_DATE\* -o -iname $KUBECTL_DESCRIBE_FILE_NAME -type f | xargs -L 10 zip -ur9 codacy_logs_$CURRENT_DATE_TIME.zip + + # Incremental zipping might fail + if [ $? -ne 0 ]; then + echo "Failed to compress logs (located in $LOGS_DIR) to a ZIP file" + echo "If this step continues to fail, you can compress the files manually" + exit 11 + fi + + DAYS=$(($DAYS - 1)) + done + +else + # Compress logs in ZIP file (-9 is maximum, slowest, compression) + if ! zip -r9 codacy_logs_$CURRENT_DATE_TIME.zip $LOGS_DIR; then + echo "Failed to compress logs (located in $LOGS_DIR) to a ZIP file" + echo "If this step continues to fail, you can compress the files manually" + exit 11 + fi +fi + +echo "Log file extraction completed" diff --git a/docusaurus/docs/chart/troubleshoot/images/bitbucket-invalid-client-id.png b/docusaurus/docs/chart/troubleshoot/images/bitbucket-invalid-client-id.png new file mode 100644 index 0000000000..b998841926 Binary files /dev/null and b/docusaurus/docs/chart/troubleshoot/images/bitbucket-invalid-client-id.png differ diff --git a/docusaurus/docs/chart/troubleshoot/images/github-invalid-client-id.png b/docusaurus/docs/chart/troubleshoot/images/github-invalid-client-id.png new file mode 100644 index 0000000000..b5d6cd2b32 Binary files /dev/null and b/docusaurus/docs/chart/troubleshoot/images/github-invalid-client-id.png differ diff --git a/docusaurus/docs/chart/troubleshoot/images/gitlab-invalid-application-id.png b/docusaurus/docs/chart/troubleshoot/images/gitlab-invalid-application-id.png new file mode 100644 index 0000000000..eceb5cc794 Binary files /dev/null and b/docusaurus/docs/chart/troubleshoot/images/gitlab-invalid-application-id.png differ diff --git a/docusaurus/docs/chart/troubleshoot/images/gitlab-invalid-redirect-uri.png b/docusaurus/docs/chart/troubleshoot/images/gitlab-invalid-redirect-uri.png new file mode 100644 index 0000000000..d368f51141 Binary files /dev/null and b/docusaurus/docs/chart/troubleshoot/images/gitlab-invalid-redirect-uri.png differ diff --git a/docusaurus/docs/chart/troubleshoot/k8s-cheatsheet.mdx b/docusaurus/docs/chart/troubleshoot/k8s-cheatsheet.mdx new file mode 100644 index 0000000000..9b88fab5e3 --- /dev/null +++ b/docusaurus/docs/chart/troubleshoot/k8s-cheatsheet.mdx @@ -0,0 +1,140 @@ +--- +title: Kubernetes cheatsheet +description: Useful helm and kubectl commands to help troubleshoot your Codacy Self-hosted instance. +--- + +## Debugging using events + +:::caution +Always check the pods and deployment versions in the namespace +to make sure you aren't debugging an issue in a version that's not the one you would expect +::: + +Events are a great way to understand what's going on under the hood in a Kubernetes cluster. +By looking at them you can see if probes are failing, and other important signals from your cluster. + +Get events for the whole namespace: + +```bash +kubectl -n codacy get events --sort-by=.metadata.creationTimestamp +``` + +Get error events: + +```bash +kubectl -n codacy get events --sort-by=.metadata.creationTimestamp --field-selector type=Error +``` + +Get warning events: + +```bash +kubectl -n codacy get events --sort-by=.metadata.creationTimestamp --field-selector type=Warning +``` + +Get events from a specific pod: + +```bash +kubectl -n codacy get events --sort-by=.metadata.creationTimestamp --field-selector involvedObject.name= +``` + +## Helm + +Check all the previous releases in your namespace: + +```bash +helm -n codacy history codacy +``` + +Rollback to a specific revision: + +```bash +helm -n codacy rollback codacy +``` + +## Edit configmap + +```bash +kubectl get configmaps +``` + +**and** + +```bash +kubectl edit configmap +``` + +## Restart deployment of daemonset + +### daemonsets + +```bash +kubectl get daemonsets +``` + +**and** + +```bash +kubectl rollout restart daemonset/ +``` + +### deployment + +```bash +kubectl get deployment +``` + +**and** + +```bash +kubectl rollout restart deployment/ +``` + +**and** + +```bash +kubectl rollout status deployment/ -w +``` + +## Read logs + +### daemonset with multiple containers + +```bash +kubectl logs daemonset/ -f +``` + +### service + +```bash +kubectl get svc +``` + +**and** + +```bash +kubectl logs -l $(kubectl get svc/ -o=json | jq ".spec.selector" | jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d') -f +``` + +## Open shell inside container + +```bash +kubectl exec -it daemonset/ -c sh +``` + +**or** + +```bash +kubectl exec -it deployment/ sh +``` + +## MicroK8s + +### Session Manager SSH + +When using AWS Session Manager, to connect to the instance where you installed microk8s, +since the CLI is very limited you will benefit from using these aliases: + +```bash +alias kubectl='sudo microk8s.kubectl -n ' +alias helm='sudo helm' +``` diff --git a/docusaurus/docs/chart/troubleshoot/logs-collect.mdx b/docusaurus/docs/chart/troubleshoot/logs-collect.mdx new file mode 100644 index 0000000000..b3971c4920 --- /dev/null +++ b/docusaurus/docs/chart/troubleshoot/logs-collect.mdx @@ -0,0 +1,32 @@ +--- +title: Collecting logs for Support +description: To help troubleshoot issues, obtain the logs from your Codacy Self-hosted instance and send them to Codacy's Support. +--- + + +To help troubleshoot issues, obtain the logs from your Codacy Self-hosted instance and send them to Codacy's Support: + +1. Run the following command on a machine with network access to the Codacy cluster, replacing `` with the namespace in which Codacy was installed: + + ```bash + bash <(curl -fsSL https://raw.githubusercontent.com/codacy/chart/master/docs/troubleshoot/extract-codacy-logs.sh) \ + -n + ``` + + This will download the logs of the last 7 days as an archive file with the name `codacy_logs_.zip`. + + !!! tip + You can also download the script [extract-codacy-logs.sh](./extract-codacy-logs.sh) to run it manually. + +2. Send the compressed logs to Codacy's support team at [support@codacy.com](mailto:support@codacy.com) for analysis. + + :::note + If the file is too big, please upload the file to either a cloud storage service such as [Google Drive](https://www.google.com/drive/) or to a file transfer service such as [WeTransfer](http://www.wetransfer.com/) and send us the link to the file instead. + + Alternatively, to reduce the size of the compressed archive file, retrieve logs for a smaller number of days by replacing `` with a number between 1 and 7: + + ```bash + bash <(curl -fsSL https://raw.githubusercontent.com/codacy/chart/master/docs/troubleshoot/extract-codacy-logs.sh) \ + -n -d + ``` + ::: \ No newline at end of file diff --git a/docusaurus/docs/chart/troubleshoot/troubleshoot.mdx b/docusaurus/docs/chart/troubleshoot/troubleshoot.mdx new file mode 100644 index 0000000000..1053da8232 --- /dev/null +++ b/docusaurus/docs/chart/troubleshoot/troubleshoot.mdx @@ -0,0 +1,150 @@ +--- +title: Troubleshooting Codacy Self-hosted +--- + +import SelfHostedVersion from '../assets/includes/self-hosted-version.mdx' + +This page includes information to help you troubleshoot issues that you may come across while installing, configuring, and operating Codacy Self-hosted. + +If the information provided on this page isn't enough to solve your issue, contact [support@codacy.com](mailto:support@codacy.com) providing: + +- The description of the issue +- All the information that you were able to obtain while following these troubleshooting instructions +- The [collected logs](logs-collect.mdx) of your Codacy instance +- The version of your Codacy instance + + + + +## Git provider integrations + +The following sections help you troubleshoot the integration of Codacy with your Git provider. + +### GitHub Cloud and GitHub Enterprise authentication \{#github\} + +#### 404 error + +While trying to authenticate on GitHub you get the following error message: + +![Invalid client id](images/github-invalid-client-id.png) + +This might mean that there is a mismatch in the Client ID that Codacy is using to authenticate on GitHub. + +To solve this issue: + +1. Make sure that the value of `clientId` in your `values-production.yaml` file is the same as the Client ID of the [GitHub App that you created](../configuration/integrations/github-app-create.mdx) +2. If the values were different, update your configuration and re-execute the `helm upgrade` command as described for [GitHub Cloud](../configuration/integrations/github-cloud.mdx) or [GitHub Enterprise](../configuration/integrations/github-enterprise.mdx) + +If the error persists: + +1. Take note of the parameter `client_id` in the URL of the GitHub error page (for example, `Iv1.0000000000000000`) +2. Check if the value of the parameter matches the value of the Client ID of your GitHub App + +### GitLab Cloud and GitLab Enterprise authentication \{#gitlab\} + +#### Invalid redirect URI + +While trying to authenticate on GitLab you get the following error message: + +![Invalid redirect URI](images/gitlab-invalid-redirect-uri.png) + +This might mean that the redirect URIs are not correct in the GitLab application that Codacy is using to authenticate on GitLab. + +To solve this issue: + +1. Open the GitLab application that you created on [GitLab Cloud](../configuration/integrations/gitlab-cloud.mdx#create-application) or [GitLab Enterprise](../configuration/integrations/gitlab-enterprise.mdx#create-application) +2. Make sure that all the redirect URIs have the correct protocol for the Codacy instance endpoints, either `http://` or `https://` +3. Make sure that all the redirect URIs have the full path with the correct case, since the field is case-sensitive + +If the error persists: + +1. Take note of the parameter `redirect_uri` in the URL of the GitLab error page (for example, `https%3A%2F%2Fcodacy.example.com%2Flogin%2FGitLab` or `https%3A%2F%2Fcodacy.example.com%2Flogin%2FGitLabEnterprise`) +2. Decode the value of the parameter using a tool such as [urldecoder.com](https://www.urldecoder.org/) (for example, `https://codacy.example.com/login/GitLab` or `https://codacy.example.com/login/GitLabEnterprise`) +3. Check if the decoded value matches one of the redirect URIs of your GitLab application + +#### Unknown client + +While trying to authenticate on GitLab you get the following error message: + +![Invalid application id](images/gitlab-invalid-application-id.png) + +This might mean that there is a mismatch in the Application ID that Codacy is using to authenticate on GitLab. + +To solve this issue: + +1. Make sure that the value of `clientId` in your `values-production.yaml` file is the same as the Application ID of the [GitLab Cloud](../configuration/integrations/gitlab-cloud.mdx#create-application) or [GitLab Enterprise](../configuration/integrations/gitlab-enterprise.mdx#create-application) application that you created +2. If the values were different, update your configuration and re-execute the `helm upgrade` command as described for [GitLab Cloud](../configuration/integrations/gitlab-cloud.mdx#configure) or [GitLab Enterprise](../configuration/integrations/gitlab-enterprise.mdx#configure) + +If the error persists: + +1. Take note of the parameter `client_id` in the URL of the GitLab error page (for example, `cca35a2a1f9b9b516ac927d82947bd5149b0e57e922c9e5564ac092ea16a3ccd`) +2. Check if the value of the parameter matches the value of the Application ID of your GitLab application + +### Bitbucket Cloud authentication \{#bitbucket-cloud\} + +#### Invalid client_id + +While trying to authenticate on Bitbucket Cloud you get the following error message: + +![Invalid client_id](images/bitbucket-invalid-client-id.png) + +This might mean that there is a mismatch in the OAuth consumer Client ID that Codacy is using to authenticate on Bitbucket Cloud. + +To solve this issue: + +1. Make sure that the value of `key` in your `values-production.yaml` file is the same as the Key of the [Bitbucket OAuth consumer that you created](../configuration/integrations/bitbucket-cloud.mdx#create-oauth) +2. If the values were different, update your configuration and re-execute the `helm upgrade` command as described for [Bitbucket Cloud](../configuration/integrations/bitbucket-cloud.mdx#configure) + +If the error persists: + +1. Take note of the parameter `client_id` in the URL of the Bitbucket Cloud error page (for example, `r8QJDkkxj8unYfg4Bd`) +2. Check if the value of the parameter matches the value of the Client ID of your Bitbucket OAuth consumer + +## Accessing the RabbitMQ dashboard + +We use RabbitMQ for the internal message queue between our components. + +If you need to access the RabbitMQ dashboard: + +1. Create a `port-forward` from the `rabbitmq` pod to your local machine, replacing `` with the namespace in which Codacy was installed: + + ```bash + kubectl port-forward codacy-rabbitmq-ha-0 15672:15672 --namespace= + ``` + + !!! important + **If you're using MicroK8s** use `microk8s.kubectl` instead of `kubectl`. + +2. Access the RabbitMQ dashboard on the address `localhost:15672`, and log in with the configured RabbitMQ credentials. + + The default RabbitMQ credentials are the following: + + - **Username:** `rabbitmq-codacy` + - **Password:** `rabbitmq-codacy` + +## Missing new tools + +If the **Code patterns** page of your repositories doesn't list a new tool that was included in a new Codacy version, force the list of available tools to refresh by running the following command on any `codacy-engine-*` pod: + +```bash +curl -X POST localhost:9000/api/v1/engine/initialize +``` + +## Upgrade failed: cannot patch "codacy-minio" + +If you download and use an updated `values-production.yaml` file while upgrading to [Codacy Self-hosted 9.0.0](https://docs.codacy.com/release-notes/self-hosted/self-hosted-v9.0.0/), you'll get the following error: + +> Error: UPGRADE FAILED: cannot patch "codacy-minio" with kind PersistentVolumeClaim: persistentvolumeclaims "codacy-minio" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize + +This happens because [we updated the MinIO PVC size](https://github.com/codacy/chart/commit/40a158f8b6f62a6f90387060b86fe1dd8d008ed5). As a workaround, you can either: + +- Reset the PVC size back to the original value of 20Gi on your `values.yaml` file: + + ```yaml + minio: + fullnameOverride: codacy-minio + persistence: + size: 20Gi + ``` + +- [Uninstall your current version of Codacy](../maintenance/uninstall.mdx) and reinstall Codacy Self-hosted 9.0.0 directly. Your data won't be impacted by the uninstall since it's stored on the database. diff --git a/docusaurus/docs/chart/values-files/issuer-letsencrypt.yaml b/docusaurus/docs/chart/values-files/issuer-letsencrypt.yaml new file mode 100644 index 0000000000..a60885ff93 --- /dev/null +++ b/docusaurus/docs/chart/values-files/issuer-letsencrypt.yaml @@ -0,0 +1,15 @@ +apiVersion: cert-manager.io/v1alpha2 +kind: Issuer +metadata: + name: letsencrypt-codacy + namespace: codacy +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: <--- youremail@yourdomain.com ---> + privateKeySecretRef: + name: letsencrypt + solvers: + - http01: + ingress: + class: nginx diff --git a/docusaurus/docs/chart/values-files/values-cert-manager.yaml b/docusaurus/docs/chart/values-files/values-cert-manager.yaml new file mode 100644 index 0000000000..7b172eb1c5 --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-cert-manager.yaml @@ -0,0 +1,9 @@ +webhook: + enabled: true +ingressShim: + defaultIssuerName: letsencrypt-codacy + defaultIssuerKind: Issuer + defaultIssuerGroup: cert-manager.io +global: + leaderElection: + namespace: codacy diff --git a/docusaurus/docs/chart/values-files/values-loki.yaml b/docusaurus/docs/chart/values-files/values-loki.yaml new file mode 100644 index 0000000000..1412bf0b2d --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-loki.yaml @@ -0,0 +1,26 @@ +resources: + limits: + cpu: 1 + memory: 1000Mi + requests: + cpu: 500m + memory: 500Mi +config: + limits_config: + cardinality_limit: 200000 + ingestion_rate_mb: 15 + ingestion_burst_size_mb: 20 +serviceMonitor: + enabled: true +persistence: + enabled: true + size: 100Gi # adjust persistence volume size if needed + #storageClassName: <--- storage class ---> +table_manager: + retention_deletes_enabled: true + retention_period: 72h +rbac: + pspEnabled: false +grafana: + datasources: + enabled: true \ No newline at end of file diff --git a/docusaurus/docs/chart/values-files/values-microk8s.yaml b/docusaurus/docs/chart/values-files/values-microk8s.yaml new file mode 120000 index 0000000000..ed0f13efe2 --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-microk8s.yaml @@ -0,0 +1 @@ +../../../../submodules/chart/codacy/values-microk8s.yaml \ No newline at end of file diff --git a/docusaurus/docs/chart/values-files/values-nginx.yaml b/docusaurus/docs/chart/values-files/values-nginx.yaml new file mode 100644 index 0000000000..5a9c73193c --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-nginx.yaml @@ -0,0 +1,30 @@ +controller: + ingressClass: nginx + publishService: + enabled: true + service: + ## Use this annotation if you want private load balancers on AWS + #annotations: + # service.beta.kubernetes.io/aws-load-balancer-internal: "true" + # + ## Use this setting do restrict the load balancer source ip ranges. + #loadBalancerSourceRanges: + # - 10.0.0.0/16 # set this for the desired CIDR + # + clusterIP: "-" + defaultBackend: + clusterIP: "-" + enableAnnotationValidations: true + + # resources used by the nginx controller + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 100m + memory: 300Mi + + config: + # Hides the http response headers showing the explicit version of nginx + server-tokens: "false" diff --git a/docusaurus/docs/chart/values-files/values-production.yaml b/docusaurus/docs/chart/values-files/values-production.yaml new file mode 120000 index 0000000000..9e861c774c --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-production.yaml @@ -0,0 +1 @@ +../../../../submodules/chart/codacy/values-production.yaml \ No newline at end of file diff --git a/docusaurus/docs/chart/values-files/values-prometheus-operator.yaml b/docusaurus/docs/chart/values-files/values-prometheus-operator.yaml new file mode 100644 index 0000000000..69909c26d5 --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-prometheus-operator.yaml @@ -0,0 +1,77 @@ +grafana: + enabled: true + adminPassword: <--- grafana-admin-password ---> # password for the `admin` user. You can generate one using, for instance, `openssl rand -base64 24 | tr -dc 'a-zA-Z0-9'` + ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: nginx + hosts: + - <--- grafana.codacy.example.com ---> # Codacy grafana DNS hostname. You'll need to add a record for this domain pointing to your ingress +## +## If using TLS uncomment this section and create the required secret. +## For instance, if you'll be using a self-signed certificate this can be done running: +## +## openssl req -x509 -nodes -days 10000 -newkey rsa:2048 -keyout grafana-tls.key -out grafana-tls.crt -subj "/CN=YOUR_CODACY_GRAFANA_DNS_HOSTNAME" +## kubectl create secret tls grafana-ingress-tls-secret --namespace monitoring --key grafana-tls.key --cert grafana-tls.crt +## +## For further information please see https://kubernetes.io/docs/tasks/administer-cluster/certificates/ +## +# tls: +# - secretName: grafana-ingress-tls-secret +# hosts: +# - <--- grafana.codacy.example.com ---> # this must match the url used above + + + sidecar: + dashboards: + searchNamespace: ALL + datasources: + defaultDatasourceEnabled: false + additionalDataSources: + - name: Loki + type: loki + url: http://loki:3100 + version: 1 + orgId: 1 + access: proxy + basicAuth: false + editable: true + jsonData: + tlsSkipVerify: true + - name: Prometheus + type: prometheus + url: http://monitoring-kube-prometheus-prometheus:9090 + version: 1 + orgId: 1 + access: proxy + basicAuth: false + editable: true + jsonData: + tlsSkipVerify: true + +prometheusOperator: + createCustomResource: false + tlsProxy: + enabled: false + admissionWebhooks: + enabled: false + patch: + enabled: false + tlsProxy: + enabled: false + +prometheus: + ingressPerReplica: + tlsSecretPerReplica: + enabled: false + thanos: + service: + enabled: false + service: + sessionAffinity: "ClientIP" + prometheusSpec: + replicas: 1 + serviceMonitorSelectorNilUsesHelmValues: false + walCompression: true + ruleSelectorNilUsesHelmValues: false + ruleSelector: {} diff --git a/docusaurus/docs/chart/values-files/values-promtail.yaml b/docusaurus/docs/chart/values-files/values-promtail.yaml new file mode 100644 index 0000000000..eec672a30e --- /dev/null +++ b/docusaurus/docs/chart/values-files/values-promtail.yaml @@ -0,0 +1,14 @@ +loki: + serviceName: loki + +config: + client: + batchwait: 1s + batchsize: 10240 + timeout: 20s + backoff_config: + minbackoff: 2s + maxbackoff: 20s + maxretries: 5 +rbac: + pspEnabled: false diff --git a/docusaurus/docs/codacy-ai/codacy-ai.mdx b/docusaurus/docs/codacy-ai/codacy-ai.mdx index b5937e9ce2..69b940ea50 100644 --- a/docusaurus/docs/codacy-ai/codacy-ai.mdx +++ b/docusaurus/docs/codacy-ai/codacy-ai.mdx @@ -18,7 +18,7 @@ _This feature leverages OpenAI models, and is strictly opt-in: it will only run AI-enhanced comments are optional, machine-generated suggestions that appear directly in pull requests and review threads. They use Codacy's AI to provide concise issue summaries, remediation suggestions, and links to relevant documentation — helping reviewers and authors quickly understand and fix problems. -More details about [AI-enhanced comments here →](../repositories-configure/integrations/github-integration.md#ai-enhanced-comments). +More details about [AI-enhanced comments here →](../repositories-configure/integrations/github-integration.mdx#ai-enhanced-comments). **How to turn it on** @@ -71,7 +71,7 @@ _This feature leverages Google Gemini models, and is strictly opt-in: it will on The AI Reviewer combines the reliability of deterministic, rule-based static code analysis with the power of AI. It draws in the necessary context from source code and PR metadata to ensure the business intent matches the technical outcome, and can catch logic gaps that conventional scanners (and human reviewers) often miss. -More details about [AI Reviewer here →](../repositories-configure/integrations/github-integration.md#ai-reviewer). +More details about [AI Reviewer here →](../repositories-configure/integrations/github-integration.mdx#ai-reviewer). **How to turn it on** diff --git a/docusaurus/docs/codacy-api/api-tokens.mdx b/docusaurus/docs/codacy-api/api-tokens.mdx index 9de9395a7d..8b53cdb35d 100644 --- a/docusaurus/docs/codacy-api/api-tokens.mdx +++ b/docusaurus/docs/codacy-api/api-tokens.mdx @@ -7,25 +7,25 @@ import ApiTokenWarning from './../_includes/ApiTokenWarning.mdx' Codacy provides **account** and **repository**-level API tokens that allow you to: -- [Upload coverage data](../coverage-reporter/index.md) to Codacy -- Upload to Codacy the results of [running client-side analysis tools](../repositories-configure/local-analysis/client-side-tools.md) -- [Authenticate when using the Codacy API](using-the-codacy-api.md#authenticating-requests) +- [Upload coverage data](../coverage-reporter/index.mdx) to Codacy +- Upload to Codacy the results of [running client-side analysis tools](../repositories-configure/local-analysis/client-side-tools) +- [Authenticate when using the Codacy API](using-the-codacy-api#authenticating-requests) The sections below provide details about the two types of API tokens and instructions on how to generate and revoke them. -## Generating and revoking account API tokens ||account-api-tokens|| +## Generating and revoking account API tokens \{#account-api-tokens\} -Account API tokens are defined at the **Codacy user account level**. Each account API token authorizes access to the same organizations, repositories, and operations as the [roles and permissions of the owner of the account](../organizations/roles-and-permissions-for-organizations.md). +Account API tokens are defined at the **Codacy user account level**. Each account API token authorizes access to the same organizations, repositories, and operations as the [roles and permissions of the owner of the account](../organizations/roles-and-permissions-for-organizations). :::caution -**If you're using an account API token to upload coverage** be sure to [check the roles](../organizations/roles-and-permissions-for-organizations.md) that your Git provider account must have to authorize uploading coverage to Codacy. +**If you're using an account API token to upload coverage** be sure to [check the roles](../organizations/roles-and-permissions-for-organizations) that your Git provider account must have to authorize uploading coverage to Codacy. Use a dedicated service account to integrate Codacy with your repositories. This prevents disruption of service if the user who created an account API token loses access to the repositories, which may happen when a user leaves the team or the organization. ::: -You can create new account API tokens programmatically [using the Codacy API](examples/creating-repository-api-tokens-programmatically.md) or using the Codacy UI: +You can create new account API tokens programmatically [using the Codacy API](examples/creating-repository-api-tokens-programmatically) or using the Codacy UI: 1. Open your account, tab **Access management**. @@ -47,11 +47,11 @@ When you have tokens created, you can view them inside the tokens table. By hove To delete an account API token, click the trash icon in the Actions column of the table. After this, all applications or services using that token to access the Codacy API will fail to authenticate and will receive the reply `{"error":"not found"}`. -## Generating and revoking repository API tokens ||repository-api-tokens"|| +## Generating and revoking repository API tokens \{#repository-api-tokens\} Repository API tokens are defined on **individual repositories**. Each repository API token only authorizes access to the corresponding repository. -You can create new repository API tokens programmatically [using the Codacy API](examples/creating-repository-api-tokens-programmatically.md) or using the Codacy UI: +You can create new repository API tokens programmatically [using the Codacy API](examples/creating-repository-api-tokens-programmatically) or using the Codacy UI: 1. Open your repository **Settings**, tab **Integrations**. @@ -66,6 +66,6 @@ To revoke a repository API token, click the **X** next to the token. After this, ## See also -- [Adding coverage to your repository](../coverage-reporter/index.md) -- [Client-side tools](../repositories-configure/local-analysis/client-side-tools.md) -- [Creating repository API tokens programmatically](examples/creating-repository-api-tokens-programmatically.md) +- [Adding coverage to your repository](../coverage-reporter/index.mdx) +- [Client-side tools](../repositories-configure/local-analysis/client-side-tools) +- [Creating repository API tokens programmatically](examples/creating-repository-api-tokens-programmatically) diff --git a/docusaurus/docs/codacy-api/examples/adding-people-to-codacy-programmatically.mdx b/docusaurus/docs/codacy-api/examples/adding-people-to-codacy-programmatically.mdx index 30bef7b578..4805e11dc8 100644 --- a/docusaurus/docs/codacy-api/examples/adding-people-to-codacy-programmatically.mdx +++ b/docusaurus/docs/codacy-api/examples/adding-people-to-codacy-programmatically.mdx @@ -16,7 +16,7 @@ curl -X POST https://app.codacy.com/api/v3/organizations///`. 1. For each repository, calls the endpoint [addRepository](https://app.codacy.com/api/api-docs#addrepository) to add a new repository specifying `gh` as the Git provider and the value of `full_name` as the full path of the repository. 1. Checks the HTTP status code obtained in the response and performs basic error handling. 1. Pauses a few seconds between requests to the Codacy API to avoid rate limiting. + ```bash #!/bin/bash diff --git a/docusaurus/docs/codacy-api/examples/creating-repository-api-tokens-programmatically.mdx b/docusaurus/docs/codacy-api/examples/creating-repository-api-tokens-programmatically.mdx index bbcaf599a3..ac8dd62582 100644 --- a/docusaurus/docs/codacy-api/examples/creating-repository-api-tokens-programmatically.mdx +++ b/docusaurus/docs/codacy-api/examples/creating-repository-api-tokens-programmatically.mdx @@ -5,9 +5,9 @@ description: Example of how to create new repository API tokens for all reposito import ApiExamplePaginationImportant from '../../_includes/ApiExamplePaginationImportant.mdx' -To create new [repository API tokens](../api-tokens.md) for your Codacy repositories programmatically, use the Codacy API endpoint [createRepositoryApiToken](https://app.codacy.com/api/api-docs#createrepositoryapitoken). You can also list all repository API tokens for a repository using the endpoint [listRepositoryApiTokens](https://api.codacy.com/api/api-docs#listrepositoryapitokens). +To create new [repository API tokens](../api-tokens) for your Codacy repositories programmatically, use the Codacy API endpoint [createRepositoryApiToken](https://app.codacy.com/api/api-docs#createrepositoryapitoken). You can also list all repository API tokens for a repository using the endpoint [listRepositoryApiTokens](https://api.codacy.com/api/api-docs#listrepositoryapitokens). -For example, if you're [setting up coverage](../../coverage-reporter/index.md) for all your repositories and prefer not to use a single account API token that grants the same permissions as an administrator, you need to create an individual repository API token for each repository. +For example, if you're [setting up coverage](../../coverage-reporter/index.mdx) for all your repositories and prefer not to use a single account API token that grants the same permissions as an administrator, you need to create an individual repository API token for each repository. ## Example: Creating a repository API token for a single repository @@ -15,7 +15,7 @@ This example creates a new repository API token for a repository and outputs the The example script: -1. Defines the [account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API, the Git provider, the organization name, and the repository name passed as an argument to the script. +1. Defines the [account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API, the Git provider, the organization name, and the repository name passed as an argument to the script. 1. Calls the endpoint [createRepositoryApiToken](https://app.codacy.com/api/api-docs#createrepositoryapitoken) to create a new repository API token and uses [jq](https://github.com/stedolan/jq) to obtain only the created token string. ```bash @@ -44,7 +44,7 @@ This example creates new repository API tokens for all the repositories in an or The example script: -1. Defines the [account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API, the Git provider, and the organization name. +1. Defines the [account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API, the Git provider, and the organization name. 1. Calls the endpoint [listOrganizationRepositories](https://api.codacy.com/api/api-docs#listorganizationrepositories) to retrieve the list of repositories in the organization. 1. Uses [jq](https://github.com/stedolan/jq) to select only the name of the repositories. 1. Asks for confirmation from the user before making any changes. @@ -95,7 +95,7 @@ This example lists all repository API tokens created for a repository. The example script: -1. Defines the [account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API, the Git provider, the organization name, and the repository name passed as an argument to the script. +1. Defines the [account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API, the Git provider, the organization name, and the repository name passed as an argument to the script. 1. Calls the endpoint [listRepositoryApiTokens](https://api.codacy.com/api/api-docs#listrepositoryapitokens) to list the repository API tokens available on the repository and uses [jq](https://github.com/stedolan/jq) to obtain only the token strings, or exit with a non-zero status if the repository doesn't have any repository API tokens created yet. ```bash diff --git a/docusaurus/docs/codacy-api/examples/identifying-commits-without-coverage-data.mdx b/docusaurus/docs/codacy-api/examples/identifying-commits-without-coverage-data.mdx index 069f41483a..ac25bc1143 100644 --- a/docusaurus/docs/codacy-api/examples/identifying-commits-without-coverage-data.mdx +++ b/docusaurus/docs/codacy-api/examples/identifying-commits-without-coverage-data.mdx @@ -24,7 +24,7 @@ This example checks whether the open pull requests in a repository have received The example script: -1. Defines the [account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API, the Git provider, the organization name, and the repository name passed as an argument to the script. +1. Defines the [account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API, the Git provider, the organization name, and the repository name passed as an argument to the script. 1. Calls the Codacy API endpoint [listRepositoryPullRequests](https://api.codacy.com/api/api-docs#listrepositorypullrequests) to retrieve the list of open pull requests on the repository. 1. Uses [jq](https://github.com/stedolan/jq) to select only the numbers that identify the pull requests on the Git provider. 1. For each pull request, outputs the pull request number and calls the Codacy API endpoint [getPullRequestCoverageReports](https://api.codacy.com/api/api-docs#getpullrequestcoveragereports) to obtain the information about the coverage data received for the head and common ancestor commits of the pull request. @@ -58,7 +58,7 @@ Example usage and output, where: - The second commit listed for each pull request is the **common ancestor commit** of the pull request branch :::note -If you find commits where the coverage status is different from `Processed`, [follow these troubleshooting instructions](../../coverage-reporter/index.md#validating-coverage) to validate that your coverage setup is working correctly. +If you find commits where the coverage status is different from `Processed`, [follow these troubleshooting instructions](../../coverage-reporter/index.mdx#validating-coverage) to validate that your coverage setup is working correctly. ::: ```bash @@ -78,4 +78,4 @@ Coverage for 1a64ea8885717e7b9874c9f3702806ec96b00276 is null ## See also -- [Adding coverage to your repository](../../coverage-reporter/index.md) +- [Adding coverage to your repository](../../coverage-reporter/index.mdx) diff --git a/docusaurus/docs/codacy-api/examples/obtaining-code-quality-metrics-for-files.mdx b/docusaurus/docs/codacy-api/examples/obtaining-code-quality-metrics-for-files.mdx index 67909e8e85..0215403aeb 100644 --- a/docusaurus/docs/codacy-api/examples/obtaining-code-quality-metrics-for-files.mdx +++ b/docusaurus/docs/codacy-api/examples/obtaining-code-quality-metrics-for-files.mdx @@ -16,7 +16,7 @@ This example exports the grade, total issues, complexity, coverage, and duplicat The example script: -1. Defines the [account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API. +1. Defines the [account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API. 1. Calls the endpoint [listFiles](https://app.codacy.com/api/api-docs#listfiles) to retrieve the code quality metrics, filtering the results by files that include `src/router/` in the path. 1. Uses [jq](https://github.com/stedolan/jq) to select only the necessary data fields and convert the results to the CSV format. @@ -45,5 +45,5 @@ Example output: ## See also -- [Which metrics does Codacy calculate?](../../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Files page](../../repositories/files.md) +- [Which metrics does Codacy calculate?](../../faq/code-analysis/which-metrics-does-codacy-calculate) +- [Files page](../../repositories/files) diff --git a/docusaurus/docs/codacy-api/examples/obtaining-current-issues-in-repositories.mdx b/docusaurus/docs/codacy-api/examples/obtaining-current-issues-in-repositories.mdx index a77ccf6fd5..da17922eb8 100644 --- a/docusaurus/docs/codacy-api/examples/obtaining-current-issues-in-repositories.mdx +++ b/docusaurus/docs/codacy-api/examples/obtaining-current-issues-in-repositories.mdx @@ -15,7 +15,7 @@ This example exports the pattern ID, issue level, file path, and timestamp for a The example script: -1. Defines the [account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API. +1. Defines the [account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API. 1. Calls the endpoint [searchRepositoryIssues](https://app.codacy.com/api/api-docs#searchrepositoryissues) to retrieve information about the issues, filtering the results by security issues with the relevant severity levels. 1. Uses [jq](https://github.com/stedolan/jq) to select only the necessary data fields and convert the results to the CSV format. @@ -45,5 +45,5 @@ Example output: ## See also -- [Which metrics does Codacy calculate?](../../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Issues page](../../repositories/issues.md) +- [Which metrics does Codacy calculate?](../../faq/code-analysis/which-metrics-does-codacy-calculate) +- [Issues page](../../repositories/issues) diff --git a/docusaurus/docs/codacy-api/examples/triggering-dast-scans.mdx b/docusaurus/docs/codacy-api/examples/triggering-dast-scans.mdx index 87903992e0..a5e2cf055a 100644 --- a/docusaurus/docs/codacy-api/examples/triggering-dast-scans.mdx +++ b/docusaurus/docs/codacy-api/examples/triggering-dast-scans.mdx @@ -8,7 +8,7 @@ Thanks to the new app scanning capabilities available on the Security and risk m :::caution **App scanning is a business feature.** If you are a Codacy Pro customer, contact our customer success team to access a short trial. -**Check your [permissions](../../organizations/roles-and-permissions-for-organizations.md).** Only git provider admins and organization managers will be able to create new targets and trigger scans (in app and via the API). +**Check your [permissions](../../organizations/roles-and-permissions-for-organizations).** Only git provider admins and organization managers will be able to create new targets and trigger scans (in app and via the API). ::: @@ -52,12 +52,12 @@ Replace the placeholders with your own values: | Field | Required | Description | |-------|----------|-------------| -| **API_KEY** | true | [Account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API | +| **API_KEY** | true | [Account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API | | **GIT_PROVIDER** | true | Git provider hosting of the organization, using one of the values in the table below.
**Options:** `gh` (GitHub Cloud), `ghe`(GitHub Enterprise), `gl` (Gitlab Cloud), `gle` (Gitlab Enterprise), `bb` (Bitbucket Cloud), `bbe` (Bitbucket Server) | | **ORGANIZATION** | true | Name of the organization on the Git provider. You must have admin permissions over the organization on the Git provider.
For example, `codacy` | | **TARGET_URL** | true | URL of the Web app or API that will be scanned.
Must start with `http://` or `https://`
For example, `https://api.codacy.com/v1`| | **TARGET_TYPE** | false | Type of target to be scanned
**Options:** `webapp` (default), `openapi` or `graphql`| -| **API_DEFINITION_URL** | false * | The URL to a publicly accessible OpenAPI specification.
*** Required for OpenAPI targets**| +| **API_DEFINITION_URL** | false * | The URL to a publicly accessible OpenAPI specification.
* **Required for OpenAPI targets**| | **HEADER_NAME** | false | Name of the authentication header.
For example, `Authentication`| | **HEADER_VALUE** | false | Value of the authentication header.
For example, a token or API key| @@ -79,12 +79,12 @@ curl -X POST https://app.codacy.com/api/v3/organizations/{GIT_PROVIDER}/{ORGANIZ Replace the placeholders with your own values: -- **API_KEY:** [Account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API. +- **API_KEY:** [Account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API. - **GIT_PROVIDER:** Git provider hosting of the organization (check the table on the example above). For example, `gh` for GitHub Cloud. - **ORGANIZATION:** Name of the organization on the Git provider. For example, `codacy`. You must have admin permissions over the organization on the Git provider. -- **DAST_TARGET_ID:** Identifier of a DAST target to analyze (obtained in the [previous section](./triggering-dast-scans.md#creating-targets). For example, `457`. You must have admin permissions over the organization on the Git provider. +- **DAST_TARGET_ID:** Identifier of a DAST target to analyze (obtained in the [previous section](./triggering-dast-scans.mdx#creating-targets). For example, `457`. You must have admin permissions over the organization on the Git provider. -Scans occur asynchronously. To monitor an ongoing scan you can use the [target management page in Codacy](../../organizations/managing-security-and-risk.md#app-scanning). Once completed, you can access all scan results by navigating to the **Security dashboard**, selecting the **Findings tab** and filtering by **Scan types > DAST/App scanning**, or by clicking on a configured target to expand all of that target's results. +Scans occur asynchronously. To monitor an ongoing scan you can use the [target management page in Codacy](../../organizations/managing-security-and-risk.mdx#app-scanning). Once completed, you can access all scan results by navigating to the **Security dashboard**, selecting the **Findings tab** and filtering by **Scan types > DAST/App scanning**, or by clicking on a configured target to expand all of that target's results. Additionaly, you can use the `SearchSRMItems` endpoint to filter findings by their DAST target URL with the following request: ```bash curl -X POST https://app.codacy.com/api/v3/organizations/gh/codacy/security/items/search \ diff --git a/docusaurus/docs/codacy-api/examples/uploading-dast-results.mdx b/docusaurus/docs/codacy-api/examples/uploading-dast-results.mdx index 2a9d02f983..fcb22d7d2d 100644 --- a/docusaurus/docs/codacy-api/examples/uploading-dast-results.mdx +++ b/docusaurus/docs/codacy-api/examples/uploading-dast-results.mdx @@ -3,7 +3,7 @@ title: Uploading DAST results to Codacy description: Instructions on how to upload DAST results to Codacy using the API. --- -To ensure the security of your web applications, Codacy allows you to upload DAST (dynamic application security testing) results from [Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) directly to Codacy and monitor them as findings under [Security and risk management](../../organizations/managing-security-and-risk.md). +To ensure the security of your web applications, Codacy allows you to upload DAST (dynamic application security testing) results from [Zed Attack Proxy (ZAP)](https://www.zaproxy.org/) directly to Codacy and monitor them as findings under [Security and risk management](../../organizations/managing-security-and-risk). ## Uploading results to Codacy @@ -28,7 +28,7 @@ To ensure the security of your web applications, Codacy allows you to upload DAS Replace the placeholders with your own values: -- **API_KEY:** [Account API token](../api-tokens.md#account-api-tokens) used to authenticate on the Codacy API. +- **API_KEY:** [Account API token](../api-tokens.mdx#account-api-tokens) used to authenticate on the Codacy API. - **GIT_PROVIDER:** Git provider hosting of the organization, using one of the values in the table below. For example, `gh` for GitHub Cloud. | Value | Git provider | @@ -62,7 +62,7 @@ curl -X GET https://api.codacy.com/api/v3/organizations//uploadDASTReport](https://app.codacy.com/api/api-docs#uploaddastreport) to upload the report to Codacy. diff --git a/docusaurus/docs/codacy-api/using-the-codacy-api.mdx b/docusaurus/docs/codacy-api/using-the-codacy-api.mdx index 1fe932983c..779f9f7903 100644 --- a/docusaurus/docs/codacy-api/using-the-codacy-api.mdx +++ b/docusaurus/docs/codacy-api/using-the-codacy-api.mdx @@ -71,7 +71,7 @@ https:///api/v3 ## Authenticating requests -Most API endpoints require that you authenticate using an API token. After [obtaining the necessary tokens](api-tokens.md), include them in your request headers using the format `api-token: ` or `project-token: `. +Most API endpoints require that you authenticate using an API token. After [obtaining the necessary tokens](./api-tokens.mdx), include them in your request headers using the format `api-token: ` or `project-token: `. :::note Currently, all API v3 endpoints that require authentication must use **account API tokens**, while the API v2 endpoints require either **account or repository API tokens**. diff --git a/docusaurus/docs/codacy-guardrails/codacy-guardrails-faq.md b/docusaurus/docs/codacy-guardrails/codacy-guardrails-faq.mdx similarity index 80% rename from docusaurus/docs/codacy-guardrails/codacy-guardrails-faq.md rename to docusaurus/docs/codacy-guardrails/codacy-guardrails-faq.mdx index 9e04179404..f91fbc038d 100644 --- a/docusaurus/docs/codacy-guardrails/codacy-guardrails-faq.md +++ b/docusaurus/docs/codacy-guardrails/codacy-guardrails-faq.mdx @@ -3,7 +3,7 @@ title: FAQs --- ## How do I install Codacy Guardrails? -Please have a look at our [documentation](codacy-guardrails-getting-started.md). +Please have a look at our [documentation](./codacy-guardrails-getting-started). ## Does Guardrails only work with AI-generated code? No. While Guardrails does scan and autofix AI code as part of the agent flow, it scans any code shown in your IDE in real-time, regardless of how it was written. @@ -49,17 +49,17 @@ Codacy Guardrails is a free IDE Extension for local scanning of AI-generated and Check our [Team and Organization plans](https://www.codacy.com/pricing) to unlock: -- Central configuration and enforcement of AI coding standards across teams and projects -- Query and autofix existing problems across your codebase from the AI chat panel -- Generate custom security and code quality reports using AI prompts -- Full access to the Codacy Cloud platform including: +- Central configuration and enforcement of AI coding standards across teams and projects +- Query and autofix existing problems across your codebase from the AI chat panel +- Generate custom security and code quality reports using AI prompts +- Full access to the Codacy Cloud platform including: -- Pipeline-less AppSec and code quality scans -- PR merge gates -- Team dashboards -- Security reports -- DAST pipelines -- Jira integration + - Pipeline-less AppSec and code quality scans + - PR merge gates + - Team dashboards + - Security reports + - DAST pipelines + - Jira integration ## Does Guardrails work with all OS? Guardrails is supported on MacOS, Linux, and Windows (via [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)) @@ -74,18 +74,12 @@ Without an AI coding agent, you can still use the IDE extension for local analys If you wish to continue using a previous version a little longer, you can do so by: 1. Open the Extensions tab - -2. Select `Codacy` - -3. Click on the down arrow on the right of the Uninstall button - -4. Select `Install specific version...` - +1. Select `Codacy` +1. Click on the down arrow on the right of the Uninstall button +1. Select `Install specific version...` ![install specific version](images/install-specific-version.png) - -5. Select the version you want on the top search bar - -6. Click on `Restart Extensions` when that button appears +1. Select the version you want on the top search bar +1. Click on `Restart Extensions` when that button appears Keep in mind that the IDE extension is under active development, so be sure to check for updates regularly. To revert to the latest version, click on `Update`. diff --git a/docusaurus/docs/codacy-guardrails/codacy-guardrails-getting-started.md b/docusaurus/docs/codacy-guardrails/codacy-guardrails-getting-started.mdx similarity index 97% rename from docusaurus/docs/codacy-guardrails/codacy-guardrails-getting-started.md rename to docusaurus/docs/codacy-guardrails/codacy-guardrails-getting-started.mdx index f7a31365ad..e619bf6f84 100644 --- a/docusaurus/docs/codacy-guardrails/codacy-guardrails-getting-started.md +++ b/docusaurus/docs/codacy-guardrails/codacy-guardrails-getting-started.mdx @@ -52,7 +52,7 @@ For Visual Studio Code, the Insiders version is recommended for its faster perfo - [Lizard](https://docs.codacy.com/release-notes/cloud/cloud-2025-02-adding-ruff-lizard/#lizard) - Revive -## How to install - Quick Guide {#how-to-install-quick-guide} +## How to install - Quick Guide \{#how-to-install-quick-guide\} #### Note for Windows users: To take advantage of Codacy Guardrails on Windows, you might need to setup WSL first, [check the steps here.](#how-to-install-wsl) @@ -109,7 +109,7 @@ You can later generate the instructions manually from the Guardrails section of * Remember that for you to be able to interact with Codacy MCP server, you must be on the `Agent` mode of the chat, not the default `Ask` mode. * If you're still having issues with the MCP server, try to run the command `Preferences: Open User Settings (JSON)`, look for the Codacy MCP server settings and right on top of it you'll should see a `Start` option. Click on it and, if unsuccessful, go to `View > Debug Console` and check for errors. Don't forget to ensure you have `node.js` and `npx` installed and set up. -## How to install - WSL {#how-to-install-wsl} +## How to install - WSL \{#how-to-install-wsl\} ### 1. Install or update [WSL.](https://learn.microsoft.com/en-us/windows/wsl/install) @@ -120,7 +120,7 @@ You can later generate the instructions manually from the Guardrails section of ## How to install - Manually -### 1. Install and activate the Codacy CLI for local analysis {#install-cli} +### 1. Install and activate the Codacy CLI for local analysis \{#install-cli\} #### Download @@ -153,7 +153,7 @@ Before running the analysis, install the specified tools: codacy-cli install ``` -### 2. Install MCP Server {#install-mcp-server} +### 2. Install MCP Server \{#install-mcp-server\} If you want to use MCP Server with a NPM package you should download it from [here](https://www.npmjs.com/package/@codacy/codacy-mcp) @@ -220,7 +220,7 @@ Or open the general settings.json file directly, which according to your OS shou ![Settings.json in VSCode](images/settings-json-vscode.png) -Make sure you update the value of `CODACY_ACCOUNT_TOKEN` with your [API token](../codacy-api/api-tokens.md). +Make sure you update the value of `CODACY_ACCOUNT_TOKEN` with your [API token](../codacy-api/api-tokens). a. Above the MCP Server configuration in **Settings.json** file, you can Click in the command **Start** @@ -269,7 +269,7 @@ For JetBrains IDEs, IntelliJ isn't the only supported editor, but is our primary - [Lizard](https://docs.codacy.com/release-notes/cloud/cloud-2025-02-adding-ruff-lizard/#lizard) - Revive -## How to install - JetBrains Quick Guide {#how-to-install-quick-guide-jetbrains} +## How to install - JetBrains Quick Guide \{#how-to-install-quick-guide-jetbrains\} #### Note for Windows users: To take advantage of Codacy Guardrails on Windows, you need to set up WSL first; [check the steps here](#how-to-install-wsl). **Only local analysis** are supported for Windows, as MCP support for JetBrains IDEs is still not completely done. diff --git a/docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.md b/docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.mdx similarity index 85% rename from docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.md rename to docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.mdx index 0221d96124..14e0ec69f5 100644 --- a/docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.md +++ b/docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.mdx @@ -1,8 +1,9 @@ --- title: How to customize the analysis rules for Codacy Guardrails +sidebar_label: Customizing analysis rules --- -By default, if no API token is provided in the [MCP Server setup](codacy-guardrails-getting-started.md/#3-install-mcp-server), Codacy uses a predefined configuration that includes all recommended rules (or [code patterns](../repositories-configure/configuring-code-patterns.md) that you can find on many parts of our product) from the supported built-in scanners. +By default, if no API token is provided in the [MCP Server setup](codacy-guardrails-getting-started#3-install-mcp-server), Codacy uses a predefined configuration that includes all recommended rules (or [code patterns](../repositories-configure/configuring-code-patterns) that you can find on many parts of our product) from the supported built-in scanners. However, when an API token is used, Codacy automatically retrieves the current rule configuration directly from your repository. @@ -67,13 +68,13 @@ The table below lists the configuration file names that Codacy detects and suppo To use a configuration file for a static analysis tool: -1. Make sure the configuration file is located in the root of the [default Codacy branch](../repositories-configure/managing-branches.mdx). +1. Make sure the configuration file is located in the root of the [default Codacy branch](../repositories-configure/managing-branches). 2. Open the repository **Code patterns** page, select the tool of interest, and activate the toggle to use a configuration file. :::note -- After activating a configuration file for a tool, Codacy uses that configuration file even if you [exclude it from Codacy analysis](../repositories-configure/ignoring-files.md). -- When [using a tool configuration file alongside a coding standard](../organizations/using-coding-standards.md#using-with-tool-configuration), the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled. +- After activating a configuration file for a tool, Codacy uses that configuration file even if you [exclude it from Codacy analysis](../repositories-configure/ignoring-files). +- When [using a tool configuration file alongside a coding standard](../organizations/using-coding-standards.mdx#using-with-tool-configuration), the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled. - Codacy uses the version of the configuration file **in the branch being analyzed**. For example, if you open a pull request that includes changes to the configuration file, the analysis results take those changes into account. - If Codacy analyzes a branch that doesn't include the configuration file, Codacy reverts to using the code patterns configured for the tool before you selected the option **Configuration file** on the Code patterns page. - For performance reasons, when you update pattern settings using a configuration file, Codacy may display outdated messages for issues identified previously by those patterns. @@ -88,8 +89,8 @@ To use a configuration file for a static analysis tool: If you want to use Codacy UI, there are two ways you can follow to configure the built-in scanner rules: -- Using the [Code Patterns](../repositories-configure/configuring-code-patterns.md) configuration, if you want to configure the rules per repository or -- Using [Coding Standards](../organizations/using-coding-standards.md), if you want to configure the rules for multiple repositories +- Using the [Code Patterns](../repositories-configure/configuring-code-patterns) configuration, if you want to configure the rules per repository or +- Using [Coding Standards](../organizations/using-coding-standards), if you want to configure the rules for multiple repositories ### Code Patterns @@ -106,7 +107,7 @@ In order to set up your rules, please follow the next steps: ![Toggling tools](images/code-patterns-toggle-tools.png) -3. Select a tool to enable or disable its code patterns. To make it easier to find relevant patterns, use the filters above the pattern list. You can filter by [issue category](../faq/code-analysis/which-metrics-does-codacy-calculate.md#issues), status, severity level, or display only recommended code patterns. +3. Select a tool to enable or disable its code patterns. To make it easier to find relevant patterns, use the filters above the pattern list. You can filter by [issue category](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#issues), status, severity level, or display only recommended code patterns. To see an explanation of the issues that a pattern detects and how to fix them, click the respective dropdown arrow. @@ -122,7 +123,7 @@ In order to set up your rules, please follow the next steps: Coding standards enable the analysis of multiple repositories with the same scanner and rules configurations, ensuring consistent code quality across your organization. Multiple coding standards can be applied to the same repository. For example, you can use coding standards to ensure that a group of repositories follow the same security rules or coding conventions. -To apply or edit a repository's [coding standards](../organizations/using-coding-standards.md), click **Customize** in the **Following ...** section at the top of the **Code patterns** page. +To apply or edit a repository's [coding standards](../organizations/using-coding-standards), click **Customize** in the **Following ...** section at the top of the **Code patterns** page. ![Customize applied coding standards](images/code-patterns-cs-customize.png) diff --git a/docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-use.md b/docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-use.mdx similarity index 100% rename from docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-use.md rename to docusaurus/docs/codacy-guardrails/codacy-guardrails-how-to-use.mdx diff --git a/docusaurus/docs/codacy-guardrails/codacy-guardrails-limitations.md b/docusaurus/docs/codacy-guardrails/codacy-guardrails-limitations.mdx similarity index 100% rename from docusaurus/docs/codacy-guardrails/codacy-guardrails-limitations.md rename to docusaurus/docs/codacy-guardrails/codacy-guardrails-limitations.mdx diff --git a/docusaurus/docs/codacy-guardrails/codacy-guardrails-troubleshooting.md b/docusaurus/docs/codacy-guardrails/codacy-guardrails-troubleshooting.mdx similarity index 100% rename from docusaurus/docs/codacy-guardrails/codacy-guardrails-troubleshooting.md rename to docusaurus/docs/codacy-guardrails/codacy-guardrails-troubleshooting.mdx diff --git a/docusaurus/docs/coverage-reporter/_order.ts b/docusaurus/docs/coverage-reporter/_order.ts deleted file mode 100644 index bff9e03ea5..0000000000 --- a/docusaurus/docs/coverage-reporter/_order.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const coverageReporterOrder = [ - 'coverage-reporter/index', - 'coverage-reporter/alternative-ways-of-running-coverage-reporter', - 'coverage-reporter/uploading-coverage-in-advanced-scenarios', - 'coverage-reporter/troubleshooting-coverage-cli-issues', -]; - diff --git a/docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.md b/docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.mdx similarity index 98% rename from docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.md rename to docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.mdx index 71f5bdb5f9..a2d74eb682 100644 --- a/docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.md +++ b/docusaurus/docs/coverage-reporter/alternative-ways-of-running-coverage-reporter.mdx @@ -10,7 +10,7 @@ The following sections list the alternative ways of running or installing Codacy **If you're using Codacy Self-hosted** make sure that you use a Codacy Coverage Reporter version compatible with your Codacy instance. ::: -## Bash script (recommended) {#bash-script} +## Bash script (recommended) \{#bash-script\} The recommended way to run the Codacy Coverage Reporter is by using the [self-contained bash script `get.sh`](https://github.com/codacy/codacy-coverage-reporter/blob/master/get.sh) that automatically downloads and runs the most recent version of the Codacy Coverage Reporter: - On Ubuntu, run: @@ -162,7 +162,7 @@ after_success: - bash <(curl -Ls https://coverage.codacy.com/get.sh) ``` -Make sure that you also [set your project or account API Token](index.md#authenticate) as an environment variable in your Travis CI job. +Make sure that you also [set your project or account API Token](./index.mdx#authenticate) as an environment variable in your Travis CI job. ### Gradle task diff --git a/docusaurus/docs/coverage-reporter/index.md b/docusaurus/docs/coverage-reporter/index.mdx similarity index 92% rename from docusaurus/docs/coverage-reporter/index.md rename to docusaurus/docs/coverage-reporter/index.mdx index 21c9116b5e..e606b6a415 100644 --- a/docusaurus/docs/coverage-reporter/index.md +++ b/docusaurus/docs/coverage-reporter/index.mdx @@ -24,7 +24,7 @@ Complete these main steps to set up coverage for your repository: The next sections include detailed instructions on how to complete each step of the setup process. -## 1. Generating coverage reports +## 1. Generating coverage reports \{#generating-coverage\} Before setting up Codacy to display code coverage metrics for your repository you must have tests and use tools to generate coverage reports for the source code files in your repository. Consider the following when generating coverage reports for your repository: @@ -129,7 +129,7 @@ If you're generating a report format that Codacy doesn't support yet, [contribut - [danielpalme/ReportGenerator](https://github.com/danielpalme/ReportGenerator): convert between different report formats :::caution -Make sure that you [specify the language](uploading-coverage-in-advanced-scenarios.md#unsupported-languages) when uploading coverage for an unsupported language. +Make sure that you [specify the language](./uploading-coverage-in-advanced-scenarios.mdx#unsupported-languages) when uploading coverage for an unsupported language. ::: As a last resort, you can also send the coverage data directly by calling one of the following Codacy API endpoints: @@ -137,7 +137,7 @@ As a last resort, you can also send the coverage data directly by calling one of - [saveCoverage](https://api.codacy.com/swagger#savecoverage) - [saveCoverageWithAccountToken](https://api.codacy.com/swagger#savecoveragewithaccounttoken) -## 2. Uploading coverage data to Codacy +## 2. Uploading coverage data to Codacy \{#uploading-coverage\} After having coverage reports set up for your repository, you must use the Codacy Coverage Reporter to upload them to Codacy. The recommended way to do this is by using a CI/CD platform that automatically runs tests, generates coverage, and then uses the Codacy Coverage Reporter to upload the coverage report information to Codacy. :::caution @@ -149,20 +149,22 @@ Please note that Codacy needs to receive coverage data for: ::: :::note[Alternative ways of running the Codacy Coverage Reporter] -Codacy makes available [alternative ways to run the Codacy Coverage Reporter](alternative-ways-of-running-coverage-reporter.md), such as by installing the binary manually or by using Docker, a GitHub Action, or a CircleCI Orb. +Codacy makes available [alternative ways to run the Codacy Coverage Reporter](./alternative-ways-of-running-coverage-reporter), such as by installing the binary manually or by using Docker, a GitHub Action, or a CircleCI Orb. -However, the instructions on this page assume that you'll run the recommended [self-contained bash script `get.sh`](alternative-ways-of-running-coverage-reporter.md#bash-script) to automatically download and run the most recent version of the Codacy Coverage Reporter. +However, the instructions on this page assume that you'll run the recommended [self-contained bash script `get.sh`](./alternative-ways-of-running-coverage-reporter.mdx#bash-script) to automatically download and run the most recent version of the Codacy Coverage Reporter. ::: +### Authenticate with an API token \{#authenticate\} + 1. Set up an API token to allow Codacy Coverage Reporter to authenticate on Codacy: - - **If you're setting up coverage for one repository**, [obtain a repository API token](../codacy-api/api-tokens.md#repository-api-tokens) and set the following environment variable to specify your repository API token: + - **If you're setting up coverage for one repository**, [obtain a repository API token](../codacy-api/api-tokens.mdx#repository-api-tokens) and set the following environment variable to specify your repository API token: ```bash export CODACY_PROJECT_TOKEN= ``` - - **If you're setting up and automating coverage for multiple repositories**, [obtain an account API Token](../codacy-api/api-tokens.md#account-api-tokens) and set the following environment variables: + - **If you're setting up and automating coverage for multiple repositories**, [obtain an account API Token](../codacy-api/api-tokens.mdx#account-api-tokens) and set the following environment variables: - **CODACY_API_TOKEN:** Your account API token. @@ -200,13 +202,13 @@ However, the instructions on this page assume that you'll run the recommended [s bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ``` - Check the console output to validate that the Codacy Coverage Reporter **detected the correct commit SHA-1 hash** and **successfully uploaded** the coverage data to Codacy. If you need help, [check the troubleshooting page](troubleshooting-coverage-cli-issues.md) for solutions to the most common issues while running the CLI. + Check the console output to validate that the Codacy Coverage Reporter **detected the correct commit SHA-1 hash** and **successfully uploaded** the coverage data to Codacy. If you need help, [check the troubleshooting page](troubleshooting-coverage-cli-issues.mdx) for solutions to the most common issues while running the CLI. :::note - Be sure to also check the [instructions for more advanced scenarios](uploading-coverage-in-advanced-scenarios.md) while uploading the coverage data to Codacy, such as when running parallel tests, using monorepos, or testing source code in multiple or unsupported languages. + Be sure to also check the [instructions for more advanced scenarios](uploading-coverage-in-advanced-scenarios.mdx) while uploading the coverage data to Codacy, such as when running parallel tests, using monorepos, or testing source code in multiple or unsupported languages. ::: -## 3. Validating that the coverage setup is complete +## 3. Validating that the coverage setup is complete \{#validating-coverage\} Codacy displays the code coverage in each branch, as well as the evolution of code coverage between commits and the code coverage variation introduced by pull requests. Because of this, to ensure that all code coverage metrics are available on Codacy, you must have successfully uploaded coverage data and analyzed: @@ -237,7 +239,7 @@ Follow these instructions to validate that your coverage setup is working correc If there are commits with a status different from **Processed**, please follow the troubleshooting instructions for the corresponding error status and click the button **Test integration** to display any new coverage reports uploaded to Codacy. - ### Commit not found + ### Commit not found \{#status-commit-not-found\} Codacy doesn't have information about the commit associated with the coverage data. @@ -272,7 +274,7 @@ Follow these instructions to validate that your coverage setup is working correc
- ### Branch not enabled + ### Branch not enabled \{#status-branch-not-enabled\} The commit associated with the coverage data doesn't belong to any branch that Codacy is analyzing. @@ -307,7 +309,7 @@ Follow these instructions to validate that your coverage setup is working correc
- ### Commit not analyzed + ### Commit not analyzed \{#status-commit-not-analyzed\} Due to technical limitations, Codacy only reports coverage for a commit after successfully completing the static code analysis of that commit. @@ -335,7 +337,7 @@ Follow these instructions to validate that your coverage setup is working correc Codacy didn't analyze the commit on a private repository because the committer doesn't belong to the Codacy organization. @@ -365,7 +367,7 @@ Follow these instructions to validate that your coverage setup is working correc
- Make sure that you add all committers to your Codacy organization. + Make sure that you add all committers to your Codacy organization.
- ### Final report not sent + ### Final report not sent \{#status-final-report-not-sent\} Codacy is waiting to receive more coverage data before reporting the coverage for a commit. @@ -391,7 +393,7 @@ Follow these instructions to validate that your coverage setup is working correc
- ### Pending + ### Pending \{#status-pending\} Codacy is waiting to receive valid coverage data for the files in your repository. @@ -448,7 +450,7 @@ Follow these instructions to validate that your coverage setup is working correc ![Commits that must have received coverage data](images/coverage-pr-commits.png) - Click **View logs** on a pull request detail page to see the SHA-1 hashes of the commits that are missing coverage data. If you have many open pull requests, you can also use a script to [identify if any pull requests are missing coverage data](../codacy-api/examples/identifying-commits-without-coverage-data.md). + Click **View logs** on a pull request detail page to see the SHA-1 hashes of the commits that are missing coverage data. If you have many open pull requests, you can also use a script to [identify if any pull requests are missing coverage data](../codacy-api/examples/identifying-commits-without-coverage-data). ![Logs showing the pull request commits that are missing coverage data](images/coverage-codacy-ui-logs.png) @@ -466,5 +468,5 @@ If you need help setting up coverage on your repository please contact us at [su ## See also -- [Identifying commits without coverage data](../codacy-api/examples/identifying-commits-without-coverage-data.md) -- [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md) +- [Identifying commits without coverage data](../codacy-api/examples/identifying-commits-without-coverage-data) +- [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes) diff --git a/docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.md b/docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.mdx similarity index 97% rename from docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.md rename to docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.mdx index 0e962f5ba7..7912981b20 100644 --- a/docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.md +++ b/docusaurus/docs/coverage-reporter/troubleshooting-coverage-cli-issues.mdx @@ -19,7 +19,7 @@ The sections below provide instructions or workarounds to overcome common issues ## Can't guess any report due to no matching -Codacy Coverage Reporter automatically searches for coverage reports matching the [file name conventions for supported formats](index.md#generating-coverage). +Codacy Coverage Reporter automatically searches for coverage reports matching the [file name conventions for supported formats](./index.mdx#generating-coverage). However, if Codacy Coverage Reporter doesn't find your coverage report, you can explicitly define the report file name with the flag `-r`. For example: @@ -27,7 +27,7 @@ However, if Codacy Coverage Reporter doesn't find your coverage report, you can bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ``` -## Can't validate checksum {#checksum} +## Can't validate checksum \{#checksum\} Starting on version [13.0.0](https://github.com/codacy/codacy-coverage-reporter/releases/tag/13.0.0) the `get.sh` script automatically validates the checksum of the downloaded Codacy Coverage Reporter binary. This requires having either the `sha512sum` or `shasum` command on the operating system where you're running the script. If you're getting this error while uploading your coverage data to Codacy, install the correct version of `sha512sum` or `shasum` for the operating system that you're using. @@ -38,7 +38,7 @@ You can also skip validating the checksum of the binary by defining the followin export CODACY_REPORTER_SKIP_CHECKSUM=true ``` -## Commit SHA-1 hash detection {#commit-detection} +## Commit SHA-1 hash detection \{#commit-detection\} The Codacy Coverage Reporter automatically detects the SHA-1 hash of the current commit to associate with the coverage data when you're using one of the following CI/CD platforms: - Appveyor @@ -99,7 +99,7 @@ If you get a `com.fasterxml.jackson.core.JsonParseException` error while uploadi There are some ways you can solve this: -- Split your coverage reports into smaller files and [upload them to Codacy one at a time](../uploading-coverage-in-advanced-scenarios/#multiple-reports). +- Split your coverage reports into smaller files and [upload them to Codacy one at a time](./uploading-coverage-in-advanced-scenarios.mdx#multiple-reports). - **If you're using dotCover to generate coverage reports for your C# projects**, you should [exclude xUnit files](https://www.jetbrains.com/help/dotcover/Running_Coverage_Analysis_from_the_Command_LIne.html#filters_cmd) from the coverage analysis as follows: @@ -128,7 +128,7 @@ Make sure that your coverage report isn't empty and that it includes coverage da If you upload multiple coverage reports and at least one contains valid data, the Codacy Coverage Reporter uploads the valid reports and ignores the invalid ones. ::: -## Report generated an empty result while uploading C# coverage data {#detailedxml} +## Report generated an empty result while uploading C# coverage data \{#detailedxml\} If you're using dotCover to generate coverage reports for your C# projects, you must use the dotCover detailedXML report format as follows: ```bash diff --git a/docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.md b/docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.mdx similarity index 86% rename from docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.md rename to docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.mdx index 0e09d9e8d4..4e4ab6da91 100644 --- a/docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.md +++ b/docusaurus/docs/coverage-reporter/uploading-coverage-in-advanced-scenarios.mdx @@ -6,7 +6,7 @@ description: Instructions on how to use the Codacy Coverage Reporter to upload c The following sections include instructions on how to use the Codacy Coverage Reporter to upload coverage data in more advanced scenarios. -## Uploading multiple coverage reports for the same language {#multiple-reports} +## Uploading multiple coverage reports for the same language \{#multiple-reports\} If your test suite is split into different modules or runs in parallel, you must upload multiple coverage reports for the same language either at once or in sequence. Alternatively, consider merging multiple coverage reports before uploading them to Codacy. Most coverage tools support merging or aggregating coverage data. For example, use the [merge mojo for JaCoCo](http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html). @@ -15,7 +15,7 @@ Alternatively, consider merging multiple coverage reports before uploading them If one or more coverage reports mark a line as covered multiple times, Codacy counts it as a single covered line when calculating coverage. ::: -### Uploading all reports at once {#multiple-reports-once} +### Uploading all reports at once \{#multiple-reports-once\} Upload multiple partial coverage reports with a single command by specifying each report with the flag `-r`. For example: ```bash @@ -30,7 +30,7 @@ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ -l Java $(find . -name 'jacoco*.xml' | sed 's,^, -r ,' | xargs echo) ``` -### Uploading reports in sequence {#multiple-reports-sequence} +### Uploading reports in sequence \{#multiple-reports-sequence\} Upload multiple partial coverage reports in sequence: 1. Upload each report separately with the flag `--partial`. @@ -49,7 +49,7 @@ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ bash <(curl -Ls https://coverage.codacy.com/get.sh) final ``` -## Uploading the same coverage report for multiple languages {#multiple-languages} +## Uploading the same coverage report for multiple languages \{#multiple-languages\} If your test suite generates a single coverage report for more than one language, you must upload the same coverage report for each language. To do this, upload the same report multiple times, specifying each different language with the flag `-l`. For example: @@ -62,7 +62,7 @@ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ bash <(curl -Ls https://coverage.codacy.com/get.sh) final ``` -## Uploading coverage for Golang {#golang} +## Uploading coverage for Golang \{#golang\} Codacy can't automatically detect Golang coverage report files because they don't have specific file names. If you're uploading a Golang coverage report, you must also specify the report type: @@ -73,8 +73,8 @@ bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ --force-coverage-parser go -r unit.coverage.out ``` -## Uploading coverage for unsupported languages {#unsupported-languages} -If your language isn't in the [list of supported languages](index.md#generating-coverage), you can still send coverage to Codacy. +## Uploading coverage for unsupported languages \{#unsupported-languages\} +If your language isn't in the [list of supported languages](./index.mdx#generating-coverage), you can still send coverage to Codacy. To do this, provide the correct language with the flag `-l`, together with `--force-language`. For example: diff --git a/docusaurus/docs/enterprise-cloud/github-enterprise-cloud.md b/docusaurus/docs/enterprise-cloud/github-enterprise-cloud.mdx similarity index 95% rename from docusaurus/docs/enterprise-cloud/github-enterprise-cloud.md rename to docusaurus/docs/enterprise-cloud/github-enterprise-cloud.mdx index ae2e4f1e01..42b6628a01 100644 --- a/docusaurus/docs/enterprise-cloud/github-enterprise-cloud.md +++ b/docusaurus/docs/enterprise-cloud/github-enterprise-cloud.mdx @@ -63,9 +63,7 @@ Currently, the integration between Codacy and GitHub Enterprise has the followin ## See also -- [How does Codacy support GitLab Cloud?](../faq/general/how-does-codacy-support-gitlab-cloud.md) -- [How does Codacy support GitLab Enterprise?](../faq/general/how-does-codacy-support-gitlab-enterprise.md) -- [How does Codacy support Bitbucket Cloud?](../faq/general/how-does-codacy-support-bitbucket-cloud.md) -- [How does Codacy support Bitbucket Server?](../faq/general/how-does-codacy-support-bitbucket-server.md) - -

+- [How does Codacy support GitLab Cloud?](../faq/general/how-does-codacy-support-gitlab-cloud.mdx) +- [How does Codacy support GitLab Enterprise?](../faq/general/how-does-codacy-support-gitlab-enterprise.mdx) +- [How does Codacy support Bitbucket Cloud?](../faq/general/how-does-codacy-support-bitbucket-cloud.mdx) +- [How does Codacy support Bitbucket Server?](../faq/general/how-does-codacy-support-bitbucket-server.mdx) diff --git a/docusaurus/docs/faq/code-analysis/can-i-bypass-codacy-status-check.md b/docusaurus/docs/faq/code-analysis/can-i-bypass-codacy-status-check.mdx similarity index 82% rename from docusaurus/docs/faq/code-analysis/can-i-bypass-codacy-status-check.md rename to docusaurus/docs/faq/code-analysis/can-i-bypass-codacy-status-check.mdx index 2d8efdd524..01057c939f 100644 --- a/docusaurus/docs/faq/code-analysis/can-i-bypass-codacy-status-check.md +++ b/docusaurus/docs/faq/code-analysis/can-i-bypass-codacy-status-check.mdx @@ -2,15 +2,14 @@ title: Can I bypass Codacy status check? --- - :::note **This will only apply to gates enforcing quality checks.** If coverage is blocking a pull request analysis, we recommend contacting your git provider admin or temporarily disabling the coverage gate on the repo and reanalyzing the pull request before enabling them again. ::: -To protect your code from unwelcome changes, you can [configure your Git workflow to block merging pull requests](../../getting-started/integrating-codacy-with-your-git-workflow.md#blocking-pull-requests) if they don't pass the Codacy status check. +To protect your code from unwelcome changes, you can [configure your Git workflow to block merging pull requests](../../getting-started/integrating-codacy-with-your-git-workflow.mdx#blocking-pull-requests) if they don't pass the Codacy status check. However, on **very specific and exceptional situations** where your pull request merging is blocked due to an unexpected issue not related to the quality of your code, Codacy allows **repository admins** to bypass the Codacy status check for that pull request. To bypass Codacy status check for a pull request, a repository admin must click **Bypass status checks** on the [pull request status area](../../repositories/pull-requests.mdx#status) of the pull request detail screen. -![Bypass status check for pull request](images/bypass-status-check.png) +![Bypass status check for pull request](./images/bypass-status-check.png) diff --git a/docusaurus/docs/faq/code-analysis/does-codacy-check-for-dependencies.md b/docusaurus/docs/faq/code-analysis/does-codacy-check-for-dependencies.mdx similarity index 95% rename from docusaurus/docs/faq/code-analysis/does-codacy-check-for-dependencies.md rename to docusaurus/docs/faq/code-analysis/does-codacy-check-for-dependencies.mdx index beaab3b9d3..10993cd05e 100644 --- a/docusaurus/docs/faq/code-analysis/does-codacy-check-for-dependencies.md +++ b/docusaurus/docs/faq/code-analysis/does-codacy-check-for-dependencies.mdx @@ -2,7 +2,6 @@ title: Does Codacy check for dependencies? --- - Yes, Codacy scans the manifest files of your repositories and displays any vulnerable dependencies as Codacy issues. -For a list of supported languages and manifest files scanned by the Codacy dependency vulnerability scanning tools, see [Supported languages and tools](../../getting-started/supported-languages-and-tools.md). +For a list of supported languages and manifest files scanned by the Codacy dependency vulnerability scanning tools, see [Supported languages and tools](../../getting-started/supported-languages-and-tools). diff --git a/docusaurus/docs/faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md b/docusaurus/docs/faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.mdx similarity index 92% rename from docusaurus/docs/faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md rename to docusaurus/docs/faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.mdx index d76a2b2dfe..14283330cc 100644 --- a/docusaurus/docs/faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md +++ b/docusaurus/docs/faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.mdx @@ -2,16 +2,15 @@ title: Does Codacy place limits on the code analysis? --- - Codacy uses limits when performing the analysis of your repositories to ensure good performance levels and avoid degradation of service during peak load. The following table describes these limits and includes links to more information and workarounds, if available: - +-->*/}
@@ -36,7 +35,7 @@ See Why is m @@ -79,4 +78,4 @@ If you believe that you may have hit any of these limits and need help to overco ## See also -- [Which metrics does Codacy calculate?](which-metrics-does-codacy-calculate.md) +- [Which metrics does Codacy calculate?](./which-metrics-does-codacy-calculate) diff --git a/docusaurus/docs/faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md b/docusaurus/docs/faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md deleted file mode 100644 index 5ccf91b3f8..0000000000 --- a/docusaurus/docs/faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: How long does it take for my repository to be analyzed? ---- - - -Codacy usually takes under 5 minutes to analyze your repository. It may however take longer, depending on a number of factors: - -- **Whether it's the initial analysis of your repository** - - The initial analysis examines all files in the repository, while each subsequent commit triggers an analysis only on files changed in that commit. - -- **Whether tool configurations have been updated** - - Updates to tool configurations trigger a reanalysis of all files in the repository on the next commit and may impact analysis duration. - -- **The size of your repository** - - To speed up the analysis, [ignore any files and directories](../../repositories-configure/ignoring-files.md) that aren't relevant to your project, such as generated code or any third-party libraries included in your repositories. - -- **The time it takes your Git provider to trigger the analysis** - - Codacy relies on post-commit hooks sent by your Git provider to trigger the analysis after each push to the repository, so if your analysis is taking a lot of time to start [check that the Post-Commit Hook integration for your repository is enabled](../../repositories-configure/integrations/post-commit-hooks.md). - -- **The priority of your analysis request and the current load on Codacy's servers** - - Open-source projects have lower priority in the Codacy analysis queues. - -- **Whether Codacy or your Git provider is currently experiencing issues or outages** - - Check the [Codacy status page](https://status.codacy.com/) and the status page of your Git provider ([GitHub](https://www.githubstatus.com/), [GitLab](https://status.gitlab.com/), [Bitbucket](https://bitbucket.status.atlassian.com/)) to see if there is any ongoing incident that could delay the analysis. diff --git a/docusaurus/docs/faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.mdx b/docusaurus/docs/faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.mdx new file mode 100644 index 0000000000..b2b36ac93d --- /dev/null +++ b/docusaurus/docs/faq/code-analysis/how-long-does-it-take-for-my-repository-to-be-analyzed.mdx @@ -0,0 +1,23 @@ +--- +title: How long does it take for my repository to be analyzed? +--- + +Codacy usually takes under 5 minutes to analyze your repository. It may however take longer, depending on a number of factors: + +- **Whether it's the initial analysis of your repository** + The initial analysis examines all files in the repository, while each subsequent commit triggers an analysis only on files changed in that commit. + +- **Whether tool configurations have been updated** + Updates to tool configurations trigger a reanalysis of all files in the repository on the next commit and may impact analysis duration. + +- **The size of your repository** + To speed up the analysis, [ignore any files and directories](../../repositories-configure/ignoring-files) that aren't relevant to your project, such as generated code or any third-party libraries included in your repositories. + +- **The time it takes your Git provider to trigger the analysis** + Codacy relies on post-commit hooks sent by your Git provider to trigger the analysis after each push to the repository, so if your analysis is taking a lot of time to start [check that the Post-Commit Hook integration for your repository is enabled](../../repositories-configure/integrations/post-commit-hooks). + +- **The priority of your analysis request and the current load on Codacy's servers** + Open-source projects have lower priority in the Codacy analysis queues. + +- **Whether Codacy or your Git provider is currently experiencing issues or outages** + Check the [Codacy status page](https://status.codacy.com/) and the status page of your Git provider ([GitHub](https://www.githubstatus.com/), [GitLab](https://status.gitlab.com/), [Bitbucket](https://bitbucket.status.atlassian.com/)) to see if there is any ongoing incident that could delay the analysis. diff --git a/docusaurus/docs/faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md b/docusaurus/docs/faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.mdx similarity index 72% rename from docusaurus/docs/faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md rename to docusaurus/docs/faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.mdx index e6174f1e48..9d7776c6d2 100644 --- a/docusaurus/docs/faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.md +++ b/docusaurus/docs/faq/code-analysis/how-to-configure-php-codesniffer-coding-standards.mdx @@ -3,18 +3,15 @@ title: How to configure PHP_CodeSniffer coding standards? description: To enforce a specific PHP_CodeSniffer coding standard on Codacy you must create a configuration file on the root of your repository that references one or more coding standards. --- - -By default, Codacy uses the PHP_CodeSniffer configuration on the [Code patterns](../../repositories-configure/configuring-code-patterns.md) page when analyzing your repositories. +By default, Codacy uses the PHP_CodeSniffer configuration on the [Code patterns](../../repositories-configure/configuring-code-patterns) page when analyzing your repositories. To enforce a specific PHP_CodeSniffer coding standard you must [create a configuration file](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file) on the root of your repository that references one or more of the following coding standards: -- Default coding standards packaged together with PHP_CodeSniffer: - - [PHP_CodeSniffer coding standards](https://github.com/squizlabs/PHP_CodeSniffer/tree/master/src/Standards) - -- Additional coding standards that Codacy packages on the PHP_CodeSniffer tool plugin. Check the repository the additional coding standards to learn how you can reference them in your configuration files: +- Default coding standards packaged together with PHP_CodeSniffer: + [PHP_CodeSniffer coding standards](https://github.com/squizlabs/PHP_CodeSniffer/tree/master/src/Standards) - [codacy-codesniffer composer.json](https://github.com/codacy/codacy-codesniffer/blob/master/composer.json) +- Additional coding standards that Codacy packages on the PHP_CodeSniffer tool plugin. Check the repository the additional coding standards to learn how you can reference them in your configuration files: + [codacy-codesniffer composer.json](https://github.com/codacy/codacy-codesniffer/blob/master/composer.json) For example, create a text file with the name `phpcs.xml` to use the PSR12 coding standard but excluding the sniffs `Generic.WhiteSpace.DisallowTabIndent` and `PSR12.Operators.OperatorSpacing`: diff --git a/docusaurus/docs/faq/code-analysis/how-to-skip-an-analysis.md b/docusaurus/docs/faq/code-analysis/how-to-skip-an-analysis.mdx similarity index 94% rename from docusaurus/docs/faq/code-analysis/how-to-skip-an-analysis.md rename to docusaurus/docs/faq/code-analysis/how-to-skip-an-analysis.mdx index 9f848866eb..d7d5d4fc12 100644 --- a/docusaurus/docs/faq/code-analysis/how-to-skip-an-analysis.md +++ b/docusaurus/docs/faq/code-analysis/how-to-skip-an-analysis.mdx @@ -2,14 +2,13 @@ title: How to skip an analysis? --- - By default, Codacy automatically analyzes a repository whenever you push changes. However, you can override this behavior by adding one of the "skip" tags - `[ci skip]`, `[skip ci]`, `[codacy skip]` or `[skip codacy]` - anywhere in the subject or body of the commit message. For example: ```bash git commit -a -m "Add eslint-plugin-chai-expect version 1.1.1 [ci skip]" ``` -If you later decide to analyze a skipped commit, you can override any skip tags by [reanalyzing the commit](../repositories/how-do-i-reanalyze-my-repository.md). +If you later decide to analyze a skipped commit, you can override any skip tags by [reanalyzing the commit](../repositories/how-do-i-reanalyze-my-repository.mdx). :::note This feature isn't supported for pull requests. diff --git a/docusaurus/docs/faq/code-analysis/which-metrics-does-codacy-calculate.md b/docusaurus/docs/faq/code-analysis/which-metrics-does-codacy-calculate.mdx similarity index 58% rename from docusaurus/docs/faq/code-analysis/which-metrics-does-codacy-calculate.md rename to docusaurus/docs/faq/code-analysis/which-metrics-does-codacy-calculate.mdx index c676c0d327..af9fbbfa73 100644 --- a/docusaurus/docs/faq/code-analysis/which-metrics-does-codacy-calculate.md +++ b/docusaurus/docs/faq/code-analysis/which-metrics-does-codacy-calculate.mdx @@ -3,12 +3,11 @@ title: Which metrics does Codacy calculate? description: Codacy scans your code for issues and calculates code complexity, duplication, and coverage metrics. Besides this, Codacy also calculates a grade for your repository and files based on all calculated code quality metrics. --- - -Codacy performs static code analysis and calculates code duplication, code complexity, and code coverage metrics for [most supported programming languages](../../getting-started/supported-languages-and-tools.md). +Codacy performs static code analysis and calculates code duplication, code complexity, and code coverage metrics for [most supported programming languages](../../getting-started/supported-languages-and-tools). The following sections describe how Codacy calculates each supported metric and where you can see each metric on the Codacy UI: -- [Which metrics does Codacy calculate?](#which-metrics-does-codacy-calculate) +- Which metrics does Codacy calculate? - [Grade](#grade) - [Issues](#issues) - [Complexity](#complexity) @@ -17,52 +16,44 @@ The following sections describe how Codacy calculates each supported metric and - [See also](#see-also) :::note -Depending on certain characteristics of your repository, such as the number of source code files and their size, Codacy may [apply limits to the code analysis](does-codacy-place-limits-on-the-code-analysis.md) that impact the calculation of the supported metrics. +Depending on certain characteristics of your repository, such as the number of source code files and their size, Codacy may [apply limits to the code analysis](does-codacy-place-limits-on-the-code-analysis) that impact the calculation of the supported metrics. ::: ## Grade Codacy assigns an overall grade to your repository branches and to individual files to help you assess the code quality of your repository. Grades represent a weighted average of the available code quality metrics (issues, complexity, duplication, and coverage), and range from **A** to **F**: -
10 MB Codacy doesn't parse code coverage reports that are over the file size limit.

-See JsonParseException while uploading coverage data +See JsonParseException while uploading coverage data
- - - - - - - - - - -
Highest gradeGrade AGrade BGrade CGrade DGrade EGrade FLowest grade
+| | | | | | | | | +| --- | --- | --- | --- | --- | --- | --- | --- | +| Highest grade | ![Grade A](./images/grade_a.png) | ![Grade B](./images/grade_b.png) | ![Grade C](./images/grade_c.png) | ![Grade D](./images/grade_d.png) | ![Grade E](./images/grade_e.png) | ![Grade F](./images/grade_f.png) | Lowest grade | + Codacy displays grades on the following places: |Place|Metric| |-----|------| -|[Files page](../../repositories/files.md)|Grade for each file in your repository| -|[Repository Dashboard](../../repositories/repository-dashboard.md)
[Codacy badge](../../getting-started/adding-a-codacy-badge.md)|Grade of each analyzed branch in your repository| -|[Email notifications](../../account/emails.md#managing-your-email-notifications)|Grade of your repository| -|[Organization overview](../../organizations/organization-overview.md)|Average grade of the repositories in your organization and grade of each repository| -|[Repositories list](../../organizations/managing-repositories.md)|Grade of each repository in your organization| +|[Files page](../../repositories/files)|Grade for each file in your repository| +|[Repository Dashboard](../../repositories/repository-dashboard)
[Codacy badge](../../getting-started/adding-a-codacy-badge)|Grade of each analyzed branch in your repository| +|[Email notifications](../../account/emails.mdx#managing-your-email-notifications)|Grade of your repository| +|[Organization overview](../../organizations/organization-overview)|Average grade of the repositories in your organization and grade of each repository| +|[Repositories list](../../organizations/managing-repositories)|Grade of each repository in your organization| ## Issues Codacy calculates the number of issues in the following static code analysis categories: - +{/**/} - **Code style:** Code formatting and syntax problems, such as variable names style and enforcing the use of brackets and quotation marks - **Error prone:** Code that may hide bugs and language keywords that should be used with caution, such as the operator `==` in JavaScript or `Option.get` in Scala - **Code complexity:** High complexity files that should be refactored - **Performance:** Code that can have performance problems - **Compatibility:** Mainly for frontend code, compatibility problems across different browser versions - **Unused code:** Unused variables and methods, code that can't be reached -- **Security:** Potential security vulnerabilities, including hard-coded passwords and keys (secret scanning), vulnerable dependencies (software composition analysis or SCA), and insecure code patterns (static application security testing or SAST). For more information, see the complete [list of security issue categories](../../organizations/managing-security-and-risk.md#supported-security-categories) +- **Security:** Potential security vulnerabilities, including hard-coded passwords and keys (secret scanning), vulnerable dependencies (software composition analysis or SCA), and insecure code patterns (static application security testing or SAST). For more information, see the complete [list of security issue categories](../../organizations/managing-security-and-risk.mdx#supported-security-categories) - **Documentation:** Methods and classes that don't have the correct comment annotations - **Best practice:** Code that doesn't follow the recommended coding standards and best practices - **Comprehensibility:** Code that can be difficult to understand and modify - +{/**/} Besides this, Codacy also allows you to compare issues across repositories with different sizes by showing **issues per thousand lines of code (kLoC)**. @@ -70,12 +61,12 @@ Codacy displays issues on the following places: |Place|Metric| |-----|------| -|[Commit detail page](../../repositories/commits.mdx)
[Pull request detail page](../../repositories/pull-requests.mdx)
[Email notifications](../../account/emails.md#managing-your-email-notifications)|Number of new and fixed issues introduced by the commit or pull request| -|[Files page](../../repositories/files.md)|Number of issues in each file| -|[Issues page](../../repositories/issues.md)|List of all issues detected in each branch| -|[Repository Dashboard](../../repositories/repository-dashboard.md)|Issues per 1000 lines of code| -|[Organization overview](../../organizations/organization-overview.md)|Average issues / kLoC of the repositories in your organization and issue / kLoC of each repository| -|[Repositories list page](../../organizations/managing-repositories.md)|Issues / kLoC in each repository in your organization| +|[Commit detail page](../../repositories/commits)
[Pull request detail page](../../repositories/pull-requests)
[Email notifications](../../account/emails.mdx#managing-your-email-notifications)|Number of new and fixed issues introduced by the commit or pull request| +|[Files page](../../repositories/files)|Number of issues in each file| +|[Issues page](../../repositories/issues)|List of all issues detected in each branch| +|[Repository Dashboard](../../repositories/repository-dashboard)|Issues per 1000 lines of code| +|[Organization overview](../../organizations/organization-overview)|Average issues / kLoC of the repositories in your organization and issue / kLoC of each repository| +|[Repositories list page](../../organizations/managing-repositories)|Issues / kLoC in each repository in your organization| ## Complexity @@ -84,18 +75,18 @@ Codacy uses [cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_com Codacy calculates complexity as follows: - The complexity value of a file is the total sum of the cyclomatic complexities of all methods within it. -- A file is considered complex if its cyclomatic complexity value is higher than the threshold [**File is complex when over**](../../repositories-configure/adjusting-quality-goals.md). +- A file is considered complex if its cyclomatic complexity value is higher than the threshold [**File is complex when over**](../../repositories-configure/adjusting-quality-goals). - The complexity value of a commit or pull request is calculated by summing the complexity differences of all changed files where the difference is 4 or more. Codacy displays complexity on the following places: |Place|Metric| |-----|------| -|[Commit detail page](../../repositories/commits.mdx)
[Pull request detail page](../../repositories/pull-requests.mdx)
[Email notifications](../../account/emails.md#managing-your-email-notifications)|The complexity variation introduced by a commit or pull request is calculated by summing the complexity differences of all changed files where the difference is 4 or more. -|[Files page](../../repositories/files.md)|The file complexity value is the sum of the complexity values of all methods defined within the file| -|[Repository Dashboard](../../repositories/repository-dashboard.md)|Percentage of complex files in your repository and how the metric is evolving over time| -|[Organization overview](../../organizations/organization-overview.md)|Average percentage of complex files in the repositories in your organization and percentage of complex files in each repository| -|[Repositories list page](../../organizations/managing-repositories.md)|Percentage of complex files in each repository in your organization| +|[Commit detail page](../../repositories/commits)
[Pull request detail page](../../repositories/pull-requests)
[Email notifications](../../account/emails.mdx#managing-your-email-notifications)|The complexity variation introduced by a commit or pull request is calculated by summing the complexity differences of all changed files where the difference is 4 or more. +|[Files page](../../repositories/files)|The file complexity value is the sum of the complexity values of all methods defined within the file| +|[Repository Dashboard](../../repositories/repository-dashboard)|Percentage of complex files in your repository and how the metric is evolving over time| +|[Organization overview](../../organizations/organization-overview)|Average percentage of complex files in the repositories in your organization and percentage of complex files in each repository| +|[Repositories list page](../../organizations/managing-repositories)|Percentage of complex files in each repository in your organization| ## Duplication @@ -104,34 +95,34 @@ Codacy identifies clones or [sequences of duplicate code](https://en.wikipedia.o Codacy calculates duplication as follows: - The duplication value for each file is the number of clones in the file. -- A file is considered duplicated if the number of clones in the file is higher than the threshold [**File is duplicated when over**](../../repositories-configure/adjusting-quality-goals.md). +- A file is considered duplicated if the number of clones in the file is higher than the threshold [**File is duplicated when over**](../../repositories-configure/adjusting-quality-goals.mdx). - The duplication value of a commit or pull request is the number of clones introduced by the commit or pull request. :::note -You can [customize the rules for identifying duplicated blocks of code](../../repositories-configure/codacy-configuration-file.md#pmd-cpd-duplication) when using PMD CPD to analyze the source code of your repository. +You can [customize the rules for identifying duplicated blocks of code](../../repositories-configure/codacy-configuration-file.mdx#pmd-cpd-duplication) when using PMD CPD to analyze the source code of your repository. ::: Codacy displays duplication on the following places: |Place|Metric| |-----|------| -|[Commit detail page](../../repositories/commits.mdx)
[Pull request detail page](../../repositories/pull-requests.mdx)
[Email notifications](../../account/emails.md#managing-your-email-notifications)|Number of clones added or fixed by a commit or pull request| -|[Files page](../../repositories/files.md)|Duplication value of each file| -|[Repository Dashboard](../../repositories/repository-dashboard.md)|Percentage of duplicated files in your repository and how the metric is evolving over time| -|[Organization overview](../../organizations/organization-overview.md)|Average percentage of duplicated files in the repositories in your organization and percentage of complex files in each repository| -|[Repositories list page](../../organizations/managing-repositories.md)|Percentage of duplicated files in each repository in your organization| +|[Commit detail page](../../repositories/commits)
[Pull request detail page](../../repositories/pull-requests)
[Email notifications](../../account/emails.mdx#managing-your-email-notifications)|Number of clones added or fixed by a commit or pull request| +|[Files page](../../repositories/files)|Duplication value of each file| +|[Repository Dashboard](../../repositories/repository-dashboard)|Percentage of duplicated files in your repository and how the metric is evolving over time| +|[Organization overview](../../organizations/organization-overview)|Average percentage of duplicated files in the repositories in your organization and percentage of complex files in each repository| +|[Repositories list page](../../organizations/managing-repositories)|Percentage of duplicated files in each repository in your organization| ## Code coverage Code coverage describes the degree to which the source code of a program is tested. There are several types of coverage, but Codacy uses line coverage, which measures the percentage of coverable lines of code that are covered by automated tests. [Learn more about code coverage](https://blog.codacy.com/a-guide-to-code-coverage-part-1-code-coverage-explained/) on Codacy's blog. -You must set up your CI/CD pipeline to [upload code coverage data to Codacy](../../coverage-reporter/index.md). Because of this, the tool that you use to generate the coverage reports is responsible for creating the data that Codacy then uses to calculate code coverage. +You must set up your CI/CD pipeline to [upload code coverage data to Codacy](../../coverage-reporter/index.mdx). Because of this, the tool that you use to generate the coverage reports is responsible for creating the data that Codacy then uses to calculate code coverage. Codacy calculates code coverage as follows: - The coverage value for each file is the percentage of coverable lines that are covered by tests in the file. If a line is covered multiple times, Codacy counts it as a single covered line when calculating coverage. -- A repository is considered to have acceptable coverage if the percentage of coverable lines that are covered by tests in the repository is higher than the threshold [**Coverage is under**](../../repositories-configure/adjusting-quality-goals.md). - +- A repository is considered to have acceptable coverage if the percentage of coverable lines that are covered by tests in the repository is higher than the threshold [**Coverage is under**](../../repositories-configure/adjusting-quality-goals.mdx). +{/**/} - The **coverage variation** of a commit or pull request is the increase or drop in the percentage of coverable lines that are covered by tests in the repository because of the changes of the commit or pull request. - The **diff coverage** of a pull request is the percentage of **coverable lines** that the pull request **added or modified** that are covered by tests. @@ -139,26 +130,26 @@ Codacy calculates code coverage as follows: - Deleted lines - Added or modified lines that aren't coverable - +{/**/} :::note -If you encounter a situation where Codacy shows an unexpected drop in coverage, learn about [the most common reasons causing those scenarios](why-does-codacy-show-unexpected-coverage-changes.md). +If you encounter a situation where Codacy shows an unexpected drop in coverage, learn about [the most common reasons causing those scenarios](./why-does-codacy-show-unexpected-coverage-changes). ::: Once the coverage setup is complete, Codacy displays coverage data on the following places: |Place|Metric| |-----|------| -|[Commit detail page](../../repositories/commits.mdx)
[Pull request detail page](../../repositories/pull-requests.mdx)
[Email notifications](../../account/emails.md#managing-your-email-notifications)|Variation in percentage points of the coverage value for all files in the commit or pull request| -|[Pull request detail page](../../repositories/pull-requests.mdx)|Diff coverage for the changes included in the pull request| -|[Files page](../../repositories/files.md)|Coverage percentage of each file| -|[Repository Dashboard](../../repositories/repository-dashboard.md)|Coverage of the most recent commit of the selected branch and its evolution over time| -|[Codacy badge](../../getting-started/adding-a-codacy-badge.md)|Coverage of the most recent commit of the configured branch| -|[Organization overview](../../organizations/organization-overview.md)|Average coverage of the repositories in your organization and coverage of each repository| -|[Repositories list page](../../organizations/managing-repositories.md)|Coverage of each repository in your organization| +|[Commit detail page](../../repositories/commits)
[Pull request detail page](../../repositories/pull-requests)
[Email notifications](../../account/emails.mdx#managing-your-email-notifications)|Variation in percentage points of the coverage value for all files in the commit or pull request| +|[Pull request detail page](../../repositories/pull-requests)|Diff coverage for the changes included in the pull request| +|[Files page](../../repositories/files)|Coverage percentage of each file| +|[Repository Dashboard](../../repositories/repository-dashboard)|Coverage of the most recent commit of the selected branch and its evolution over time| +|[Codacy badge](../../getting-started/adding-a-codacy-badge)|Coverage of the most recent commit of the configured branch| +|[Organization overview](../../organizations/organization-overview)|Average coverage of the repositories in your organization and coverage of each repository| +|[Repositories list page](../../organizations/managing-repositories)|Coverage of each repository in your organization| ## See also - [Diff coverage: we have a new metric and quality gate rule for PRs](https://blog.codacy.com/diff-coverage/) -- [Why does Codacy show unexpected coverage changes?](why-does-codacy-show-unexpected-coverage-changes.md) -- [Does Codacy place limits on the code analysis?](does-codacy-place-limits-on-the-code-analysis.md) +- [Why does Codacy show unexpected coverage changes?](./why-does-codacy-show-unexpected-coverage-changes) +- [Does Codacy place limits on the code analysis?](./does-codacy-place-limits-on-the-code-analysis) diff --git a/docusaurus/docs/faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md b/docusaurus/docs/faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.mdx similarity index 95% rename from docusaurus/docs/faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md rename to docusaurus/docs/faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.mdx index 79ecf79170..c31146f469 100644 --- a/docusaurus/docs/faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md +++ b/docusaurus/docs/faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.mdx @@ -84,7 +84,7 @@ There are several reasons that could cause Codacy to report unexpected coverage - Ignoring files on Codacy vs ignoring files on the coverage report. - [Updating the list of ignored files](../../repositories-configure/ignoring-files.md) won't have an impact on the amount of coverable and covered lines of the commits that Codacy compares to calculate the coverage variation metric. Codacy calculates Coverage based solely on what is included in the coverage report. Therefore, if there are files you wish to keep from being included in the calculation, you should ensure they are not included in the coverage report. + [Updating the list of ignored files](../../repositories-configure/ignoring-files) won't have an impact on the amount of coverable and covered lines of the commits that Codacy compares to calculate the coverage variation metric. Codacy calculates Coverage based solely on what is included in the coverage report. Therefore, if there are files you wish to keep from being included in the calculation, you should ensure they are not included in the coverage report. - External factors affecting the execution of tests. @@ -245,7 +245,7 @@ Consider an example pull request where Codacy shows the following metrics: However, since the proportion between the total number of covered and coverable lines across all files in the repository is now different, there can be a drop in the coverage variation for the pull request. :::caution -If you're using the [gate **Coverage variation is under**](../../repositories-configure/adjusting-quality-gates.md), configure at least a **-0.10% coverage variation margin** to ensure that developers aren't blocked while performing code refactors such as the one from this example. +If you're using the [gate **Coverage variation is under**](../../repositories-configure/adjusting-quality-gates), configure at least a **-0.10% coverage variation margin** to ensure that developers aren't blocked while performing code refactors such as the one from this example. ::: The table below represents two example coverage reports reflecting a pull request that removes lines 5 and 6 of the file `ClassA.java`: @@ -373,5 +373,5 @@ The table below displays the code coverage metrics as calculated by Codacy: ## See also -- [Which metrics does Codacy calculate?](which-metrics-does-codacy-calculate.md#code-coverage) -- [Adding coverage to your repository](../../coverage-reporter/index.md) +- [Which metrics does Codacy calculate?](which-metrics-does-codacy-calculate#code-coverage) +- [Adding coverage to your repository](../../coverage-reporter/index.mdx) diff --git a/docusaurus/docs/faq/general/does-codacy-keep-audit-logs.md b/docusaurus/docs/faq/general/does-codacy-keep-audit-logs.mdx similarity index 71% rename from docusaurus/docs/faq/general/does-codacy-keep-audit-logs.md rename to docusaurus/docs/faq/general/does-codacy-keep-audit-logs.mdx index 4db5da8ffb..52c76fedf0 100644 --- a/docusaurus/docs/faq/general/does-codacy-keep-audit-logs.md +++ b/docusaurus/docs/faq/general/does-codacy-keep-audit-logs.mdx @@ -2,7 +2,6 @@ title: Does Codacy keep audit logs for my organization? --- - On [Business plan](https://www.codacy.com/pricing), Codacy logs significant organization events that can be retrieved for audit reporting. -See [Audit logs for organizations](../../organizations/audit-logs-for-organizations.md) for the complete list of events that Codacy logs, and how to obtain audit log data. +See [Audit logs for organizations](../../organizations/audit-logs-for-organizations) for the complete list of events that Codacy logs, and how to obtain audit log data. diff --git a/docusaurus/docs/faq/general/how-can-i-change-or-cancel-my-plan.md b/docusaurus/docs/faq/general/how-can-i-change-or-cancel-my-plan.mdx similarity index 87% rename from docusaurus/docs/faq/general/how-can-i-change-or-cancel-my-plan.md rename to docusaurus/docs/faq/general/how-can-i-change-or-cancel-my-plan.mdx index 33cfd02202..61677334dd 100644 --- a/docusaurus/docs/faq/general/how-can-i-change-or-cancel-my-plan.md +++ b/docusaurus/docs/faq/general/how-can-i-change-or-cancel-my-plan.mdx @@ -9,9 +9,9 @@ Codacy values feedback and we thank you in advance for letting us know the prima ## If you're using Codacy Cloud -If you're using Codacy Cloud see [how to change the plan and billing of your Codacy organization](../../organizations/changing-your-plan-and-billing.md). +If you're using Codacy Cloud see [how to change the plan and billing of your Codacy organization](../../organizations/changing-your-plan-and-billing). -Alternatively, [delete your organization](../../organizations/what-are-organizations.md#deleting-an-organization) to remove all its repositories from Codacy and cancel your existing plan. +Alternatively, [delete your organization](../../organizations/what-are-organizations.mdx#deleting-an-organization) to remove all its repositories from Codacy and cancel your existing plan. ## If you're using Codacy Self-hosted @@ -21,4 +21,4 @@ If you decide to cancel your plan, please contact [support@codacy.com](mailto:su ## See also -- [Changing your plan and billing](../../organizations/changing-your-plan-and-billing.md) +- [Changing your plan and billing](../../organizations/changing-your-plan-and-billing) diff --git a/docusaurus/docs/faq/general/how-does-codacy-keep-my-data-secure.md b/docusaurus/docs/faq/general/how-does-codacy-keep-my-data-secure.mdx similarity index 99% rename from docusaurus/docs/faq/general/how-does-codacy-keep-my-data-secure.md rename to docusaurus/docs/faq/general/how-does-codacy-keep-my-data-secure.mdx index 36ff79a028..3056bdd5fe 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-keep-my-data-secure.md +++ b/docusaurus/docs/faq/general/how-does-codacy-keep-my-data-secure.mdx @@ -2,7 +2,6 @@ title: How does Codacy keep my data secure? --- - Keeping our customers' data protected at all times is our highest priority. This [security overview](https://security.codacy.com/) provides a high-level overview of the security practices put in place to achieve that objective. Have questions or feedback? Feel free to reach out to us at [security@codacy.com](mailto:security@codacy.com). diff --git a/docusaurus/docs/faq/general/how-does-codacy-protect-my-privacy.md b/docusaurus/docs/faq/general/how-does-codacy-protect-my-privacy.mdx similarity index 99% rename from docusaurus/docs/faq/general/how-does-codacy-protect-my-privacy.md rename to docusaurus/docs/faq/general/how-does-codacy-protect-my-privacy.mdx index 6d86e4fcc6..08b03003bc 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-protect-my-privacy.md +++ b/docusaurus/docs/faq/general/how-does-codacy-protect-my-privacy.mdx @@ -3,7 +3,6 @@ title: How does Codacy protect my privacy? description: At Codacy, keeping your personal data safe has always been a top priority and we look at GDPR as another opportunity for us to strengthen this commitment to you. --- - In May 2018 the new "General Data Protection Regulation" ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) came into effect. This regulation contains the most significant changes to European data privacy legislation in the last 20 years and gives you more control over your personal data and greater transparency on how it's used. At Codacy, keeping your personal data safe has always been a top priority and we took GDPR as another opportunity for us to strengthen this commitment to you. We've changed our data processing policies, operations, activities, and documentation as a response to GDPR and have updated our [Privacy Policy](https://www.codacy.com/privacy) to incorporate said changes and specifically reflect the new regulation. diff --git a/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-cloud.md b/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-cloud.mdx similarity index 96% rename from docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-cloud.md rename to docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-cloud.mdx index 98a1dc83e2..b163e8e61f 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-cloud.md +++ b/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-cloud.mdx @@ -2,13 +2,12 @@ title: How does Codacy support Bitbucket Cloud? --- - When you use Bitbucket Cloud to sign up or log into Codacy, the Bitbucket teams that you belong to will be available to be added as Organizations on Codacy. After adding a team: - Codacy displays the list of all repositories in that team so that you can add them to Codacy as repositories to be analyzed -- The members of the team will be able to [join or request to join Codacy](../../organizations/managing-people.md#joining) +- The members of the team will be able to [join or request to join Codacy](../../organizations/managing-people.mdx#joining) If you have repositories that don't belong to any team, you can still add those on Codacy directly under **My Repositories**. @@ -25,4 +24,4 @@ Currently, the integration between Codacy and Bitbucket Cloud has the following ## See also -- [What are organizations](../../organizations/what-are-organizations.md) +- [What are organizations](../../organizations/what-are-organizations) diff --git a/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-server.md b/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-server.mdx similarity index 93% rename from docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-server.md rename to docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-server.mdx index 58b92c6ff2..974042a11e 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-server.md +++ b/docusaurus/docs/faq/general/how-does-codacy-support-bitbucket-server.mdx @@ -2,13 +2,12 @@ title: How does Codacy support Bitbucket Server? --- - When you use Bitbucket Server to sign up or log into Codacy, the Bitbucket projects that you belong to will be available to be added as Organizations on Codacy. After adding a project: - Codacy displays the list of all repositories that you own in that project so that you can add them to Codacy as repositories to be analyzed -- The members of the project will be able to [join or request to join Codacy](../../organizations/managing-people.md#joining) +- The members of the project will be able to [join or request to join Codacy](../../organizations/managing-people.mdx#joining) ## Limitations @@ -20,10 +19,10 @@ Currently, the integration between Codacy and Bitbucket Server has the following - **Repositories that are moved between teams are not automatically transferred between Organizations on Codacy.** You must manually delete these repositories from their source Organization and add them to their new Organization. - **Personal repositories are not supported.** You can only add repositories to Codacy if they belong to a project. - **Codacy only sends commit and pull request notification emails to the authors of the commits and pull requests.** -- **[Pull request summaries](../../repositories-configure/integrations/bitbucket-integration.md#pull-request-summary) aren't available** +- **[Pull request summaries](../../repositories-configure/integrations/bitbucket-integration.mdx#pull-request-summary) aren't available** - **The Repositories screen doesn't include the "Last updated" date for each repository.** As such, the repositories are sorted alphabetically. - **Codacy doesn't analyze pull requests submitted from forked repositories.** ## See also -- [What are organizations](../../organizations/what-are-organizations.md) +- [What are organizations](../../organizations/what-are-organizations) diff --git a/docusaurus/docs/faq/general/how-does-codacy-support-github-enterprise.md b/docusaurus/docs/faq/general/how-does-codacy-support-github-enterprise.mdx similarity index 96% rename from docusaurus/docs/faq/general/how-does-codacy-support-github-enterprise.md rename to docusaurus/docs/faq/general/how-does-codacy-support-github-enterprise.mdx index 9516112544..bb20922463 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-support-github-enterprise.md +++ b/docusaurus/docs/faq/general/how-does-codacy-support-github-enterprise.mdx @@ -2,7 +2,6 @@ title: How does Codacy support GitHub Enterprise Cloud? --- - When you use GitHub Enterprise to sign up or log into Codacy, the GitHub Enterprise organizations, that you belong to, will be available to be added as Organizations on Codacy. After connecting with your Enterprise account Codacy displays the list of all organizations that you have access to in that Enterprise, and you can add to start analysing its repositories or join it. @@ -18,4 +17,4 @@ Currently, the integration between Codacy and GitHub Enterprise has the followin ## See also -- [How to manage your GitHub Enterprise organization](../../enterprise-cloud/github-enterprise-cloud.md) \ No newline at end of file +- [How to manage your GitHub Enterprise organization](../../enterprise-cloud/github-enterprise-cloud) \ No newline at end of file diff --git a/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-cloud.md b/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-cloud.mdx similarity index 94% rename from docusaurus/docs/faq/general/how-does-codacy-support-gitlab-cloud.md rename to docusaurus/docs/faq/general/how-does-codacy-support-gitlab-cloud.mdx index 21257e3d53..5e61535b4f 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-cloud.md +++ b/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-cloud.mdx @@ -8,9 +8,9 @@ When you use GitLab Cloud to sign up or log into Codacy, the GitLab Groups that After adding a Group: - Codacy displays the list of all repositories that you own in that Group and Subgroups so that you can add them to Codacy as repositories to be analyzed -- The members of the Group will be able to [join or request to join Codacy](../../organizations/managing-people.md#joining) +- The members of the Group will be able to [join or request to join Codacy](../../organizations/managing-people.mdx#joining) -If you have repositories that don't belong to any Group, you can still [add those on Codacy by choosing your "personal" organization](../../getting-started/codacy-quickstart.md#choosing-organization). +If you have repositories that don't belong to any Group, you can still [add those on Codacy by choosing your "personal" organization](../../getting-started/codacy-quickstart.mdx#choosing-organization). ## Limitations @@ -26,4 +26,4 @@ Currently, the integration between Codacy and GitLab Cloud has the following lim ## See also -- [What are organizations](../../organizations/what-are-organizations.md) +- [What are organizations](../../organizations/what-are-organizations) diff --git a/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-enterprise.md b/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-enterprise.mdx similarity index 92% rename from docusaurus/docs/faq/general/how-does-codacy-support-gitlab-enterprise.md rename to docusaurus/docs/faq/general/how-does-codacy-support-gitlab-enterprise.mdx index 41284a80d1..4aa4f52f7c 100644 --- a/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-enterprise.md +++ b/docusaurus/docs/faq/general/how-does-codacy-support-gitlab-enterprise.mdx @@ -8,9 +8,9 @@ When you use GitLab Enterprise to sign up or log into Codacy, the GitLab Groups After adding a Group: - Codacy displays the list of all repositories that you own in that Group and Subgroups so that you can add them to Codacy as repositories to be analyzed -- The members of the Group will be able to [join or request to join Codacy](../../organizations/managing-people.md#joining) +- The members of the Group will be able to [join or request to join Codacy](../../organizations/managing-people.mdx#joining) -If you have repositories that don't belong to any Group, you can still [add those on Codacy by choosing your "personal" organization](../../getting-started/codacy-quickstart.md#choosing-organization). +If you have repositories that don't belong to any Group, you can still [add those on Codacy by choosing your "personal" organization](../../getting-started/codacy-quickstart.mdx#choosing-organization). ## Limitations @@ -23,4 +23,4 @@ Currently, the integration between Codacy and GitLab Enterprise has the followin ## See also -- [What are organizations](../../organizations/what-are-organizations.md) +- [What are organizations](../../organizations/what-are-organizations) diff --git a/docusaurus/docs/faq/general/which-platforms-and-technologies-does-codacy-support.md b/docusaurus/docs/faq/general/which-platforms-and-technologies-does-codacy-support.mdx similarity index 96% rename from docusaurus/docs/faq/general/which-platforms-and-technologies-does-codacy-support.md rename to docusaurus/docs/faq/general/which-platforms-and-technologies-does-codacy-support.mdx index 7f9e4f3651..025bc110e2 100644 --- a/docusaurus/docs/faq/general/which-platforms-and-technologies-does-codacy-support.md +++ b/docusaurus/docs/faq/general/which-platforms-and-technologies-does-codacy-support.mdx @@ -19,7 +19,7 @@ Codacy supports repositories from the following Git providers: - + {/**/}
GitHub @@ -34,7 +34,7 @@ Codacy supports repositories from the following Git providers:

Codacy Self-hosted

- + {/**/} GitLab @@ -49,7 +49,7 @@ Codacy supports repositories from the following Git providers:

Codacy Self-hosted

- + {/**/} Bitbucket diff --git a/docusaurus/docs/faq/repositories/how-do-i-reanalyze-my-repository.mdx b/docusaurus/docs/faq/repositories/how-do-i-reanalyze-my-repository.mdx index 9a7d07edee..0d39aede5f 100644 --- a/docusaurus/docs/faq/repositories/how-do-i-reanalyze-my-repository.mdx +++ b/docusaurus/docs/faq/repositories/how-do-i-reanalyze-my-repository.mdx @@ -9,16 +9,16 @@ import AdminAccessControlInfo from '../../_includes/AdminAccessControlInfo.mdx' Reanalyze the last commit in your branch or pull request: - To update the Codacy analysis results taking into account the most recent configurations for your repository without waiting for a new commit to trigger the analysis -- If the grade or [Codacy badge](../../getting-started/adding-a-codacy-badge.md) for your branch is greyed out and displays an exclamation mark, which means that the analysis information isn't available for the last commit of the branch: +- If the grade or [Codacy badge](../../getting-started/adding-a-codacy-badge) for your branch is greyed out and displays an exclamation mark, which means that the analysis information isn't available for the last commit of the branch: ![Greyed-out Codacy badge and repository grade](images/codacy-badge-grade-gray.png) :::caution -- If you have the setting **Run analysis on your build server** enabled in your repository **Settings** page so that you can [run client-side tools](../../repositories-configure/local-analysis/client-side-tools.md), you can't trigger a new analysis from the Codacy UI. +- If you have the setting **Run analysis on your build server** enabled in your repository **Settings** page so that you can [run client-side tools](../../repositories-configure/local-analysis/client-side-tools.mdx), you can't trigger a new analysis from the Codacy UI. Instead, you must manually run the client-side tools or wait for them to report the results for a new commit. -- You can only reanalyze commits to branches or pull requests in your repository if the committer [is part of your organization](../../organizations/managing-people.md). +- You can only reanalyze commits to branches or pull requests in your repository if the committer [is part of your organization](../../organizations/managing-people). ::: @@ -26,7 +26,7 @@ Reanalyze the last commit in your branch or pull request: To reanalyze a branch in your repository: -1. Open the **Commits** page for your repository and select the correct branch at the top of the page if you configured Codacy to [analyze multiple branches](../../repositories-configure/managing-branches.mdx). +1. Open the **Commits** page for your repository and select the correct branch at the top of the page if you configured Codacy to [analyze multiple branches](../../repositories-configure/managing-branches). Then, select the most recent commit for that branch at the top of the list: diff --git a/docusaurus/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md b/docusaurus/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.mdx similarity index 99% rename from docusaurus/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md rename to docusaurus/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.mdx index 938c435667..27ae7725bd 100644 --- a/docusaurus/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.md +++ b/docusaurus/docs/faq/repositories/i-moved-my-repository-on-the-git-provider.mdx @@ -2,7 +2,6 @@ title: I moved my repository on the Git provider --- - Currently, Codacy doesn't automatically detect moves of repositories between two organizations. To ensure that Codacy continues to analyze a repository that was moved to another organization on your Git provider: diff --git a/docusaurus/docs/faq/repositories/i-renamed-my-repository-on-the-git-provider.md b/docusaurus/docs/faq/repositories/i-renamed-my-repository-on-the-git-provider.mdx similarity index 99% rename from docusaurus/docs/faq/repositories/i-renamed-my-repository-on-the-git-provider.md rename to docusaurus/docs/faq/repositories/i-renamed-my-repository-on-the-git-provider.mdx index 0de27e7f23..b5f3cc271b 100644 --- a/docusaurus/docs/faq/repositories/i-renamed-my-repository-on-the-git-provider.md +++ b/docusaurus/docs/faq/repositories/i-renamed-my-repository-on-the-git-provider.mdx @@ -2,7 +2,6 @@ title: I renamed my repository on the Git provider --- - If you changed the name or URL of your repository on your Git provider, you can update the name and URL of the repository on Codacy to point to the new location. This ensures that you won't lose historical data about your repository on Codacy. To rename your repository on Codacy, open the page **Settings** and click the button **Update repository**. diff --git a/docusaurus/docs/faq/troubleshooting/error-line-endings.md b/docusaurus/docs/faq/troubleshooting/error-line-endings.mdx similarity index 97% rename from docusaurus/docs/faq/troubleshooting/error-line-endings.md rename to docusaurus/docs/faq/troubleshooting/error-line-endings.mdx index 26a2853b1e..4e8a71a174 100644 --- a/docusaurus/docs/faq/troubleshooting/error-line-endings.md +++ b/docusaurus/docs/faq/troubleshooting/error-line-endings.mdx @@ -2,12 +2,11 @@ title: Error caused by incompatible line endings --- - Codacy executes the `git diff` command when analyzing new commits and pull requests to identify the lines of code that were changed. Codacy then uses this information to display the issues that were caused by the changes introduced by the commits or pull requests. If you have files in your repository that use the carriage return (CR) as the line end control character, the command `git diff` doesn't correctly identify line endings in the changed files. Because of this, Codacy is unable to use the output of the command and the **Diff** step of your commit or pull request analysis logs will display the message `An error occurred during this step. Please, retry your analysis or contact support`. -![Viewing the analysis logs](images/error-line-endings.png) +![Viewing the analysis logs](./images/error-line-endings.png) The CR line end control character was used by older Classic Mac OS systems, and for the sake of interoperability it's recommended that you: diff --git a/docusaurus/docs/faq/troubleshooting/not-a-member-of-the-organization.md b/docusaurus/docs/faq/troubleshooting/not-a-member-of-the-organization.mdx similarity index 82% rename from docusaurus/docs/faq/troubleshooting/not-a-member-of-the-organization.md rename to docusaurus/docs/faq/troubleshooting/not-a-member-of-the-organization.mdx index 73f283c63a..61aa6f78ea 100644 --- a/docusaurus/docs/faq/troubleshooting/not-a-member-of-the-organization.md +++ b/docusaurus/docs/faq/troubleshooting/not-a-member-of-the-organization.mdx @@ -2,8 +2,7 @@ title: Not a member of the organization --- - -When you see the message **Not a member of the organization** it means that Codacy Cloud can't analyze a commit because the associated email address doesn't belong to any [member or committer of your Codacy organization](../../organizations/managing-people.md). +When you see the message **Not a member of the organization** it means that Codacy Cloud can't analyze a commit because the associated email address doesn't belong to any [member or committer of your Codacy organization](../../organizations/managing-people). You can check which email address is associated with a commit by hovering the cursor on the name of the committer on the page for the commit: @@ -17,12 +16,12 @@ There may be different reasons for this issue to happen: - **The user making the commit hasn't signed in to Codacy Cloud and joined the organization yet** - The user must [join the organization](../../organizations/managing-people.md#joining) or, if you're the organization admin, you can [add the user](../../organizations/managing-people.md#adding-people) instead. + The user must [join the organization](../../organizations/managing-people.mdx#joining) or, if you're the organization admin, you can [add the user](../../organizations/managing-people.mdx#adding-people) instead. - **The commit email address isn't associated with the account of a Codacy Cloud user** - Make sure the user [updates the email addresses associated with their Codacy account](../../account/emails.md#updating) to include the missing commit email address. + Make sure the user [updates the email addresses associated with their Codacy account](../../account/emails.mdx#updating) to include the missing commit email address. - **Git isn't configured with the correct email address** - Make sure the user [sets the Git email address](../../account/emails.md#git-config) correctly. + Make sure the user [sets the Git email address](../../account/emails.mdx#git-config) correctly. diff --git a/docusaurus/docs/faq/troubleshooting/we-no-longer-have-access-to-this-repository.md b/docusaurus/docs/faq/troubleshooting/we-no-longer-have-access-to-this-repository.mdx similarity index 84% rename from docusaurus/docs/faq/troubleshooting/we-no-longer-have-access-to-this-repository.md rename to docusaurus/docs/faq/troubleshooting/we-no-longer-have-access-to-this-repository.mdx index f90e4f3bce..39dca5c708 100644 --- a/docusaurus/docs/faq/troubleshooting/we-no-longer-have-access-to-this-repository.md +++ b/docusaurus/docs/faq/troubleshooting/we-no-longer-have-access-to-this-repository.mdx @@ -3,7 +3,6 @@ title: We no longer have access to this repository, check your SSH keys description: Troubleshoot and fix issues that prevent Codacy from cloning your private repository, such as moving the repository or changing the permissions of the user that added the repository to Codacy. --- - Some changes on your Git provider can prevent Codacy from cloning your private repository. When this happens, Codacy displays the error message "We no longer have access to this repository" on the Repository Dashboard page. ## The repository was renamed or moved @@ -31,9 +30,9 @@ If the user that initially configured the repository on Codacy was using a user This is only possible if the user configuring the integration with the remote Git provider has administrator access to the repository. Otherwise, this operation will fail. Alternatively, you can do this process manually by copying the SSH key. :::note - If [your repository is using submodules on Codacy](../../repositories-configure/using-submodules.md), add a new SSH user key to your Git provider account instead. + If [your repository is using submodules on Codacy](../../repositories-configure/using-submodules), add a new SSH user key to your Git provider account instead. ::: - ![Generate new key](images/we-no-longer-have-access-to-this-repository-new-key.png) + ![Generate new key](./images/we-no-longer-have-access-to-this-repository-new-key.png) -1. Open the tab **Integrations**, and refresh your [GitLab](../../repositories-configure/integrations/gitlab-integration.md#refreshing) or [Bitbucket](../../repositories-configure/integrations/bitbucket-integration.md#refreshing) integration. +1. Open the tab **Integrations**, and refresh your [GitLab](../../repositories-configure/integrations/gitlab-integration.mdx#refreshing) or [Bitbucket](../../repositories-configure/integrations/bitbucket-integration.mdx#refreshing) integration. diff --git a/docusaurus/docs/faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md b/docusaurus/docs/faq/troubleshooting/why-arent-duplication-metrics-being-calculated.mdx similarity index 78% rename from docusaurus/docs/faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md rename to docusaurus/docs/faq/troubleshooting/why-arent-duplication-metrics-being-calculated.mdx index 6b39fa5837..50259bede1 100644 --- a/docusaurus/docs/faq/troubleshooting/why-arent-duplication-metrics-being-calculated.md +++ b/docusaurus/docs/faq/troubleshooting/why-arent-duplication-metrics-being-calculated.mdx @@ -2,7 +2,6 @@ title: Why aren't duplication metrics being calculated? --- - For performance reasons, Codacy skips the calculation of code duplication for programming languages that have more than 5000 source code files in a repository. Besides this, if Codacy fails to calculate code duplication for a specific programming language in a repository three times in a row (for example, because the tool calculating the analysis runs out of memory or times out), Codacy stops trying to analyze the metric for that language and repository. @@ -11,17 +10,17 @@ When this happens, Codacy doesn't display code duplication metrics for the affec - The **Files** page on your repository displays a blank duplication value for files of the affected language. - ![Duplication in the Files page](images/duplication-files.png) + ![Duplication in the Files page](./images/duplication-files.png) - The **Commits** and **Pull Request** pages display an empty **Duplication** tab. - ![New duplication for a commit](images/duplication-commits.png) + ![New duplication for a commit](./images/duplication-commits.png) - The analysis logs for commits won't display a duplication analysis task for the tool corresponding to the affected language. As a workaround, if you're exceeding the maximum number of source code files: -1. Use a [Codacy configuration file](../../repositories-configure/codacy-configuration-file.md) to exclude source code files of the affected language from your project to decrease the number of files to be analyzed. +1. Use a [Codacy configuration file](../../repositories-configure/codacy-configuration-file) to exclude source code files of the affected language from your project to decrease the number of files to be analyzed. For example, you may be able to exclude files that are automatically generated from your test suite or files belonging to dependencies that aren't maintained by your team, such as the `node_modules` folder for JavaScript projects. @@ -31,8 +30,8 @@ If the analysis finishes but the code duplication metric wasn't calculated, foll - **If you're using Codacy Self-hosted**, open the **Admin panel**, **Repositories**, select the repository, tab **Settings**, and reset the code duplication analysis in **Duplication settings**. Then, reanalyze the last commit in the repository so that Codacy runs the code duplication analysis. - ![Resetting the failed duplication analysis](images/duplication-metrics-reset.png) + ![Resetting the failed duplication analysis](./images/duplication-metrics-reset.png) -- **If you're [analyzing your repository locally](../../repositories-configure/local-analysis/client-side-tools.md)** with the Codacy Analysis CLI, consider using the flag `--tool-timeout` to specify a larger timeout for the execution of the tool. +- **If you're [analyzing your repository locally](../../repositories-configure/local-analysis/client-side-tools)** with the Codacy Analysis CLI, consider using the flag `--tool-timeout` to specify a larger timeout for the execution of the tool. - **If you're using Codacy Cloud** or if the steps above didn't solve the issue, please contact us at [support@codacy.com](mailto:support@codacy.com). diff --git a/docusaurus/docs/faq/troubleshooting/why-cant-i-see-my-organization.md b/docusaurus/docs/faq/troubleshooting/why-cant-i-see-my-organization.mdx similarity index 69% rename from docusaurus/docs/faq/troubleshooting/why-cant-i-see-my-organization.md rename to docusaurus/docs/faq/troubleshooting/why-cant-i-see-my-organization.mdx index cfa13e22b1..7ce0c47705 100644 --- a/docusaurus/docs/faq/troubleshooting/why-cant-i-see-my-organization.md +++ b/docusaurus/docs/faq/troubleshooting/why-cant-i-see-my-organization.mdx @@ -3,10 +3,9 @@ title: Why can't I see my organization? description: Try these steps if you don't see your organization when adding your organization on Codacy. --- +If you can't [add your organization to Codacy](../../organizations/what-are-organizations.mdx#adding-an-organization) because it doesn't appear on the Organizations page, please try re-adding your Git provider by clicking **Add provider** on the Organizations page: -If you can't [add your organization to Codacy](../../organizations/what-are-organizations.md#adding-an-organization) because it doesn't appear on the Organizations page, please try re-adding your Git provider by clicking **Add provider** on the Organizations page: - -![Refreshing the list of organizations](images/organization-refresh-list.png) +![Refreshing the list of organizations](./images/organization-refresh-list.png) If you still can't see your organization on Codacy, follow the steps below to check if the issue is solved: @@ -16,7 +15,7 @@ If you still can't see your organization on Codacy, follow the steps below to ch 1. **If you're using GitHub** [install and authorize Codacy on your organization](https://github.com/apps/codacy-production/installations/new). -1. [Revoke Codacy's OAuth integration](../../getting-started/which-permissions-does-codacy-need-from-my-account.md#revoking-access-to-integrations) with your Git provider and log in again to Codacy. +1. [Revoke Codacy's OAuth integration](../../getting-started/which-permissions-does-codacy-need-from-my-account.mdx#revoking-access-to-integrations) with your Git provider and log in again to Codacy. ![Revoking Codacy's OAuth integration](../../getting-started/images/revoke-integration.png) diff --git a/docusaurus/docs/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md b/docusaurus/docs/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.mdx similarity index 89% rename from docusaurus/docs/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md rename to docusaurus/docs/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.mdx index e99dc4119e..fcf6d51a71 100644 --- a/docusaurus/docs/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md +++ b/docusaurus/docs/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.mdx @@ -2,7 +2,6 @@ title: Why did Codacy stop commenting on pull requests? --- - ## Outdated app permissions :::note[This section applies to Codacy Coverage on GitHub] @@ -10,9 +9,9 @@ title: Why did Codacy stop commenting on pull requests? Coverage information is currently sent to GitHub by a new version of the Codacy Coverage engine, which depends on updated app permissions. -If you stopped receiving coverage summaries on your pull requests, please [review and accept the updated Codacy app permissions on GitHub](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/reviewing-and-modifying-installed-github-apps#reviewing-permissions). For more information on the rollout of the new Coverage engine, [see the relevant release note](../../release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks.md). +If you stopped receiving coverage summaries on your pull requests, please [review and accept the updated Codacy app permissions on GitHub](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/reviewing-and-modifying-installed-github-apps#reviewing-permissions). For more information on the rollout of the new Coverage engine, [see the relevant release note](../../release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks). -## Outdated permissions or invalid SSH key {#outdated-permissions} +## Outdated permissions or invalid SSH key \{#outdated-permissions\} :::note[This section applies to GitLab and Bitbucket] ::: @@ -24,7 +23,7 @@ To fix this issue and avoid future disruptions, refresh the GitLab or Bitbucket :::note The service account must: - - [Have administrator permissions](../../organizations/roles-and-permissions-for-organizations.md) on the repositories to integrate with Codacy + - [Have administrator permissions](../../organizations/roles-and-permissions-for-organizations) on the repositories to integrate with Codacy - Not be shared by other systems to ensure that Codacy doesn't hit the API rate limits of the Git provider when using this account ::: @@ -44,10 +43,10 @@ To fix this issue and avoid future disruptions, refresh the GitLab or Bitbucket 1. Make sure the Git provider integration is configured as needed: - - [Configuring the GitLab integration](../../repositories-configure/integrations/gitlab-integration.md#configuring) + - [Configuring the GitLab integration](../../repositories-configure/integrations/gitlab-integration.mdx#configuring) - - [Configuring the Bitbucket integration](../../repositories-configure/integrations/bitbucket-integration.md#configuring) + - [Configuring the Bitbucket integration](../../repositories-configure/integrations/bitbucket-integration.mdx#configuring) ## See also -- [We no longer have access to this repository, check your SSH keys](we-no-longer-have-access-to-this-repository.md) +- [We no longer have access to this repository, check your SSH keys](we-no-longer-have-access-to-this-repository) diff --git a/docusaurus/docs/faq/troubleshooting/why-is-my-file-over-150-kb-missing.md b/docusaurus/docs/faq/troubleshooting/why-is-my-file-over-150-kb-missing.mdx similarity index 92% rename from docusaurus/docs/faq/troubleshooting/why-is-my-file-over-150-kb-missing.md rename to docusaurus/docs/faq/troubleshooting/why-is-my-file-over-150-kb-missing.mdx index fb7f2f24e7..6917df512d 100644 --- a/docusaurus/docs/faq/troubleshooting/why-is-my-file-over-150-kb-missing.md +++ b/docusaurus/docs/faq/troubleshooting/why-is-my-file-over-150-kb-missing.mdx @@ -2,8 +2,7 @@ title: Why is my file over 150 KB missing? --- - -Codacy Cloud currently [doesn't analyze files that are larger than 150 KB](../code-analysis/does-codacy-place-limits-on-the-code-analysis.md). Codacy doesn't display these files on the [Files page](../../repositories/files.md), and doesn't take them into account when grading your repository. +Codacy Cloud currently [doesn't analyze files that are larger than 150 KB](../code-analysis/does-codacy-place-limits-on-the-code-analysis). Codacy doesn't display these files on the [Files page](../../repositories/files), and doesn't take them into account when grading your repository. ## Why is there a limit? @@ -32,7 +31,7 @@ To update the file size limit: maxFileSizeBytes: 150000 ``` -1. Apply the new configuration by performing a Helm upgrade and specifying the Codacy Self-hosted version currently installed. To do so execute the command [used to install Codacy](../../chart/index.md#helm-upgrade): +1. Apply the new configuration by performing a Helm upgrade and specifying the Codacy Self-hosted version currently installed. To do so execute the command [used to install Codacy](../../chart/index.mdx#helm-upgrade): :::caution **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. diff --git a/docusaurus/docs/faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md b/docusaurus/docs/faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.mdx similarity index 99% rename from docusaurus/docs/faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md rename to docusaurus/docs/faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.mdx index cb4db5a777..69a3d36d69 100644 --- a/docusaurus/docs/faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.md +++ b/docusaurus/docs/faq/troubleshooting/why-isnt-my-public-repository-being-analyzed.mdx @@ -2,5 +2,4 @@ title: Why isn't my public repository being analyzed? --- - Codacy only analyzes open source repositories if the admin of the repository is a committer to that repository. diff --git a/docusaurus/docs/getting-started/_order.ts b/docusaurus/docs/getting-started/_order.ts index 3451473ceb..88c65db09d 100644 --- a/docusaurus/docs/getting-started/_order.ts +++ b/docusaurus/docs/getting-started/_order.ts @@ -6,12 +6,11 @@ export const gettingStartedOrder = [ type: 'category' as const, label: 'Integrating Codacy with your IDE', items: [ - 'getting-started/configure-ide/integrating-codacy-with-intellij-ides', - 'getting-started/configure-ide/integrating-codacy-with-visual-studio-code', + 'getting-started/integrating-codacy-with-intellij-ides', + 'getting-started/integrating-codacy-with-visual-studio-code', ], }, 'getting-started/supported-languages-and-tools', 'getting-started/which-permissions-does-codacy-need-from-my-account', 'getting-started/adding-a-codacy-badge', ]; - diff --git a/docusaurus/docs/getting-started/adding-a-codacy-badge.md b/docusaurus/docs/getting-started/adding-a-codacy-badge.mdx similarity index 63% rename from docusaurus/docs/getting-started/adding-a-codacy-badge.md rename to docusaurus/docs/getting-started/adding-a-codacy-badge.mdx index 7cecf064f0..a2b62e9b8b 100644 --- a/docusaurus/docs/getting-started/adding-a-codacy-badge.md +++ b/docusaurus/docs/getting-started/adding-a-codacy-badge.mdx @@ -2,18 +2,18 @@ title: Adding a Codacy badge --- +Add a Codacy badge to the README of your repository to display the current [code quality grade](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#grade) or [code coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#code-coverage) of your repository. -Add a Codacy badge to the README of your repository to display the current [code quality grade](../faq/code-analysis/which-metrics-does-codacy-calculate.md#grade) or [code coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.md#code-coverage) of your repository. - +{/**/} ![Codacy badge on the codacy/docs README](images/codacy-badge-example.png) - +{/**/} -To obtain your Codacy badge, open your repository **Settings**, tab **General**, select the markup language, and copy the generated code to your README file. You can also add a badge for your coverage if you have [set up code coverage](../coverage-reporter/index.md) for your repository. +To obtain your Codacy badge, open your repository **Settings**, tab **General**, select the markup language, and copy the generated code to your README file. You can also add a badge for your coverage if you have [set up code coverage](../coverage-reporter/) for your repository. ![Codacy badge](images/codacy-badge.png) -To display the grade or code coverage information of a [different branch](../repositories-configure/managing-branches.mdx) analyzed by Codacy, append `?branch=` to the URL of the badge. For example: +To display the grade or code coverage information of a [different branch](../repositories-configure/managing-branches) analyzed by Codacy, append `?branch=` to the URL of the badge. For example: ```text https://app.codacy.com/project/badge/Grade/cba8fd0874ac4f569f4f880e473cbac9?branch=dev @@ -27,7 +27,7 @@ The Codacy badges for your repository may become unavailable or grayed out if th To fix each badge: -- [Reanalyze the branch](../faq/repositories/how-do-i-reanalyze-my-repository.md#reanalyzing-a-branch) associated with the **code quality badge** -- Make sure that you're [generating and uploading code coverage reports](../../coverage-reporter/) for all the commits in the branch associated with the **coverage badge** +- [Reanalyze the branch](../faq/repositories/how-do-i-reanalyze-my-repository.mdx#reanalyzing-a-branch) associated with the **code quality badge** +- Make sure that you're [generating and uploading code coverage reports](../coverage-reporter/) for all the commits in the branch associated with the **coverage badge** -If these steps don't fix your Codacy badges it can mean that the badges are no longer valid. In this case, [repeat the steps above](#adding-a-codacy-badge) to replace the existing badges with new ones. +If these steps don't fix your Codacy badges it can mean that the badges are no longer valid. In this case, repeat the steps above to replace the existing badges with new ones. diff --git a/docusaurus/docs/getting-started/codacy-quickstart.mdx b/docusaurus/docs/getting-started/codacy-quickstart.mdx index 6585b905f4..bf871ba60a 100644 --- a/docusaurus/docs/getting-started/codacy-quickstart.mdx +++ b/docusaurus/docs/getting-started/codacy-quickstart.mdx @@ -37,15 +37,15 @@ To get started, head to [codacy.com](https://www. 1. [Choosing an organization](#choosing-organization) 1. [Adding repositories](#adding-repositories) -## 1. Signing-up ||signing-up|| +## 1. Signing-up \{#signing-up\} Sign up with a Git provider such as GitHub, GitLab, or Bitbucket. This links your Codacy user with your Git provider user, making it easier to add repositories to Codacy and invite your teammates. Codacy will request access to your Git provider during the authorization flow. [Check the permissions that Codacy requires and why](which-permissions-does-codacy-need-from-my-account). -## 2. Choosing an organization ||choosing-organization|| +## 2. Choosing an organization \{#choosing-organization\} -Now, you'll need to add or join the organizations that contain your repositories. The organization with the same name as your Git provider username contains your personal repositories. Read more about [organizations on Codacy](../../organizations/what-are-organizations). +Now, you'll need to add or join the organizations that contain your repositories. The organization with the same name as your Git provider username contains your personal repositories. Read more about [organizations on Codacy](../organizations/what-are-organizations). To start adding your repositories, select one of the organizations. @@ -55,7 +55,7 @@ If you can't see the organization you're looking for, [follow these troubleshoot ![Choosing an organization](../organizations/images/organization-add.png) -## 3. Adding repositories ||adding-repositories|| +## 3. Adding repositories \{#adding-repositories\} Next, add the repositories that you wish to analyze. Codacy begins an initial analysis as soon as you add a repository and sets everything up to ensure your next commits on that repository are analyzed. @@ -73,4 +73,4 @@ Click the repository name to navigate to the repository dashboard and see the [c ## Next steps -The first analysis is based on default tool and pattern configurations. It's now important that you configure your repository to integrate code analysis seamlessly into your existing pipeline. See how to [configure your repository to match the use cases of your team](configuring-your-repository.md). +The first analysis is based on default tool and pattern configurations. It's now important that you configure your repository to integrate code analysis seamlessly into your existing pipeline. See how to [configure your repository to match the use cases of your team](configuring-your-repository). diff --git a/docusaurus/docs/getting-started/configure-ide/_category_.json b/docusaurus/docs/getting-started/configure-ide/_category_.json deleted file mode 100644 index feda377e57..0000000000 --- a/docusaurus/docs/getting-started/configure-ide/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Integrating Codacy with your IDE" -} diff --git a/docusaurus/docs/getting-started/configuring-your-repository.mdx b/docusaurus/docs/getting-started/configuring-your-repository.mdx index 92a4f99a01..142ead8530 100644 --- a/docusaurus/docs/getting-started/configuring-your-repository.mdx +++ b/docusaurus/docs/getting-started/configuring-your-repository.mdx @@ -7,6 +7,8 @@ import NavMultistep from './../_includes/NavMultistep.mdx' +## Configuring your repository \{#configuring-your-repository\} + 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. You can optionally add coverage reports to detail how much of your code is covered by tests and unify your quality and coverage pipelines. You can generate coverage reports and upload them to Codacy using a range of options, such as CI/CD integration, CLI, Docker, GitHub action, and more. @@ -19,29 +21,29 @@ To configure your repository, follow these steps: ## 1. Ignoring files \{#ignoring-files\} -[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. +[Ignore any files and directories](../repositories-configure/ignoring-files) that aren't relevant for the Codacy analysis, such as generated code or any third-party libraries included in your repositories. ![Ignoring files](../repositories-configure/images/ignored-files.png) ## 2. Configuring code patterns \{#configuring-code-patterns\} -[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. +[Configure the tools and code patterns](../repositories-configure/configuring-code-patterns) 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) to ensure that your configuration detects potential security issues. :::tip -To ensure that multiple repositories consistently follow the same global tool and code pattern configurations, [use an organization coding standard](../organizations/using-coding-standards.md). +To ensure that multiple repositories consistently follow the same global tool and code pattern configurations, [use an organization coding standard](../organizations/using-coding-standards). ::: ![Configuring the tools and code patterns](../repositories-configure/images/code-patterns.png) ## 3. Adding coverage to your repository (optional) \{#adding-coverage\} -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). +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.mdx). 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**. ![Adding coverage to your repository](../coverage-reporter/images/coverage-codacy-ui.png) ## Next steps \{#next-steps\} -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. +Once you’re satisfied with your setup, [integrate Codacy with your Git workflow](./integrating-codacy-with-your-git-workflow) to flag potential issues, block problematic pull requests, and display other useful suggestions directly on your Git provider. :::tip -To showcase the current code quality grade and coverage, [add a Codacy badge to your repository](adding-a-codacy-badge.md). +To showcase the current code quality grade and coverage, [add a Codacy badge to your repository](./adding-a-codacy-badge). ::: diff --git a/docusaurus/docs/getting-started/configure-ide/integrating-codacy-with-intellij-ides.md b/docusaurus/docs/getting-started/integrating-codacy-with-intellij-ides.mdx similarity index 86% rename from docusaurus/docs/getting-started/configure-ide/integrating-codacy-with-intellij-ides.md rename to docusaurus/docs/getting-started/integrating-codacy-with-intellij-ides.mdx index 606f3bab7c..4a2cc1800a 100644 --- a/docusaurus/docs/getting-started/configure-ide/integrating-codacy-with-intellij-ides.md +++ b/docusaurus/docs/getting-started/integrating-codacy-with-intellij-ides.mdx @@ -12,11 +12,11 @@ The [Codacy IntelliJ plugin](https://github.com/codacy/codacy-intellij-extension The main view of the Codacy IntelliJ plugin provides a summary of the code quality and coverage changes introduced by the pull request of the currently checked-out branch. -![Main view](./../images/codacy-intellij-plugin-main-view.png) +![Main view](./images/codacy-intellij-plugin-main-view.png) In the main view, you can find the following information: -- The **Status** of the pull request, either up to standards or not up to standards, based on the [Gates](../repositories-configure/adjusting-quality-gates.md) set for the repository. +- The **Status** of the pull request, either up to standards or not up to standards, based on the [Gates](../repositories-configure/adjusting-quality-gates) set for the repository. - Any **issues** introduced or fixed by the pull request. These are the same issues you find in the [Issues tabs](../repositories/pull-requests.mdx#issues-tabs) in the Codacy app and are also visible in IntelliJ's Problems tab. @@ -33,10 +33,10 @@ In the main view, you can find the following information: :::note[The Codacy IntelliJ plugin is compatible with IntelliJ IDEA (Ultimate, Community), Android Studio, and Aqua.] ::: -1. Make sure that the repository you’re working on is analyzed by Codacy and that you have a [repository read](../organizations/roles-and-permissions-for-organizations.md) role or higher. +1. Make sure that the repository you’re working on is analyzed by Codacy and that you have a [repository read](../organizations/roles-and-permissions-for-organizations) role or higher. :::tip - If this is your first time using Codacy, see [how to add and analyze your first repository](./codacy-quickstart.md#adding-your-first-repository). + If this is your first time using Codacy, see [how to add and analyze your first repository](./codacy-quickstart.mdx#adding-your-first-repository). ::: 1. Install the plugin from the [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/23924-codacy) or through the [plugin settings panel](https://www.jetbrains.com/help/idea/managing-plugins.html) in your IntelliJ IDE. @@ -48,12 +48,12 @@ To see Codacy quality and coverage data for an open pull request, follow these s 1. Open the repository directory in your IntelliJ IDE. :::note - If the repository isn't on Codacy yet, [add it to Codacy](../organizations/managing-repositories.md#adding-a-repository) first. + If the repository isn't on Codacy yet, [add it to Codacy](../organizations/managing-repositories.mdx#adding-a-repository) first. ::: 1. Open the main view by clicking the **Codacy logo** in the left tool window bar. - ![Codacy main view](./../images/codacy-intellij-plugin-sign-in.png) + ![Codacy main view](./images/codacy-intellij-plugin-sign-in.png) 1. If you’re not signed in, click the **Sign in** button to authorize IntelliJ on Codacy. @@ -77,20 +77,20 @@ To review issues: 1. Open the **Problems tool window** (use `Ctrl+6` on Windows/Linux or `Cmd+6` on macOS) and select the **File** tab. - ![Navigate to a specific issue from the Problems tab](./../images/codacy-intellij-plugin-problems-tab.png) + ![Navigate to a specific issue from the Problems tab](./images/codacy-intellij-plugin-problems-tab.png) 1. Click the name of the issue you want to review. 1. Hover over a highlighted issue in the code editor to view available actions and suggested quick fixes, if available. - For a list of tools that support suggested fixes, see [Supported languages and tools](./supported-languages-and-tools.md#supported-languages-and-tools). + For a list of tools that support suggested fixes, see [Supported languages and tools](./supported-languages-and-tools). 1. Once you've addressed the problems in your code, push your changes to the Git provider so that Codacy analyzes the updated code. When the analysis is complete, the Codacy plugin automatically refreshes the pull request analysis result. You can also refresh the pull request data manually by clicking the Refresh Pull Request button in the main view. ## Running Codacy Guardrails -As of version [0.0.8](https://plugins.jetbrains.com/plugin/23924-codacy/versions/stable/840439), the IntelliJ plugin now supports Codacy Guardrails. To see how to get it quickly setup refer to our quickstart guide [here](../codacy-guardrails/codacy-guardrails-getting-started.md#how-to-install-quick-guide-jetbrains). +As of version [0.0.8](https://plugins.jetbrains.com/plugin/23924-codacy/versions/stable/840439), the IntelliJ plugin now supports Codacy Guardrails. To see how to get it quickly setup refer to our quickstart guide [here](../codacy-guardrails/codacy-guardrails-getting-started.mdx#how-to-install-quick-guide-jetbrains). ## See also diff --git a/docusaurus/docs/getting-started/configure-ide/integrating-codacy-with-visual-studio-code.md b/docusaurus/docs/getting-started/integrating-codacy-with-visual-studio-code.mdx similarity index 86% rename from docusaurus/docs/getting-started/configure-ide/integrating-codacy-with-visual-studio-code.md rename to docusaurus/docs/getting-started/integrating-codacy-with-visual-studio-code.mdx index 2d14eabc40..d7d215bf78 100644 --- a/docusaurus/docs/getting-started/configure-ide/integrating-codacy-with-visual-studio-code.md +++ b/docusaurus/docs/getting-started/integrating-codacy-with-visual-studio-code.mdx @@ -18,25 +18,25 @@ The main view of the extension displays information about the code quality and c - [Open pull requests](#open-pull-requests-tab) - [Analyzed branch](#analyzed-branch-tab) -![Important issues](./../images/codacy-vscode-extension-main-view.png) +![Important issues](./images/codacy-vscode-extension-main-view.png) ### Status tab The **Pull request status** tab displays the following information for the pull request of the currently checked-out branch: -- The **Status** of the pull request, either up to standards or not up to standards, based on the [Gates](../repositories-configure/adjusting-quality-gates.md) set for the repository. +- The **Status** of the pull request, either up to standards or not up to standards, based on the [Gates](../repositories-configure/adjusting-quality-gates) set for the repository. - Any **issues** introduced or fixed by the pull request. These are the same issues you find in the [Issues tabs](../repositories/pull-requests.mdx#issues-tabs) in the Codacy app and are also visible in VS Code's Problems tab. When this item is expanded, the number next to each file name is the total number of issues that the pull request adds to or removes from that file. The number farther to the right, added by VS Code, is the total number of problems in that file, which may or may not be issues from Codacy. If there are any Medium or Critical issues, the file name is also highlighted in yellow (Medium) or red (Critical). - ![Important issues](./../images/codacy-vscode-extension-important-issues.png) + ![Important issues](./images/codacy-vscode-extension-important-issues.png) - The **diff coverage and coverage variation** introduced by the pull request. When this item is expanded, the percentage next to each file name is the coverage variation for that file. You can toggle on/off the inline coverage to see/hide the line-by-line diff coverage and a comparison of the old and new file content for each modified file - uncovered lines (red), covered lines with its test coverage count (green), and non-coverable lines (no background). - ![Toggle inline coverage](./../images/codacy-vscode-extension-inline-coverage.png) + ![Toggle inline coverage](./images/codacy-vscode-extension-inline-coverage.png) - Sequences of **duplicate code** (clones) introduced by the pull request. These are the same ones you find in the [Duplication tabs](../repositories/pull-requests.mdx#duplication-tabs) in the Codacy app. @@ -44,7 +44,7 @@ The **Pull request status** tab displays the following information for the pull ### Open pull requests tab -![Pull requests tab UI](./../images/codacy-vscode-extension-pull-requests-tab.png) +![Pull requests tab UI](./images/codacy-vscode-extension-pull-requests-tab.png) The **Open Pull Requests** tab lists all open pull requests for the repository, including the following information for each: @@ -52,7 +52,7 @@ The **Open Pull Requests** tab lists all open pull requests for the repository, - Analyzing, if Codacy is analyzing the branch. - - Up to standards or not up to standards, based on the [Gates](../repositories-configure/adjusting-quality-gates.md) set for the repository. + - Up to standards or not up to standards, based on the [Gates](../repositories-configure/adjusting-quality-gates) set for the repository. - The author of the pull request. @@ -66,7 +66,7 @@ The **Open Pull Requests** tab lists all open pull requests for the repository, ### Analyzed branch tab -![Analyzed branch tab UI](./../images/codacy-vscode-extension-analyzed-branch-tab.png) +![Analyzed branch tab UI](./images/codacy-vscode-extension-analyzed-branch-tab.png) The **Analyzed Branch** tab appears if you switch to an analyzed branch that doesn't have an open pull request, such as the `main` or `master` branch. This tab shows an overview of the issues found in that branch, grouped by recently added, introduced by the current user, issue category, and issue severity. @@ -74,10 +74,10 @@ See [how to manage the analysis of your repository's branches](../repositories-c ## Installing the Codacy VS Code extension -1. Make sure that the repository you’re working on is analyzed by Codacy and that you have a [repository read](../organizations/roles-and-permissions-for-organizations.md) role or higher. +1. Make sure that the repository you’re working on is analyzed by Codacy and that you have a [repository read](../organizations/roles-and-permissions-for-organizations) role or higher. :::tip - If this is your first time using Codacy, see [how to add and analyze your first repository](./codacy-quickstart.md#adding-your-first-repository). + If this is your first time using Codacy, see [how to add and analyze your first repository](./codacy-quickstart.mdx#adding-your-first-repository). ::: 1. Install the extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=codacy-app.codacy) or through the [Extensions view in VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_browse-for-extensions). @@ -91,12 +91,12 @@ To see Codacy quality and coverage data for an open pull request, follow these s 1. Open the repository directory in VS Code. :::note - If the repository isn't on Codacy yet, [add it to Codacy](../organizations/managing-repositories.md#adding-a-repository) first. + If the repository isn't on Codacy yet, [add it to Codacy](../organizations/managing-repositories.mdx#adding-a-repository) first. ::: 1. Open the main view by clicking the **Codacy logo** in the activity bar or the **Codacy tab** in the status bar. - ![Codacy main view](./../images/codacy-vscode-extension-sign-in.png) + ![Codacy main view](./images/codacy-vscode-extension-sign-in.png) 1. If you’re not signed in, click the **Sign in** button to authorize VS Code on Codacy. @@ -122,11 +122,11 @@ To review issues: 1. Click the name of the issue you want to review. - ![Navigate to a specific issue from the Problems tab](./../images/codacy-vscode-extension-problems-tab.png) + ![Navigate to a specific issue from the Problems tab](./images/codacy-vscode-extension-problems-tab.png) 1. Hover over a highlighted issue in the code editor to view available actions and suggested quick fixes (if available). - For a list of tools that support quick fixes, see [Supported languages and tools](./supported-languages-and-tools.md#supported-languages-and-tools). + For a list of tools that support quick fixes, see [Supported languages and tools](./supported-languages-and-tools.mdx#supported-languages-and-tools). 1. Once you've addressed the problems in your code, push your changes to the Git provider so that Codacy analyzes the updated code. diff --git a/docusaurus/docs/getting-started/integrating-codacy-with-your-git-workflow.mdx b/docusaurus/docs/getting-started/integrating-codacy-with-your-git-workflow.mdx index 908348a6e0..1be24b454f 100644 --- a/docusaurus/docs/getting-started/integrating-codacy-with-your-git-workflow.mdx +++ b/docusaurus/docs/getting-started/integrating-codacy-with-your-git-workflow.mdx @@ -8,6 +8,8 @@ import DefaultGitProviderSettingsTip from './../_includes/DefaultGitProviderSett +## Integrating Codacy with your Git workflow \{#integrating-codacy-with-your-git-workflow\} + 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. In particular, you can configure quality gates to block merging pull requests that don't meet the quality standards of your team. This ensures the quality of the changes to your codebase, preventing the introduction of security issues and untested code. @@ -19,10 +21,10 @@ To integrate Codacy with your Git workflow, follow these steps: 1. [Blocking merging pull requests](#blocking-pull-requests) (optional) ## 1. Configuring the quality gate rules \{#configuring-gate\} -[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. +[Review and adjust the quality gates](../repositories-configure/adjusting-quality-gates) of your repository to decide which pull requests should fail the Codacy quality gate. :::tip -The [default quality gate rules](../organizations/using-gate-policies.md) are designed to help maintain the current code quality of your repository. In particular, the default value for the coverage rule might be demanding. Depending on factors such as the current code quality of your repository and the maturity of your team practices, consider the balance between implementing stricter quality gates and the possibility of delaying or blocking the development progress. +The [default quality gate rules](../organizations/using-gate-policies) are designed to help maintain the current code quality of your repository. In particular, the default value for the coverage rule might be demanding. Depending on factors such as the current code quality of your repository and the maturity of your team practices, consider the balance between implementing stricter quality gates and the possibility of delaying or blocking the development progress. Codacy generally recommends that on a first stage you configure rules that focus on stopping new critical issues from entering your code base, such as: @@ -38,7 +40,7 @@ Codacy generally recommends that on a first stage you configure rules that focus ![Adjusting the quality gates](../repositories-configure/images/quality-settings-gates.png) ## 2. Configuring the Git provider integration \{#git-provider-integration\} -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)). +Make sure you enable the option **Status checks** ([GitHub](../repositories-configure/integrations/github-integration.mdx#status-checks)) or **Pull request status** ([GitLab](../repositories-configure/integrations/gitlab-integration.mdx#pull-request-status) and [Bitbucket](../repositories-configure/integrations/bitbucket-integration.mdx#pull-request-status)). @@ -51,7 +53,7 @@ Once you've tested out Codacy for a while and you're happy with the level of fee To eliminate any false positives that could inadvertently block the work of your team, it's important that before activating this feature you: - Validate that Codacy is reporting the intended status on your pull requests -- Double check you repository's [tool and code pattern settings](../repositories-configure/configuring-code-patterns.md) and [quality gate settings](../repositories-configure/adjusting-quality-gates.md) +- Double check you repository's [tool and code pattern settings](../repositories-configure/configuring-code-patterns) and [quality gate settings](../repositories-configure/adjusting-quality-gates) ::: diff --git a/docusaurus/docs/getting-started/supported-languages-and-tools.md b/docusaurus/docs/getting-started/supported-languages-and-tools.md deleted file mode 100644 index 9dd1dec673..0000000000 --- a/docusaurus/docs/getting-started/supported-languages-and-tools.md +++ /dev/null @@ -1,952 +0,0 @@ ---- -title: Supported languages and tools -description: List of tools that Codacy uses to analyze over 40 supported languages. Codacy provides static analysis for all programming languages and cloud infrastructure-as-code platforms as well as code duplication, code complexity, and code coverage metrics for most programming languages. ---- - - -Codacy uses industry-leading tools to perform automatic static code analysis over 40 supported languages: - -- **For programming languages**, Codacy provides static analysis as well as code duplication, code complexity, secret detection, dependency vulnerability scanning, and code coverage metrics for key languages. - -- **For cloud infrastructure-as-code platforms**, Codacy provides static analysis and secret detection to enforce security and compliance best practices. - -The table below lists all languages that Codacy supports and the corresponding tools that Codacy uses to analyze your source code. Besides this, Codacy uses [cloc](https://github.com/kentcdodds/cloc) to calculate the source lines of code for all supported languages and supports multiple [code coverage report formats](../coverage-reporter/index.md#generating-coverage). - - - -:::caution -Codacy runs security and other analysis tools when code changes are pushed to your repositories. These tools don't scan code for issues continuously. -::: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LanguageFile extensionsStatic analysisSuggested fixesSecret detectionDependency vulnerability scanningMalicious packages detection 11DuplicationComplexityLicense scanning
Apex.cls, .triggerPMD, - Semgrep 1-Semgrep--PMD CPD 10 --
AsyncAPI-Spectral-------
AWS CloudFormation-Checkov-Checkov, - Semgrep 2, - Trivy 2-----
Azure Resource Manager Templates-Checkov-------
C.c, .hClang-Tidy 3, - Cppcheck, - Flawfinder, - Semgrep 1Semgrep 🔧Semgrep, - TrivyTrivy, scans
conan.lock (Conan)
-PMD CPD 10 Lizard-
C++.cpp, .hpp, .cc, .cxx, .inoClang-Tidy 3, - Cppcheck 4, - Flawfinder, - Semgrep 1-Semgrep, - TrivyTrivy, scans
conan.lock (Conan)
-PMD CPD 10 Lizard-
C#.csSemgrep 1, - SonarC#Semgrep 🔧Semgrep, - TrivyTrivy, scans
.deps.json (.Net), packages.lock.json (NuGet)
Trivy, scans packages.lock.json for malicious packages published in NuGet PMD CPD 10 Lizard-
CoffeeScript.coffeeCoffeeLint----jscpd--
Crystal.crAmeba-------
CSS.cssStylelint-------
Dart.dartdartanalyzer 5-TrivyTrivy, scans
pubspec.lock
-jscpd--
Dockerfile.dockerfileHadolint, - Semgrep 1Semgrep 🔧Semgrep, - Trivy-----
Elixir.ex, .exsCredo, - Semgrep 1-TrivyTrivy, scans
mix.lock (Mix)
-jscpd--
GitHub Actions-Semgrep 1-Semgrep, - Trivy-----
Go.goaligncheck 3, - deadcode 3, - Gosec 3, - Revive, - Semgrep 1, - Staticcheck 3Semgrep 🔧Semgrep, - TrivyTrivy, scans
go.mod
Trivy, scans
go.mod for malicious packages published in github.com
PMD CPD 10 Lizard-
Groovy.groovyCodeNarc----jscpd--
Helm---Semgrep 2, Trivy 2------
Java.javaCheckstyle, - PMD, - Semgrep 1, - SpotBugs 3Semgrep 🔧PMD, - Semgrep, - TrivyTrivy, scans
pom.xml and gradle.lockfile
Trivy, scans
pom.xml and gradle.lockfile for malicious packages published in maven
jscpdLizard-
JavaScript.js, .jsx, .jsm, .vue, .mjsESLint, - PMD, - Semgrep 1ESLint 🔧Semgrep, - TrivyTrivy, scans
package.json and package-lock.json (npm),
yarn.lock (Yarn)
Trivy, scans
package.json and package-lock.json for malicious packages published in npm
PMD CPD 10 LizardTrivy, scans
package-lock.json (npm)
JSON.jsonJackson Linter-Checkov, - Trivy-----
JSP.jspPMD----PMD CPD 10 --
Kotlin.kt, .kts - detekt, - Semgrep 1, - PMD - -SemgrepTrivy, scans
pom.xml and gradle.lockfile
Trivy, scans
pom.xml and gradle.lockfile for malicious packages published in maven
jscpddetekt 10 -
Kubernetes-Checkov, - Semgrep 2Semgrep 🔧Checkov, - Semgrep 2, - Trivy 2---Lizard-
Less.lessStylelint-------
Markdown.md, .markdown, .mdown, .mkdn, .mkd, .mdwn, .mkdown, .ronremark-lint, markdownlintmarkdownlint 🔧------
Objective-C.mClang-Tidy 3----jscpdLizard-
OpenAPI-Spectral-------
PHP.phpPHP_CodeSniffer, - PHP Mess Detector, - Semgrep 1-Semgrep, - TrivyTrivy, scans
composer.lock (Composer)
-PHPCPDLizardTrivy, scans
composer.lock (Composer)
PL/SQL.trg, .prc, .fnc, .pld, .pls, .plh, .plb, .pck, .pks, .pkh, .pkb, .typ, .tyb, .tps, .tpbPMD-------
PostgreSQL-SQLint-------
PowerShell.ps1, .psc1, .psd1, .psm1, .ps1xml, .pssc, .cdxml, .clixmlPSScriptAnalyser-------
Python.py - Bandit, - Prospector, - Pylint, - Ruff, - Semgrep 1 - - Semgrep 🔧 - - Bandit, - Prospector, - Semgrep, - Trivy - - Trivy, scans
requirements.txt (pip),
Pipfile.lock (pipenv),
poetry.lock (Poetry), uv.lock (UV) -
- Trivy, scans
requirements.txt (pip),
Pipfile.lock (pipenv)
for malicious packages published in PyPI -
- PMD CPD - 10 - LizardTrivy, scans
requirements.txt (pip),
Pipfile.lock (pipenv),
poetry.lock (Poetry), uv.lock (UV)
Ruby.rb, .gemspec, .podspec, .jbuilder, .rake, .opalReek, Brakeman 7, RuboCop, Semgrep 1Semgrep 🔧Semgrep, - TrivyTrivy, scans
Gemfile.lock (Bundler)
Trivy, scans
Gemfile.lock for malicious packages published in rubygems.org
FlayLizard-
Rust.rs, .rlibSemgrep 1-Semgrep, - TrivyTrivy, scans
Cargo.lock (Cargo)
Trivy, scans
Cargo.lock for malicious packages published in crates.io
jscpdLizard-
Sass.scssStylelint-------
Scala.scalaCodacy Scalameta Pro, - Scalastyle, - Semgrep 1, - SpotBugs 3-Semgrep, - TrivyTrivy, scans
build.sbt.lock (sbt) 9
Trivy, scans
build.sbt.lock for malicious packages published in maven 9
PMD CPD 10 Lizard-
Serverless Framework-Checkov-------
Shell.sh, .bashShellCheck, - Semgrep 1-Semgrep-----
Swift.swift - Semgrep 1, - SwiftLint, - PMD - -Semgrep, - TrivyTrivy, scans
Package.resolved (SwiftPM)
-PMD CPD 10 Lizard-
SQL.sql - PMD, - SQLint, - TSQLLint, - SQLFluff, - Semgrep 1 - -------
Terraform.tfCheckov, - Semgrep 1-Checkov, - Semgrep, - Trivy-----
Transact-SQL.tsqlTSQLLint-------
TypeScript.ts, .tsxESLint, - Semgrep 1ESLint 🔧Semgrep, - TrivyTrivy, scans
package.json and package-lock.json (npm),
yarn.lock (Yarn)
Trivy, scans
package.json and package-lock.json for malicious packages published in npm
jscpdLizardTrivy, scans
package-lock.json (npm)
Unity-Unity Roslyn Analyzers 3-------
Velocity.vmPMD-------
Visual Basic.vbSonarVB----jscpd--
Visualforce.component, .pagePMD----PMD CPD 10 --
XML.xml, .xsl, .wsdl, .pomPMD-Trivy-----
XSL.xslPMD-------
YAML.yaml, .yml, .env, .env.production, .env.prod, .env.staging, .env.dev, .env.development--Trivy-----
- -## Docker images of supported tools - -Codacy adds support for new languages and tools by using [a Docker image to run each tool](https://github.com/codacy/codacy-example-tool). - -The following table lists the Codacy GitHub repositories corresponding to each supported tool. Use these repositories to check the extra plugins supported by each tool or to submit GitHub issues related to each tool. To learn more about the tool versions used by Codacy, [see the latest release notes](../release-notes/index.md). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tool nameCodacy GitHub repository
aligncheck 3codacy/codacy-aligncheck
Amebacodacy/codacy-ameba
Banditcodacy/codacy-bandit
Brakeman 7codacy/codacy-brakeman
Checkovcodacy/codacy-checkov
Checkstylecodacy/codacy-checkstyle
Clang-Tidy 3codacy/codacy-clang-tidy
Codacy Scalameta Procodacy/codacy-scalameta
CodeNarccodacy/codacy-codenarc
CoffeeLintcodacy/codacy-coffeelint
Cppcheck 4codacy/codacy-cppcheck
Credocodacy/codacy-credo
dartanalyzer 5codacy/codacy-dartanalyzer
deadcode 3codacy/codacy-deadcode
detektcodacy/codacy-detekt
ESLint 6codacy/codacy-eslint
Flawfindercodacy/codacy-flawfinder
Gosec 3codacy/codacy-gosec
Hadolintcodacy/codacy-hadolint
Jackson Lintercodacy/codacy-jackson-linter
Lizardcodacy/codacy-lizard
markdownlintcodacy/codacy-markdownlint
PHP_CodeSniffercodacy/codacy-codesniffer
PHP Mess Detectorcodacy/codacy-phpmd
PMD 6codacy/codacy-pmd7
Prospectorcodacy/codacy-prospector
PSScriptAnalysercodacy/codacy-psscriptanalyzer
Pylintcodacy/codacy-pylint-python3
remark-lintcodacy/codacy-remark-lint
Revivecodacy/codacy-gorevive
RuboCop 6codacy/codacy-rubocop
Ruffcodacy/codacy-ruff
Scalastylecodacy/codacy-scalastyle
Semgrep 1codacy/codacy-semgrep
ShellCheckcodacy/codacy-shellcheck
SonarC#codacy/codacy-sonar-csharp
SonarVBcodacy/codacy-sonar-visual-basic
Spectralcodacy/codacy-spectral
SpotBugs 3codacy/codacy-spotbugs
SQLintcodacy/codacy-sqlint
Staticcheck 3codacy/codacy-staticcheck
Stylelintcodacy/codacy-stylelint
SwiftLint 6 8codacy/codacy-swiftlint
Trivycodacy/codacy-trivy
TSQLLintcodacy/codacy-tsqllint
Unity Roslyn Analyzers 3codacy/codacy-roslyn
- -1: Semgrep supports additional security rules when signing up for [Semgrep Pro](https://semgrep.dev/pricing/). This tool doesn't support [custom file extensions](../repositories-configure/languages.md#configuring-file-extensions). -2: Currently, only YAML file scanning is supported on this platform. -3: Supported as a [client-side tool](../repositories-configure/local-analysis/client-side-tools.md). -4: Currently, Cppcheck only supports the MISRA guidelines for C. -5: Currently, Codacy only supports including the packages [lints](https://pub.dev/packages/lints) and [flutter_lints](https://pub.dev/packages/flutter_lints) on dartanalyzer configuration files. -6: Doesn't calculate [the number of methods and the complexity per method](../repositories/files.md#file-details) for each file. -7: Due to licensing limitations, Codacy doesn't support the latest version of Brakeman. To analyze your Ruby code for the latest security vulnerabilities, use [Semgrep](https://semgrep.dev/), which provides comprehensive and up-to-date security scanning. -8: Supports [reporting warnings or errors](https://realm.github.io/SwiftLint/cyclomatic_complexity.html) on functions above specific complexity thresholds. Enable the rule **Cyclomatic Complexity** on the [Code patterns page](../repositories-configure/configuring-code-patterns.md), or use a [configuration file](https://realm.github.io/SwiftLint/index.html#configuration) to customize the thresholds. -9: Requires the [sbt-dependency-lock](https://github.com/stringbean/sbt-dependency-lock) plugin for generating the lockfile. -10: Codacy may use a different version of this tool for measuring complexity and duplication. -11: Malicious packages identified in the [OpenSSF Malicious Packages database](https://github.com/ossf/malicious-packages). -🔧: Supports [suggesting fixes](../repositories-configure/integrations/github-integration.md#suggest-fixes) for identified issues. - -## See also - -- [Codacy quickstart (5 min)](codacy-quickstart.md) -- [Client-side tools](../repositories-configure/local-analysis/client-side-tools.md) -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) diff --git a/docusaurus/docs/getting-started/supported-languages-and-tools.mdx b/docusaurus/docs/getting-started/supported-languages-and-tools.mdx new file mode 100644 index 0000000000..0ec9d5c54f --- /dev/null +++ b/docusaurus/docs/getting-started/supported-languages-and-tools.mdx @@ -0,0 +1,391 @@ +--- +title: Supported languages and tools +description: List of tools that Codacy uses to analyze over 40 supported languages. Codacy provides static analysis for all programming languages and cloud infrastructure-as-code platforms as well as code duplication, code complexity, and code coverage metrics for most programming languages. +--- +
+ +Codacy uses industry-leading tools to perform automatic static code analysis over 40 supported languages: + +- **For programming languages**, Codacy provides static analysis as well as code duplication, code complexity, secret detection, dependency vulnerability scanning, and code coverage metrics for key languages. + +- **For cloud infrastructure-as-code platforms**, Codacy provides static analysis and secret detection to enforce security and compliance best practices. + +The table below lists all languages that Codacy supports and the corresponding tools that Codacy uses to analyze your source code. Besides this, Codacy uses [cloc](https://github.com/kentcdodds/cloc) to calculate the source lines of code for all supported languages and supports multiple [code coverage report formats](../coverage-reporter/index.mdx#generating-coverage). + +{/**/} + +:::caution +Codacy runs security and other analysis tools when code changes are pushed to your repositories. These tools don't scan code for issues continuously. +::: + +## Supported languages and tools + +### Quality scanning + + + +| Language | Static analysis | Duplication[^1] | Complexity[^1] | Suggested fixes | +|---|---|---|---|---| +| Apex
`.cls` `.trigger` | PMD, Semgrep | PMD CPD | - | - | +| AsyncAPI | Spectral | - | - | - | +| AWS CloudFormation | Checkov | - | - | - | +| Azure Resource Manager Templates | Checkov | - | - | - | +| C
`.c` `.h` | Clang-Tidy[^client-side], Cppcheck[^cppcheck-misra], Flawfinder, Semgrep | PMD CPD | Lizard | Semgrep | +| C++
`.cpp` `.hpp` `.cc` `.cxx` `.ino` | Clang-Tidy[^client-side], Cppcheck[^cppcheck-misra], Flawfinder, Semgrep | PMD CPD | Lizard | - | +| C#
`.cs` | Semgrep, SonarC# | PMD CPD | Lizard | Semgrep | +| CoffeeScript
`.coffee` | CoffeeLint | jscpd | - | - | +| Crystal
`.cr` | Ameba | - | - | - | +| CSS
`.css` | Stylelint | - | - | - | +| Dart
`.dart` | dartanalyzer[^dart-limitations] | jscpd | - | - | +| Dockerfile
`.dockerfile` | Hadolint, Semgrep | - | - | Semgrep | +| Elixir
`.ex` `.exs` | Credo, Semgrep | jscpd | - | - | +| GitHub Actions | Semgrep | - | - | - | +| Go
`.go` | aligncheck[^client-side], deadcode[^client-side], Gosec[^client-side], Revive, Semgrep, Staticcheck[^client-side] | PMD CPD | Lizard | Semgrep | +| Groovy
`.groovy` | CodeNarc | jscpd | - | - | +| Java
`.java` | Checkstyle, PMD, Semgrep, SpotBugs[^client-side] | jscpd | Lizard | Semgrep | +| JavaScript
`.js` `.jsx` `.jsm` `.vue` `.mjs` | ESLint, PMD, Semgrep | PMD CPD | Lizard | ESLint | +| JSON
`.json` | Jackson Linter | - | - | - | +| JSP
`.jsp` | PMD | PMD CPD | - | - | +| Kotlin
`.kt` `.kts` | detekt, Semgrep, PMD | jscpd | detekt | - | +| Kubernetes | Checkov, Semgrep | - | Lizard | Semgrep | +| Less
`.less` | Stylelint | - | - | - | +| Markdown
`.md` `.markdown` `.mdown` `.mkdn` `.mkd` `.mdwn` `.mkdown` `.ron` | remark-lint, markdownlint | - | - | markdownlint | +| Objective-C
`.m` | Clang-Tidy[^client-side] | jscpd | Lizard | - | +| OpenAPI | Spectral | - | - | - | +| PHP
`.php` | PHP_CodeSniffer, PHP Mess Detector, Semgrep | PHPCPD | Lizard | - | +| PL/SQL
`.trg` `.prc` `.fnc` `.pld` `.pls` `.plh` `.plb` `.pck` `.pks` `.pkh` `.pkb` `.typ` `.tyb` `.tps` `.tpb` | PMD | - | - | - | +| PostgreSQL | SQLint | - | - | - | +| PowerShell
`.ps1` `.psc1` `.psd1` `.psm1` `.ps1xml` `.pssc` `.cdxml` `.clixml` | PSScriptAnalyser | - | - | - | +| Python
`.py` | Bandit, Prospector, Pylint, Ruff, Semgrep | PMD CPD | Lizard | Semgrep | +| Ruby
`.rb` `.gemspec` `.podspec` `.jbuilder` `.rake` `.opal` | Reek, Brakeman[^semgrep-brakeman], RuboCop, Semgrep | Flay | Lizard | Semgrep | +| Rust
`.rs` `.rlib` | Semgrep | jscpd | Lizard | - | +| Sass
`.scss` | Stylelint | - | - | - | +| Scala
`.scala` | Codacy Scalameta Pro, Scalastyle, Semgrep, SpotBugs[^client-side] | PMD CPD | Lizard | - | +| Serverless Framework | Checkov | - | - | - | +| Shell
`.sh` `.bash` | ShellCheck, Semgrep | - | - | - | +| Swift
`.swift` | Semgrep, SwiftLint, PMD | PMD CPD | Lizard | - | +| SQL
`.sql` | PMD, SQLint, TSQLLint, SQLFluff, Semgrep | - | - | - | +| Terraform
`.tf` | Checkov, Semgrep | - | - | - | +| Transact-SQL
`.tsql` | TSQLLint | - | - | - | +| TypeScript
`.ts` `.tsx` | ESLint, Semgrep | jscpd | Lizard | ESLint | +| Unity | Unity Roslyn Analyzers[^client-side] | - | - | - | +| Velocity
`.vm` | PMD | - | - | - | +| Visual Basic
`.vb` | SonarVB | jscpd | - | - | +| Visualforce
`.component` `.page` | PMD | PMD CPD | - | - | +| XML
`.xml` `.xsl` `.wsdl` `.pom` | PMD | - | - | - | +| XSL
`.xsl` | PMD | - | - | - | +| YAML
`.yaml` `.yml` `.env` `.env.production` `.env.prod` `.env.staging` `.env.dev` `.env.development` | - | - | - | - | + +[^1]: Complexity and duplication are calculated per commit by default and do not require any tools. When Complexity and Duplication appear in the Quality analysis section, they refer to tools that support Complexity or Duplication analysis and are able to trigger issues based on your configuration. + +{/* +### Security static scanning +*/} + +### Secret scanning + +| Language | Tools | +| --- | --- | +| Apex | Semgrep | +| AWS CloudFormation | Checkov, Semgrep, Trivy | +| C | Semgrep, Trivy | +| C++ | Semgrep, Trivy | +| C# | Semgrep, Trivy | +| Dart | Trivy | +| Dockerfile | Semgrep, Trivy | +| Elixir | Trivy | +| GitHub Actions | Semgrep, Trivy | +| Go | Semgrep, Trivy | +| Java | PMD, Semgrep, Trivy | +| JavaScript | Semgrep, Trivy | +| JSON | Checkov, Trivy | +| Kotlin | Semgrep | +| Kubernetes | Checkov, Semgrep, Trivy | +| PHP | Semgrep, Trivy | +| Python | Bandit, Prospector, Semgrep, Trivy | +| Ruby | Semgrep, Trivy | +| Rust | Semgrep, Trivy | +| Scala | Semgrep, Trivy | +| Shell | Semgrep | +| Swift | Semgrep, Trivy | +| Terraform | Checkov, Semgrep, Trivy | +| TypeScript | Semgrep, Trivy | +| XML | Trivy | +| YAML | Trivy | + +### Dependency vulnerability scanning + +| Language | Extensions | Tools | +| --- | --- | --- | +| C | `conan.lock` (Conan) | Trivy | +| C++ | `conan.lock` (Conan) | Trivy, scans | +| C# | `.deps.json` (.Net), `packages.lock.json` (NuGet) | Trivy | +| Dart | `pubspec.lock` | Trivy | +| Elixir | `mix.lock` (Mix) | Trivy, scans | +| Go | `go.mod` | Trivy | +| Java | `pom.xml`, `gradle.lockfile` | Trivy | +| JavaScript | `package.json`, `package-lock.json` (npm), `yarn.lock` (Yarn) | Trivy | +| Kotlin | `pom.xml`, `gradle.lockfile` | Trivy | +| PHP | `composer.lock` (Composer) | Trivy | +| Python | `requirements.txt` (pip), `Pipfile.lock` (pipenv), `poetry.lock` (Poetry), `uv.lock` (UV) | Trivy | +| Ruby | `Gemfile.lock` (Bundler) | Trivy | +| Rust | `Cargo.lock` (Cargo) | Trivy | +| Scala | `build.sbt.lock` (sbt) | Trivy | +| Swift | `Package.resolved` (SwiftPM) | Trivy | +| TypeScript | `package.json`, `package-lock.json` (npm), `yarn.lock` (Yarn) | Trivy | + + + +### Malicious package detection + +| Language | Extension | Publisher | Tools | +| --- | --- | --- | --- | +| C# | `packages.lock.json` | NuGet | Trivy | +| Go | `go.mod` | github.com | Trivy | +| Java | `pom.xml`, `gradle.lockfile` | maven | Trivy | +| JavaScript | `package.json`, `package-lock.json` | npm | Trivy | +| Kotlin | `pom.xml`, `gradle.lockfile` | maven | Trivy | +| Python | `requirements.txt` (pip), `Pipfile.lock` (pipenv) | PyPI | Trivy| +| Ruby | `Gemfile.lock` | rubygems.org | Trivy | +| Rust | `Cargo.lock` | crates.io | Trivy | +| Scala | `build.sbt.lock` | maven | Trivy | +| TypeScript | `package.json`, `package-lock.json` | npm | Trivy | + +### License scanning + +| Language | Extensions | Tool | +| --- | --- | --- | +| JavaScript | `package-lock.json` (npm) | Trivy | +| PHP | `composer.lock` (Composer) | Trivy | +| Python | `requirements.txt` (pip), `Pipfile.lock` (pipenv), `poetry.lock` (Poetry), `uv.lock` (UV) | Trivy | +| TypeScript | `package-lock.json` (npm) | Trivy | + +
+ +## Docker images of supported tools + +Codacy adds support for new languages and tools by using [a Docker image to run each tool](https://github.com/codacy/codacy-example-tool). + +The following table lists the Codacy GitHub repositories corresponding to each supported tool. Use these repositories to check the extra plugins supported by each tool or to submit GitHub issues related to each tool. To learn more about the tool versions used by Codacy, [see the latest release notes](../release-notes/). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tool nameCodacy GitHub repository
aligncheck [^client-side]codacy/codacy-aligncheck
Amebacodacy/codacy-ameba
Banditcodacy/codacy-bandit
Brakeman [^semgrep-brakeman]codacy/codacy-brakeman
Checkovcodacy/codacy-checkov
Checkstylecodacy/codacy-checkstyle
Clang-Tidy [^client-side]codacy/codacy-clang-tidy
Codacy Scalameta Procodacy/codacy-scalameta
CodeNarccodacy/codacy-codenarc
CoffeeLintcodacy/codacy-coffeelint
Cppcheck [^cppcheck-misra]codacy/codacy-cppcheck
Credocodacy/codacy-credo
dartanalyzer [^dart-limitations]codacy/codacy-dartanalyzer
deadcode [^client-side]codacy/codacy-deadcode
detektcodacy/codacy-detekt
ESLint [^complexity-limitations]codacy/codacy-eslint
Flawfindercodacy/codacy-flawfinder
Gosec [^client-side]codacy/codacy-gosec
Hadolintcodacy/codacy-hadolint
Jackson Lintercodacy/codacy-jackson-linter
Lizardcodacy/codacy-lizard
markdownlintcodacy/codacy-markdownlint
PHP_CodeSniffercodacy/codacy-codesniffer
PHP Mess Detectorcodacy/codacy-phpmd
PMD [^complexity-limitations]codacy/codacy-pmd7
Prospectorcodacy/codacy-prospector
PSScriptAnalysercodacy/codacy-psscriptanalyzer
Pylintcodacy/codacy-pylint-python3
remark-lintcodacy/codacy-remark-lint
Revivecodacy/codacy-gorevive
RuboCop [^complexity-limitations]codacy/codacy-rubocop
Ruffcodacy/codacy-ruff
Scalastylecodacy/codacy-scalastyle
Semgrep [^semgrep]codacy/codacy-semgrep
ShellCheckcodacy/codacy-shellcheck
SonarC#codacy/codacy-sonar-csharp
SonarVBcodacy/codacy-sonar-visual-basic
Spectralcodacy/codacy-spectral
SpotBugs [^client-side]codacy/codacy-spotbugs
SQLintcodacy/codacy-sqlint
Staticcheck [^client-side]codacy/codacy-staticcheck
Stylelintcodacy/codacy-stylelint
SwiftLint [^complexity-limitations] [^swiftlint-complexity]codacy/codacy-swiftlint
Trivycodacy/codacy-trivy
TSQLLintcodacy/codacy-tsqllint
Unity Roslyn Analyzers [^client-side]codacy/codacy-roslyn
+ +[^semgrep]: Semgrep supports additional security rules when signing up for [Semgrep Pro](https://semgrep.dev/pricing/). This tool doesn't support [custom file extensions](../repositories-configure/languages.mdx#configuring-file-extensions). +[^yaml-only]: Currently, only YAML file scanning is supported on this platform. +[^client-side]: Supported as a [client-side tool](../repositories-configure/local-analysis/client-side-tools). +[^cppcheck-misra]: Currently, Cppcheck only supports the MISRA guidelines for C. +[^dart-limitations]: Currently, Codacy only supports including the packages [lints](https://pub.dev/packages/lints) and [flutter_lints](https://pub.dev/packages/flutter_lints) on dartanalyzer configuration files. +[^complexity-limitations]: Doesn't calculate [the number of methods and the complexity per method](../repositories/files.mdx#file-details) for each file. +[^semgrep-brakeman]: Due to licensing limitations, Codacy doesn't support the latest version of Brakeman. To analyze your Ruby code for the latest security vulnerabilities, use [Semgrep](https://semgrep.dev/), which provides comprehensive and up-to-date security scanning. +[^swiftlint-complexity]: Supports [reporting warnings or errors](https://realm.github.io/SwiftLint/cyclomatic_complexity.html) on functions above specific complexity thresholds. Enable the rule **Cyclomatic Complexity** on the [Code patterns page](../repositories-configure/configuring-code-patterns), or use a [configuration file](https://realm.github.io/SwiftLint/index.html#configuration) to customize the thresholds. +[^scala-dependencies]: Requires the [sbt-dependency-lock](https://github.com/stringbean/sbt-dependency-lock) plugin for generating the lockfile. +[^different-tools]: Codacy may use a different version of this tool for measuring complexity and duplication. +[^malicious-packages-detection]: Malicious packages identified in the [OpenSSF Malicious Packages database](https://github.com/ossf/malicious-packages). +[^suggest-fixes]: Supports [suggesting fixes](../repositories-configure/integrations/github-integration.mdx#suggest-fixes) for identified issues. + +## See also + +- [Codacy quickstart (5 min)](./codacy-quickstart) +- [Client-side tools](../repositories-configure/local-analysis/client-side-tools) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) diff --git a/docusaurus/docs/getting-started/which-permissions-does-codacy-need-from-my-account.md b/docusaurus/docs/getting-started/which-permissions-does-codacy-need-from-my-account.mdx similarity index 96% rename from docusaurus/docs/getting-started/which-permissions-does-codacy-need-from-my-account.md rename to docusaurus/docs/getting-started/which-permissions-does-codacy-need-from-my-account.mdx index b0734be909..a7b817ba7e 100644 --- a/docusaurus/docs/getting-started/which-permissions-does-codacy-need-from-my-account.md +++ b/docusaurus/docs/getting-started/which-permissions-does-codacy-need-from-my-account.mdx @@ -3,7 +3,6 @@ title: Which permissions does Codacy need from my account? description: Review the list of permissions that Codacy requires from your Git provider to analyze your code. --- - Codacy Cloud uses the OAuth protocol to handle logins and supports the following providers: - [GitHub Cloud](#github-cloud) @@ -32,6 +31,7 @@ If you log in with GitHub, Codacy requires the following [app permissions](https Repository permissions: + Checks Read & Write @@ -81,9 +81,10 @@ If you log in with GitHub, Codacy requires the following [app permissions](https Codacy retrieves information about organization members and teams to enforce permissions and user management. -

User permissions:

-

These permissions are granted on an individual user basis as part of the user authorization flow. They will be also be displayed during account installation for transparency.

- + + User permissions:
+ These permissions are granted on an individual user basis as part of the user authorization flow. They will be also be displayed during account installation for transparency. + Email addresses @@ -190,7 +191,7 @@ To revoke the access from Codacy to one or more of the OAuth providers: - [GitLab Cloud](https://docs.gitlab.com/ee/integration/oauth_provider.html#view-all-authorized-applications) - [Bitbucket Cloud](https://support.atlassian.com/bitbucket-cloud/docs/bitbucket-cloud-apps-overview/#OAuth-consumer-permissions) -After revoking an integration, Codacy will no longer be able to access or manipulate resources that require API calls, such as detecting new pull requests or adding comments to pull requests. However, Codacy will still be able to perform operations that only require using the Git protocol either via SSH or HTTPS, such as detecting new commits and calculating diffs. To remove your repositories from Codacy and stop the analysis you must [delete them from your Codacy account](../repositories-configure/removing-your-repository.md). +After revoking an integration, Codacy will no longer be able to access or manipulate resources that require API calls, such as detecting new pull requests or adding comments to pull requests. However, Codacy will still be able to perform operations that only require using the Git protocol either via SSH or HTTPS, such as detecting new commits and calculating diffs. To remove your repositories from Codacy and stop the analysis you must [delete them from your Codacy account](../repositories-configure/removing-your-repository). If you need to use an integration that you have previously revoked, log in again to Codacy with that integration so that Codacy can request the required permissions from the provider. diff --git a/docusaurus/docs/index.mdx b/docusaurus/docs/index.mdx deleted file mode 100644 index 89746b3d02..0000000000 --- a/docusaurus/docs/index.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Codacy Docs -description: Documentation homepage for the Codacy automated code review tool. ---- - -## Get started - -- [Adding your first repository](getting-started/codacy-quickstart/) -- [Supported languages and tools](getting-started/supported-languages-and-tools/) -- [Managing an organization](organizations/what-are-organizations/) -- [Setting up integrations](repositories-configure/integrations/github-integration/) - -## Most popular topics - -- [Adding coverage to your repository](coverage-reporter/) -- [Understanding issues](repositories/issues/) -- [Managing people in organizations](organizations/managing-people/) -- [Using the Codacy API](codacy-api/using-the-codacy-api/) diff --git a/docusaurus/docs/organizations/ai-risk-hub.md b/docusaurus/docs/organizations/ai-risk-hub.mdx similarity index 82% rename from docusaurus/docs/organizations/ai-risk-hub.md rename to docusaurus/docs/organizations/ai-risk-hub.mdx index 9d80211e28..8f8e1fa43a 100644 --- a/docusaurus/docs/organizations/ai-risk-hub.md +++ b/docusaurus/docs/organizations/ai-risk-hub.mdx @@ -4,13 +4,13 @@ description: The organization's AI Risk Hub dashboard provides an overview of al --- -The **AI Risk Hub** dashboard provides an overview of all the AI issues detected in the repositories applied to the organization's AI Policy standard and your organization's risk level based on your AI practices. Here, you can navigate through the issues detected in your repositories and filter them by severity and category. You can also filter the issues by selecting specific repositories or using [the segments that you have set up](segments.md). +The **AI Risk Hub** dashboard provides an overview of all the AI issues detected in the repositories applied to the organization's AI Policy standard and your organization's risk level based on your AI practices. Here, you can navigate through the issues detected in your repositories and filter them by severity and category. You can also filter the issues by selecting specific repositories or using [the segments that you have set up](./segments.mdx). :::caution Currently this tab is a preview of a Business tier feature. ::: -![AI Risk Hub dashboard](images/ai-risk-hub-dashboard.png) +![AI Risk Hub dashboard](./images/ai-risk-hub-dashboard.png) To access the AI Risk Hub dashboard, select an organization from the top navigation bar and click on the **AI Risk Hub** tab at the top of the page. @@ -20,6 +20,7 @@ The AI Risk Hub dashboard includes the following sections to help you monitor AI - [Repositories with most AI issues](#repositories-with-most-ai-issues) - [Risk Level](#risk-level) - [AI Risk Checklist](#ai-risk-checklist) + ## AI Policy Compliance Our AI Policy is a pre-defined, curated ruleset designed to prevent risks and vulnerabilities that are inherent to AI code from entering the codebase – which can be enforced immediately across all repositories and pull request checks. @@ -27,7 +28,7 @@ You can enable Codacy's AI Policy by clicking on the button on the right side of When the policy is enabled, you are able to view a real distribution of the AI issues found distributed by severity and AI category. When you already have the AI Policy enabled, you can see an edit button which allows you to edit the repositories that have this policy applied. -![AI Policy Compliance](images/ai-policy-compliance.png) +![AI Policy Compliance](./images/ai-policy-compliance.png) The AI Policy covers four groups of AI-specific risks: @@ -53,7 +54,7 @@ Ensures protection on all fronts, by integrating vulnerability detection through This list displays repositories in descending order based on the number of AI issues. Depending on the filters applied, the list will show repositories with the most AI open issues, grouped by severity or AI category. -![Repositories with most AI issues](images/repositories-with-most-ai-issues.png) +![Repositories with most AI issues](./images/repositories-with-most-ai-issues.png) ## Risk Level @@ -61,17 +62,17 @@ This panel shows the organizational AI Risk Level based on the implementation (o The possible risk levels are: High, Medium, and Low, considering special control factors you can enable in Codacy. These control factors are specified in the **AI Risk Checklist**. -![Risk Level](images/risk-level.png) +![Risk Level](./images/risk-level.png) ## AI Risk Checklist With most repositories today being subject to GenAI code contributions, the checklist covers essential source code controls that we recommend to enable across all projects within your organization: - AI Policy enabled: Enable the AI Policy inside the AI Risk Hub tab. -- Coverage enabled: Set up code coverage for your repositories. See how to [upload coverage data](../coverage-reporter/index.md) to Codacy. -- Enforced gates: Add [gates to your repositories](../repositories-configure/adjusting-quality-gates.md), and preferentially [apply repositories to gate policies](./using-gate-policies.md). -- Protected pull requests: Protect your pull requests by [enforcing quality gates](../getting-started/integrating-codacy-with-your-git-workflow.md#blocking-pull-requests). -- Daily vulnerability scans: [Enable Proactive SCA](./managing-security-and-risk.md#dependencies-list) to protect your repositories from dependencies vulnerabilities. -- Applications scanned: [Enable App scanning](./managing-security-and-risk.md#app-scanning) to scan Web Applications and APIs for security vulnerabilities. +- Coverage enabled: Set up code coverage for your repositories. See how to [upload coverage data](../coverage-reporter/index.mdx) to Codacy. +- Enforced gates: Add [gates to your repositories](../repositories-configure/adjusting-quality-gates.mdx), and preferentially [apply repositories to gate policies](./using-gate-policies.mdx). +- Protected pull requests: Protect your pull requests by [enforcing quality gates](../getting-started/integrating-codacy-with-your-git-workflow.mdx#blocking-pull-requests). +- Daily vulnerability scans: [Enable Proactive SCA](./managing-security-and-risk.mdx#dependencies-list) to protect your repositories from dependencies vulnerabilities. +- Applications scanned: [Enable App scanning](./managing-security-and-risk.mdx#app-scanning) to scan Web Applications and APIs for security vulnerabilities. -![AI Risk Checklist](images/ai-risk-checklist.png) +![AI Risk Checklist](./images/ai-risk-checklist.png) diff --git a/docusaurus/docs/organizations/audit-logs-for-organizations.mdx b/docusaurus/docs/organizations/audit-logs-for-organizations.mdx index 8d6e4cf5bf..1a8c2b137b 100644 --- a/docusaurus/docs/organizations/audit-logs-for-organizations.mdx +++ b/docusaurus/docs/organizations/audit-logs-for-organizations.mdx @@ -9,7 +9,7 @@ import Paid from '../_includes/Paid.mdx'; Codacy logs important events in your organization, reflecting when your team members execute specific operations. This enables the generation of comprehensive reports to assist you with the audit process. For example, you can track who added a repository to Codacy, or changed the settings of a coding standard. -[Organization admins and organization managers](./roles-and-permissions-for-organizations.md) can obtain the audit log data of the organization events using the Codacy API endpoint [listAuditLogsForOrganization](https://api.codacy.com/api/api-docs#listauditlogsfororganization). +[Organization admins and organization managers](./roles-and-permissions-for-organizations.mdx) can obtain the audit log data of the organization events using the Codacy API endpoint [listAuditLogsForOrganization](https://api.codacy.com/api/api-docs#listauditlogsfororganization). The retention period of audit logs for organization events is one year. @@ -24,7 +24,7 @@ The sections below list the events that Codacy logs for your organization at use |Event|Description|Action| |-----|-----------|------| |Log in|User logged in to Codacy|`user.login`| -|Create [account API token](../codacy-api/api-tokens.md#account-api-tokens)|New account API token created|`user.tokens.create`| +|Create [account API token](../codacy-api/api-tokens.mdx#account-api-tokens)|New account API token created|`user.tokens.create`| |Read account API token|List of account API tokens retrieved|`user.tokens.read`| |Delete account API token|Account API token deleted|`user.tokens.delete`| @@ -32,45 +32,46 @@ The sections below list the events that Codacy logs for your organization at use | Event | Description | Action | |-------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|---------------------------------------------------------------| -| [Add organization](./what-are-organizations.md#adding-an-organization) | Organization added to Codacy | `organizations.create` | -| [Add people](./managing-people.md#adding-people) to organization | New people added to the organization | `organizations.people.create` | -| [Join organization](./managing-people.md#joining) | User joined the organization | `organizations.join` | -| Update [repository management permissions](./roles-and-permissions-for-organizations.md#change-analysis-configuration) | Repository management permissions updated | `organizations.analysisconfigurationminimumpermission.update` | -| Assign [organization manager role](./roles-and-permissions-for-organizations.md#managing-the-organization-manager-role) | Organization manager role assigned to a team member | `organizations.security.managers.create` | +| [Add organization](./what-are-organizations.mdx#adding-an-organization) | Organization added to Codacy | `organizations.create` | +| [Add people](./managing-people.mdx#adding-people) to organization | New people added to the organization | `organizations.people.create` | +| [Join organization](./managing-people.mdx#joining) | User joined the organization | `organizations.join` | +| Update [repository management permissions](./roles-and-permissions-for-organizations.mdx#change-analysis-configuration) | Repository management permissions updated | `organizations.analysisconfigurationminimumpermission.update` | +| Assign [organization manager role](./roles-and-permissions-for-organizations.mdx#managing-the-organization-manager-role) | Organization manager role assigned to a team member | `organizations.security.managers.create` | | Revoke organization manager role | Organization manager role revoked from a team member | `organizations.security.managers.delete` | -| Update [default Git provider configuration](./integrations/default-git-provider-integration-settings.md) | Default Git provider configuration for the organization updated | `organizations.integrations.providersettings.update` | +| Update [default Git provider configuration](./integrations/default-git-provider-integration-settings.mdx) | Default Git provider configuration for the organization updated | `organizations.integrations.providersettings.update` | | Apply default Git provider configuration to all repositories | Default Git provider configuration applied to all repositories of the organization | `organizations.integrations.providersettings.apply` | | Create new organization hook | New organization webhook created | `organizations.settings.hooks.create` | -| Create new [gate policy](./using-gate-policies.md) | New gate policy created | `organizations.gatepolicies.create` | +| Create new [gate policy](./using-gate-policies.mdx) | New gate policy created | `organizations.gatepolicies.create` | | Update gate policy | Quality gate definition updated | `organizations.gatepolicies.update` | | Apply gate policy to repositories | Gate policy applied to a list of repositories | `organizations.gatepolicies.repositories.apply` | | Make gate policy default | Gate policy was made the default for the organization | `organizations.gatepolicies.setdefault` | | Make Codacy gate policy default | Built-in Codacy gate policy was made the default for the organization | `organizations.gatepolicies.setcodacydefault` | | Delete gate policy | Gate policy deleted | `organizations.gatepolicies.delete` | -| Create new [coding standard](./using-coding-standards.md) using preset sensitivity levels | New coding standard created | `organizations.presetsstandards.create` | +| Create new [coding standard](./using-coding-standards.mdx) using preset sensitivity levels | New coding standard created | `organizations.presetsstandards.create` | | Create new coding standard draft using individual language and code pattern settings | New coding standard draft created | `organizations.codingstandards.create` | | Create new coding standard from draft | New coding standard created | `organizations.codingstandards.promote` | | Update coding standard from draft | Coding standard updated | `organizations.codingstandards.promote` | | Apply coding standard to repositories | Coding standard applied to a list of repositories | `organizations.codingstandards.repositories.apply` | | Make coding standard default | Coding standard was made the default | `organizations.codingstandards.setdefault` | | Delete coding standard | Coding standard deleted | `organizations.codingstandards.delete` | -| Export [security items](./managing-security-and-risk.md) | Export security items | `organizations.security.items.export` | +| Export [security items](./managing-security-and-risk.mdx) | Export security items | `organizations.security.items.export` | | Ignore security item | Security item was ignored | `organizations.security.items.ignore` | | Unignore security item | Security item was unignored | `organizations.security.items.unignore` | | Create DAST target | A target for DAST scanning was created | `organizations.dast.target.create` | | Delete DAST target | A target for DAST scanning was deleted | `organizations.dast.target.delete` | | Analyze DAST target | Request a DAST scan of an existing target | `organizations.dast.target.analyze` | | Update security SLA configurations | The security SLA Configuration was updated | `organizations.security.sla.configuration.update` | + ### Repository |Event| Description |Action| |-----|--------------------------------------------------------------|------| -|Create new [post-commit hook](../repositories-configure/integrations/post-commit-hooks.md)| New repository hook created |`repositories.integrations.postcommithook`| -|Create [repository API token](../codacy-api/api-tokens.md#repository-api-tokens)| New repository API token created |`repositories.tokens.create`| +|Create new [post-commit hook](../repositories-configure/integrations/post-commit-hooks.mdx)| New repository hook created |`repositories.integrations.postcommithook`| +|Create [repository API token](../codacy-api/api-tokens.mdx#repository-api-tokens)| New repository API token created |`repositories.tokens.create`| |Read repository API token| List of repository API tokens retrieved |`repositories.tokens.read`| |Delete repository API token| Repository API token deleted |`repositories.tokens.delete`| -|Update Git provider integration settings
([GitHub](../repositories-configure/integrations/github-integration.md#configuring), [Bitbucket](../repositories-configure/integrations/bitbucket-integration.md#configuring), or [GitLab](../repositories-configure/integrations/gitlab-integration.md#configuring))| Git provider integration settings for the repository updated |`repositories.integrations.providersettings.update`| -|Refresh Git provider integration
(applies only to [Bitbucket](../repositories-configure/integrations/bitbucket-integration.md#refreshing) and [GitLab](../repositories-configure/integrations/gitlab-integration.md#refreshing))| Git provider integration for the repository refreshed |`repositories.integrations.refreshprovider`| +|Update Git provider integration settings
([GitHub](../repositories-configure/integrations/github-integration.mdx#configuring), [Bitbucket](../repositories-configure/integrations/bitbucket-integration.mdx#configuring), or [GitLab](../repositories-configure/integrations/gitlab-integration.mdx#configuring))| Git provider integration settings for the repository updated |`repositories.integrations.providersettings.update`| +|Refresh Git provider integration
(applies only to [Bitbucket](../repositories-configure/integrations/bitbucket-integration.mdx#refreshing) and [GitLab](../repositories-configure/integrations/gitlab-integration.mdx#refreshing))| Git provider integration for the repository refreshed |`repositories.integrations.refreshprovider`| | Update issue | For example ignore issue |`repositories.issues.update`| | Update tool | Can be change parameters or disable/enable tool |`repositories.tools.update`| | Bypass pull request | Bypass pull request by authorized person |`repositories.pullrequests.bypass`| diff --git a/docusaurus/docs/organizations/changing-your-plan-and-billing.md b/docusaurus/docs/organizations/changing-your-plan-and-billing.mdx similarity index 90% rename from docusaurus/docs/organizations/changing-your-plan-and-billing.md rename to docusaurus/docs/organizations/changing-your-plan-and-billing.mdx index b095988697..0bc0751cab 100644 --- a/docusaurus/docs/organizations/changing-your-plan-and-billing.md +++ b/docusaurus/docs/organizations/changing-your-plan-and-billing.mdx @@ -5,16 +5,16 @@ title: Changing your plan and billing Each organization on Codacy has a dedicated plan and associated billing. To make changes to the plan and billing of an organization, open your organization **Settings**, page **Plan and billing**. - +{/**/} :::note - If you're using GitHub Marketplace, update your billing details or cancel your plan directly on your [GitHub Billing page](https://github.com/settings/billing/summary). - If you cancel your plan or switch to a different Enterprise plan, some repositories may show outdated information in the Codacy UI. To update this information, reanalyze the repositories or push new commits. ::: - +{/**/} -![Plan and billing for a Codacy organization](images/organization-plan-billing.png) +![Plan and billing for a Codacy organization](./images/organization-plan-billing.png) - **To upgrade** to the Pro plan click **Choose plan**, choose between monthly or yearly billing, and provide your payment and invoice details @@ -30,7 +30,6 @@ If you have any questions or need help with your account, please contact [suppor - **If you're using GitHub Marketplace,** this configuration isn't available and team members must always wait for an organization owner to manually approve their requests to join the organization. - In some **Enterprise plans**, Codacy automatically adds to the organization new people that commit to your private repositories. However, they still need to join the organization on the Codacy app if they want to use the UI. - ::: Choose one of the following options in your organization **Settings**, page **Plan and billing**: @@ -41,4 +40,4 @@ Choose one of the following options in your organization **Settings**, page **Pl Your teammates that have already been invited to join or were added to the organization are automatically approved, and you can also skip the approval process for organization admins. -![Accepting new people to the organization](images/organization-plan-billing-people-accept.png) +![Accepting new people to the organization](./images/organization-plan-billing-people-accept.png) diff --git a/docusaurus/docs/organizations/integrations/default-git-provider-integration-settings.md b/docusaurus/docs/organizations/integrations/default-git-provider-integration-settings.mdx similarity index 64% rename from docusaurus/docs/organizations/integrations/default-git-provider-integration-settings.md rename to docusaurus/docs/organizations/integrations/default-git-provider-integration-settings.mdx index 32459700d0..773c00c2c2 100644 --- a/docusaurus/docs/organizations/integrations/default-git-provider-integration-settings.md +++ b/docusaurus/docs/organizations/integrations/default-git-provider-integration-settings.mdx @@ -2,20 +2,19 @@ title: Default Git provider integration settings --- - You can configure the default settings that Codacy uses to integrate with your Git provider when you add a new repository to Codacy. This enables you to apply the same settings across your organization repositories. To configure these default settings, open your organization **Integrations** page and select your Git provider. -![Default Git provider integration settings](images/default-git-provider-settings.png) +![Default Git provider integration settings](./images/default-git-provider-settings.png) -The organization-level Git provider integration settings define the defaults that Codacy applies to new repositories. You can then customize the settings for each individual repository, which depend on your Git provider, [GitHub](../../repositories-configure/integrations/github-integration.md), [GitLab](../../repositories-configure/integrations/gitlab-integration.md) or [Bitbucket](../../repositories-configure/integrations/bitbucket-integration.md). +The organization-level Git provider integration settings define the defaults that Codacy applies to new repositories. You can then customize the settings for each individual repository, which depend on your Git provider, [GitHub](../../repositories-configure/integrations/github-integration.mdx), [GitLab](../../repositories-configure/integrations/gitlab-integration.mdx) or [Bitbucket](../../repositories-configure/integrations/bitbucket-integration.mdx). -## Applying default settings to all repositories {#apply-all} +## Applying default settings to all repositories \{#apply-all\} To ensure that all your repositories are configured with the default Git provider integration settings defined for your organization, click the button **Apply default to all repositories**. -![Apply default settings to all repositories](images/default-git-provider-settings-apply-all.png) +![Apply default settings to all repositories](./images/default-git-provider-settings-apply-all.png) ## See also -- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow.md) +- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow.mdx) diff --git a/docusaurus/docs/organizations/integrations/jira-integration.md b/docusaurus/docs/organizations/integrations/jira-integration.mdx similarity index 79% rename from docusaurus/docs/organizations/integrations/jira-integration.md rename to docusaurus/docs/organizations/integrations/jira-integration.mdx index 00cf0d53b6..88f8188780 100644 --- a/docusaurus/docs/organizations/integrations/jira-integration.md +++ b/docusaurus/docs/organizations/integrations/jira-integration.mdx @@ -6,13 +6,13 @@ title: Organization Jira integration :::note[This integration is only available for Jira Cloud] ::: -Integrate Jira with Codacy to be able to create Jira tickets directly from Codacy findings, and import your Jira issues for [Security and risk management](../managing-security-and-risk.md) to manage them all in one place as security items. +Integrate Jira with Codacy to be able to create Jira tickets directly from Codacy findings, and import your Jira issues for [Security and risk management](../managing-security-and-risk.mdx) to manage them all in one place as security items. ## Installing the Jira integration To install the Jira integration: -1. On Jira, add the label **security** (case-insensitive) to the issues you wish to import and confirm that they use [the right Jira priorities to correctly map to item severities](../managing-security-and-risk.md#item-severities-and-deadlines). +1. On Jira, add the label **security** (case-insensitive) to the issues you wish to import and confirm that they use [the right Jira priorities to correctly map to item severities](../managing-security-and-risk.mdx#item-severities-and-deadlines). :::tip Add the **security** label as a default to all new Jira issues that track security-related work in your organization. @@ -24,13 +24,13 @@ To install the Jira integration: Use a Jira account with admin permissions when installing this integration. This lets Codacy access all issues, since the integration inherits the permissions of the account that installs it. ::: - ![Security and risk management Jira integration installation](images/jira-integration-srm-install.png) + ![Security and risk management Jira integration installation](./images/jira-integration-srm-install.png) 1. On Atlassian's website, authorize Codacy. Once successful, you're redirected back to Codacy. After installing, Codacy imports all open Jira issues labeled **security** and created up to 90 days before the integration and then retrieves updates from Jira once a day. -For more information on how this integration works, see [how Codacy manages security items](../managing-security-and-risk.md#opening-and-closing-items) and [how Codacy assigns security item severities](../managing-security-and-risk.md#item-severities-and-deadlines). +For more information on how this integration works, see [how Codacy manages security items](../managing-security-and-risk.mdx#opening-and-closing-items) and [how Codacy assigns security item severities](../managing-security-and-risk.mdx#item-severities-and-deadlines). ## Uninstalling the Jira integration @@ -50,11 +50,11 @@ Installing the Jira integration enables the feature of creating Jira tickets fro 1. Click on the options button of the issue you want to create a ticket for, and then click on **Create Jira ticket** button. - ![Create Jira Ticket from one issue](images/create-jira-ticket-for-issue.png) + ![Create Jira Ticket from one issue](./images/create-jira-ticket-for-issue.png) 1. A modal will open where you can select the Jira project, ticket type, summary and description. - ![Jira modal](images/jira-modal.png) + ![Jira modal](./images/jira-modal.png) :::important The Jira ticket creation doesn't support projects with mandatory custom fields @@ -64,7 +64,7 @@ Installing the Jira integration enables the feature of creating Jira tickets fro To create a Jira ticket for multiple issues, you can do so by navigating to a list of issues and clicking on the **Create a Jira ticket for these issues** button at the top of the list -![Create Jira Ticket for multiple issues](images/create-jira-ticket-for-multiple-issues.png) +![Create Jira Ticket for multiple issues](./images/create-jira-ticket-for-multiple-issues.png) :::note You can create a Jira ticket for up to 50 issues / ticket @@ -74,10 +74,10 @@ You can create a Jira ticket for up to 50 issues / ticket To create a Jira ticket for a dependency, navigate to the page of the dependency and click on **Create a Jira ticket for this dependency** -![Create Jira Ticket for a dependency](images/jira-ticket-dependency.png) +![Create Jira Ticket for a dependency](./images/jira-ticket-dependency.png) ### Jira tickets for files To create a Jira ticket for a file, navigate to the page of the file and click on **Create a Jira ticket for this file** -![Create Jira Ticket for a file](images/jira-ticket-file.png) +![Create Jira Ticket for a file](./images/jira-ticket-file.png) diff --git a/docusaurus/docs/organizations/integrations/slack-integration.md b/docusaurus/docs/organizations/integrations/slack-integration.mdx similarity index 90% rename from docusaurus/docs/organizations/integrations/slack-integration.md rename to docusaurus/docs/organizations/integrations/slack-integration.mdx index c4191b1724..ae4fd74b0d 100644 --- a/docusaurus/docs/organizations/integrations/slack-integration.md +++ b/docusaurus/docs/organizations/integrations/slack-integration.mdx @@ -22,11 +22,11 @@ To install the Slack integration: 1. Paste the Incoming WebHook URL in the field and click **Install Slack**. - ![Slack integration installation](images/slack-integration-install.png) + ![Slack integration installation](./images/slack-integration-install.png) Once the Slack integration is installed, Codacy sends a confirmation message to the Slack channel you configured when creating the Incoming WebHook. From there on, Codacy notifies you on the same channel whenever a new critical Security issue is detected in the default branch of any repository in your organization. -![Slack integration message](images/slack-integration-message.png) +![Slack integration message](./images/slack-integration-message.png) ## Uninstalling the Slack integration diff --git a/docusaurus/docs/organizations/issues-metrics.md b/docusaurus/docs/organizations/issues-metrics.mdx similarity index 84% rename from docusaurus/docs/organizations/issues-metrics.md rename to docusaurus/docs/organizations/issues-metrics.mdx index 03cc3b7ab5..857e399708 100644 --- a/docusaurus/docs/organizations/issues-metrics.md +++ b/docusaurus/docs/organizations/issues-metrics.mdx @@ -4,15 +4,15 @@ description: The organization's Issues dashboard provides an overview of all the --- -The **Issues metrics** dashboard provides an overview of all the issues detected in the repositories belonging to your Git provider organization. Here, you can navigate through the issues detected in your repositories and filter them by severity and category. You can also filter the issues by selecting specific repositories or using [the segments that you have set up](segments.md). +The **Issues metrics** dashboard provides an overview of all the issues detected in the repositories belonging to your Git provider organization. Here, you can navigate through the issues detected in your repositories and filter them by severity and category. You can also filter the issues by selecting specific repositories or using [the segments that you have set up](./segments.mdx). -![Open issues dashboard](images/open-issues-dashboard.png) +![Open issues dashboard](./images/open-issues-dashboard.png) To access the Issues Metrics dashboard, select an organization from the top navigation bar and click on the **Open Issues** tab at the top of the page. By default, the Issues Metrics dashboard displays metrics as the absolute number of issues. You can change the display to **Issues per 1,000 lines of code** by clicking on the ellipsis icon at the top right of the Open Issues tab. From here, you can also customize the period against which you want to compare the issues detected in your repositories. When available, comparisons against the previously selected period will be shown next to each value, and you can hover over the comparison to see the variation. -![Open issues tab options](images/open-issues-tab-options.png) +![Open issues tab options](./images/open-issues-tab-options.png) The Issues Metrics dashboard includes the following sections to help you monitor the issues detected in your repositories: @@ -30,13 +30,13 @@ In each section, you can click on the ellipsis icon in the top right corner to e This chart displays the current number of open issues detected in your repositories, grouped by severity. You can click on each severity level to filter the results in the rest of the dashboard. -![Open issues by severity](images/open-issues-by-severity.png) +![Open issues by severity](./images/open-issues-by-severity.png) ## Open Issues by Category This chart displays the current number of open issues detected in your repositories, grouped by category. You can click on each category to filter the results in the rest of the dashboard. -![Open issues by category](images/open-issues-by-category.png) +![Open issues by category](./images/open-issues-by-category.png) ## Open Issues Evolution @@ -46,18 +46,18 @@ This chart shows the trend of open issues in your repositories over time, either Data for each period represents an average of the values during that period. ::: -![Open issues evolution by severity](images/open-issues-evolution-by-severity.png) +![Open issues evolution by severity](./images/open-issues-evolution-by-severity.png) -![Open issues evolution by category](images/open-issues-evolution-by-category.png) +![Open issues evolution by category](./images/open-issues-evolution-by-category.png) ## Issues Activity This chart displays the number of issues fixed and introduced in your repositories over time. You can hover over the chart to see the number of issues fixed and introduced on a specific date. You can also click on the chart to filter results in the **Repositories with the Most Issues** list. -![Issues activity](images/issues-activity.png) +![Issues activity](./images/issues-activity.png) ## Repositories with the Most Issues This list displays repositories in descending order based on the number of issues. Depending on the filters applied, the list will show repositories with the most open issues, grouped by severity or category, or within a specific period. -![Open issues ranking](images/open-issues-ranking.png) +![Open issues ranking](./images/open-issues-ranking.png) diff --git a/docusaurus/docs/organizations/managing-people.md b/docusaurus/docs/organizations/managing-people.mdx similarity index 81% rename from docusaurus/docs/organizations/managing-people.md rename to docusaurus/docs/organizations/managing-people.mdx index 2e817fcf0e..b4f12a56b9 100644 --- a/docusaurus/docs/organizations/managing-people.md +++ b/docusaurus/docs/organizations/managing-people.mdx @@ -23,22 +23,22 @@ To list and manage the people in your organization, open your organization **Set ![People in an organization](images/organization-people.png) -## Joining an organization {#joining} -To become a member of an organization on Codacy app you must [sign up to Codacy](../getting-started/codacy-quickstart.md) using your Git provider and follow the instructions to either join an existing organization or add a new one. +## Joining an organization \{#joining\} +To become a member of an organization on Codacy app you must [sign up to Codacy](../getting-started/codacy-quickstart.mdx) using your Git provider and follow the instructions to either join an existing organization or add a new one. To join or add an organization after completing the sign-up process, click **Organizations** on the top right-hand menu under your avatar: -![Joining an organization](images/organization-join.png) +![Joining an organization](./images/organization-join.png) :::note -**On Codacy Cloud**, organization admins [control if team members need an approval](changing-your-plan-and-billing.md#allowing-new-people-to-join-your-organization) before joining their organizations. +**On Codacy Cloud**, organization admins [control if team members need an approval](./changing-your-plan-and-billing.mdx#allowing-new-people-to-join-your-organization) before joining their organizations. ::: -## Adding people to your organization {#adding-people} +## Adding people to your organization \{#adding-people\} **On Codacy Cloud**, organization admins can also add teammates to their organization on Codacy. This is useful to allow Codacy to analyze commits to private repositories by committers who haven't signed up to Codacy or joined the organization yet. :::tip -You can also use the Codacy API to [add people to your Codacy organization](../codacy-api/examples/adding-people-to-codacy-programmatically.md). This is useful while adding a large amount of people or to automatically add new members of your Git provider organization to Codacy. +You can also use the Codacy API to [add people to your Codacy organization](../codacy-api/examples/adding-people-to-codacy-programmatically.mdx). This is useful while adding a large amount of people or to automatically add new members of your Git provider organization to Codacy. ::: To add people to your organization: @@ -56,24 +56,24 @@ To add people to your organization: Alternatively, click **Add people using email addresses** to manually enter the list of email addresses of the people you wish to add. :::caution - - To prevent the same person from occupying more than one seat in your organization, make sure your teammates [update the email addresses associated with their Codacy account](../account/emails.md#updating). - - **On GitHub and Bitbucket organizations**, Codacy automatically reduces seat duplication when commits are pushed by associating all the commit email addresses from the same Git provider user with a single Codacy committer. This mechanism requires that all developers committing to your private repositories [set their Git email address](../account/emails.md#git-config) and add all their email addresses to their [GitHub account](https://github.com/settings/emails) or [Bitbucket account](https://bitbucket.org/account/settings/email/). + - To prevent the same person from occupying more than one seat in your organization, make sure your teammates [update the email addresses associated with their Codacy account](../account/emails.mdx#updating). + - **On GitHub and Bitbucket organizations**, Codacy automatically reduces seat duplication when commits are pushed by associating all the commit email addresses from the same Git provider user with a single Codacy committer. This mechanism requires that all developers committing to your private repositories [set their Git email address](../account/emails.mdx#git-config) and add all their email addresses to their [GitHub account](https://github.com/settings/emails) or [Bitbucket account](https://bitbucket.org/account/settings/email/). - Codacy doesn't allow you to have one email associated with more than one GitHub account. You can manage your [associated emails in the provider GitHub](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account). ::: - ![Adding people to your organization](images/organization-people-add-modal.png) + ![Adding people to your organization](./images/organization-people-add-modal.png) 1. Confirm the updated billing details displayed at the bottom of the window and click the button **Add people**. Codacy emails the newly added people inviting them to log in. -## Removing people from your organization {#removing-people} +## Removing people from your organization \{#removing-people\} Members of an organization on Codacy can remove themselves from the organization, and organization admins can also remove other members and committers. When a member or committer leaves an organization: - Codacy stops analyzing their commits to private repositories in the organization - **On GitLab and Bitbucket organizations** Codacy stops analyzing repositories that were added by the member -- Organizations must have at least one admin, so when the last organization admin leaves the organization they must either add someone else as admin or [delete the organization](../organizations/what-are-organizations.md#deleting-an-organization) +- Organizations must have at least one admin, so when the last organization admin leaves the organization they must either add someone else as admin or [delete the organization](../organizations/what-are-organizations.mdx#deleting-an-organization) To remove people from your organization open your organization **Settings**, page **People**, click the icon next to the member or committer you wish to remove, and select **Remove from organization**. @@ -81,9 +81,9 @@ To remove people from your organization open your organization **Settings**, pag For Enterprise plans where Codacy automatically manages seat usage for your organization, you can't remove people who had their commits analyzed within the last 90 days because their are still active within the billing period. However, if you remove them from the organization on your Git provider, they no longer have permissions to your repositories on Codacy. ::: -![Removing people from your organization](images/organization-people-remove.png) +![Removing people from your organization](./images/organization-people-remove.png) ## See also -- [Adding people to Codacy programmatically](../codacy-api/examples/adding-people-to-codacy-programmatically.md) -- [Roles and permissions for organizations](roles-and-permissions-for-organizations.md) +- [Adding people to Codacy programmatically](../codacy-api/examples/adding-people-to-codacy-programmatically.mdx) +- [Roles and permissions for organizations](roles-and-permissions-for-organizations.mdx) diff --git a/docusaurus/docs/organizations/managing-repositories.mdx b/docusaurus/docs/organizations/managing-repositories.mdx index d4e9eba8df..5aac7044ca 100644 --- a/docusaurus/docs/organizations/managing-repositories.mdx +++ b/docusaurus/docs/organizations/managing-repositories.mdx @@ -4,7 +4,7 @@ title: Managing repositories import Paid from '../_includes/Paid.mdx'; -Users with the [necessary permissions on your Git provider](roles-and-permissions-for-organizations.md) can **add** repositories to Codacy to start analyzing them. The remaining organization members with access to the added repositories can then **follow** on Codacy the repositories of their interest. +Users with the [necessary permissions on your Git provider](roles-and-permissions-for-organizations.mdx) can **add** repositories to Codacy to start analyzing them. The remaining organization members with access to the added repositories can then **follow** on Codacy the repositories of their interest. :::caution To see your repositories on Codacy, make sure that you have the necessary permissions over the repositories on the Git provider and that Codacy has the necessary permissions to access the repositories. @@ -14,24 +14,24 @@ To see all the repositories that you follow on Codacy, open the page **Repositor Across the application, Codacy calculates and displays data for the repositories on this list. -![Repositories list](images/repositories.png) +![Repositories list](./images/repositories.png) -This page lists the repositories that you follow on Codacy sorted by [last updated date](organization-overview.md#last-updated-repositories), and allows you to compare the repositories on the list according to the following metrics: +This page lists the repositories that you follow on Codacy sorted by [last updated date](organization-overview.mdx#last-updated-repositories), and allows you to compare the repositories on the list according to the following metrics: -- [Grade](../faq/code-analysis/which-metrics-does-codacy-calculate.md#grade) -- [Issues](../faq/code-analysis/which-metrics-does-codacy-calculate.md#issues) -- [Complexity](../faq/code-analysis/which-metrics-does-codacy-calculate.md#complexity) -- [Duplication](../faq/code-analysis/which-metrics-does-codacy-calculate.md#duplication) -- [Coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.md#code-coverage) +- [Grade](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#grade) +- [Issues](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#issues) +- [Complexity](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#complexity) +- [Duplication](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#duplication) +- [Coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#code-coverage) The list also displays error and warning messages for repositories that have issues, such as when there are no committers added to the organization or when Codacy stopped having access to the repository. Hover the mouse cursor over the warning icons or open the repository to see more details. If you follow many repositories, you can use the search field above the list to quickly find a specific repository. -## Adding a repository {#adding-a-repository} +## Adding a repository \{#adding-a-repository\} -Users with the [necessary permissions](roles-and-permissions-for-organizations.md) can add a repository to Codacy to start analyzing it. +Users with the [necessary permissions](roles-and-permissions-for-organizations.mdx) can add a repository to Codacy to start analyzing it. :::note When a user adds a new repository to Codacy, all organization admins start following it automatically. @@ -43,7 +43,7 @@ To add new repositories to Codacy: 1. Click **Add** next to the repositories you want to add. If you have many repositories, you can use the search field above the list to quickly find a specific repository. - ![Adding a repository](images/repositories-add.png) + ![Adding a repository](./images/repositories-add.png) 1. When you're done, close the window to return to your repositories list. @@ -51,8 +51,8 @@ Although Codacy immediately starts analyzing newly added repositories, they disp ![Waiting for first analysis results](images/repositories-analyzing.png) -## Following or unfollowing a repository {#follow-unfollow} -Users with [no permission to add a repository](roles-and-permissions-for-organizations.md) to Codacy, can follow that repository after it has been added to Codacy, and stop following it at any time. +## Following or unfollowing a repository \{#follow-unfollow\} +Users with [no permission to add a repository](roles-and-permissions-for-organizations.mdx) to Codacy, can follow that repository after it has been added to Codacy, and stop following it at any time. To follow or unfollow repositories on Codacy: @@ -60,7 +60,7 @@ To follow or unfollow repositories on Codacy: 1. Click **Follow** or **Unfollow** next to the repositories you want to follow or unfollow. If you have many repositories, you can use the search field above the list to quickly find a specific repository. - ![Adding a repository](images/repositories-follow.png) + ![Adding a repository](./images/repositories-follow.png) 1. When you're done, close the window to return to your repositories list. @@ -71,9 +71,9 @@ Conversely, you automatically **stop following** a repository as soon as you try ::: -## Finding your repositories with Segments {#provider-segments} -Codacy allows you to utilise [**Segments**](../segments) to categorize and filter repositories more effectively within the Codacy platform. -:::note[Check out how to [enable and configure **Segments**](../segments/#enabling-segments)] +## Finding your repositories with Segments \{#provider-segments\} +Codacy allows you to utilise [**Segments**](./segments.mdx) to categorize and filter repositories more effectively within the Codacy platform. +:::note[Check out how to [enable and configure **Segments**](./segments.mdx#enabling-segments)] ::: ![Repositories list filter](images/organization-manage-repos-custom-properties.png) @@ -84,5 +84,5 @@ Codacy allows you to utilise [**Segments**](../segments) to categorize and filte ## See also -- [How to setup Segments?](../segments) -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) +- [How to setup Segments?](./segments.mdx) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx) diff --git a/docusaurus/docs/organizations/managing-security-and-risk.md b/docusaurus/docs/organizations/managing-security-and-risk.mdx similarity index 88% rename from docusaurus/docs/organizations/managing-security-and-risk.md rename to docusaurus/docs/organizations/managing-security-and-risk.mdx index 691c84a253..361cbc44cf 100644 --- a/docusaurus/docs/organizations/managing-security-and-risk.md +++ b/docusaurus/docs/organizations/managing-security-and-risk.mdx @@ -3,7 +3,7 @@ title: Managing security and risk --- -The Security and risk management feature helps you quickly identify, track, and address security across your organization by automatically opening time-bound, prioritized findings whenever security problems are detected in your organization repositories, in your [connected Jira instance](./integrations/jira-integration.md), or as a result of [penetration testing](https://www.codacy.com/security). +The Security and risk management feature helps you quickly identify, track, and address security across your organization by automatically opening time-bound, prioritized findings whenever security problems are detected in your organization repositories, in your [connected Jira instance](./integrations/jira-integration.mdx), or as a result of [penetration testing](https://www.codacy.com/security). Under Security and risk management, you can find the following pages to help you monitor the security of your repositories: @@ -13,14 +13,14 @@ Under Security and risk management, you can find the following pages to help you In addition, on these pages, you can [share filtered views of findings](#sharing-filtered-view), [export findings as a CSV file](#exporting-the-security-item-list), and [review severity rules and integration settings](#reviewing-settings) -## Overview {#dashboard} +## Overview \{#dashboard\} The **Security and risk management overview** page provides a high-level view of the security posture of your organization, including the number of open findings, the distribution of open findings by severity, the history of finding resolution, and a breakdown of the most high-risk repositories and most detected security categories. Use this page to assess your organization's security posture and its progress over time, identify areas for improvement, and share findings with stakeholders. To access the overview page, select an organization from the top navigation bar and select **Security and risk** on the left navigation sidebar. -![Security and risk management overview page](images/security-risk-management-overview.png) +![Security and risk management overview page](./images/security-risk-management-overview.png) The overview page includes six panels: @@ -31,8 +31,8 @@ The overview page includes six panels: - [Top 10 high-risk repositories](#top-10-high-risk-repositories) - [Top 10 common security categories](#top-10-common-security-categories) -To limit the information displayed in each panel, use the filter drop-down above the main area, and choose the relevant repositories, or utilise [**Segments**](../segments). -:::note[Check out how to [enable and configure **Segments**](../segments/#enabling-segments)] +To limit the information displayed in each panel, use the filter drop-down above the main area, and choose the relevant repositories, or utilise [**Segments**](./segments.mdx). +:::note[Check out how to [enable and configure **Segments**](./segments.mdx#enabling-segments)] ::: @@ -42,7 +42,7 @@ The **Open findings overview** panel displays the total number of open security To access the findings page with the corresponding filter applied, click on a number. -![Security and risk management open findings overview panel](images/security-risk-management-overview-open.png) +![Security and risk management open findings overview panel](./images/security-risk-management-overview-open.png) ### Open findings distribution @@ -52,7 +52,7 @@ To select the desired distribution, use the drop-down in the top right-hand corn To access the findings page with the corresponding filter applied, click on a number. -![Security and risk management open findings distribution panel](images/security-risk-management-overview-distribution.png) +![Security and risk management open findings distribution panel](./images/security-risk-management-overview-distribution.png) ### Open findings history @@ -60,7 +60,7 @@ The **Open findings history** graph shows the open findings trends over the past For a detailed view of the distribution on a specific week, hover over the graph. -![Security and risk management open findings history panel](images/security-risk-management-overview-history-open.png) +![Security and risk management open findings history panel](./images/security-risk-management-overview-history-open.png) ### Activity history @@ -70,7 +70,7 @@ To filter the graph by finding severity, use the drop-down in the top right-hand For a detailed view of the counts on a specific week, hover over the graph. -![Security and risk management activity history panel](images/security-risk-management-overview-history-activity.png) +![Security and risk management activity history panel](./images/security-risk-management-overview-history-activity.png) ### Top 10 high-risk repositories @@ -80,7 +80,7 @@ The **Top 10 high-risk repositories** list shows the repositories with the highe This panel may list fewer than ten repositories if there are fewer than ten repositories with open findings in the organization or if fewer than ten repositories are selected in the dropdown **Repository** filter. ::: -![Security and risk management high risk repositories panel](images/security-risk-management-overview-top-risk.png) +![Security and risk management high risk repositories panel](./images/security-risk-management-overview-top-risk.png) ### Top 10 common security categories @@ -88,75 +88,75 @@ The **Top 10 common security categories** list shows the most common security ca To access the findings page with the corresponding filter applied, click on a category. -![Security and risk management top categories panel](images/security-risk-management-overview-top-categories.png) +![Security and risk management top categories panel](./images/security-risk-management-overview-top-categories.png) -## Findings {#item-list} +## Findings \{#item-list\} The **Security and risk management findings** page displays a filtered list of findings. By default, you are shown the findings that are currently opened and this list is sorted by **Latest findings** found. You can click on the sort dropdown to sort the findings by detection date - latest or oldest. Use this page to review and prioritize findings and track the progress of your security efforts. To access the findings page, access the [overview page](#dashboard) and click the **Findings** tab. -![Security and risk management findings page](images/security-risk-management-findings.png) +![Security and risk management findings page](./images/security-risk-management-findings.png) -On the left section of the page, besides sorting, you can update the filtering criteria by clicking the [**Segments**](../segments) , **Repositories**, **Severities**, **Statuses**, **Security categories**, or **Scan types** dropdowns above the list. -:::note[Check out how to [enable and configure **Segments**](../segments/#enabling-segments)] +On the left section of the page, besides sorting, you can update the filtering criteria by clicking the [**Segments**](./segments.mdx) , **Repositories**, **Severities**, **Statuses**, **Security categories**, or **Scan types** dropdowns above the list. +:::note[Check out how to [enable and configure **Segments**](./segments.mdx#enabling-segments)] ::: On the right section, you can view the filtered list of findings. Each finding card offers a quick overview of the vulnerability found, including its title, [source platform](#opening-and-closing-items), [scan type](#scan-types), [security category](#supported-security-categories), and related information such as the repository name, Jira issue key, or affected URL targets. To find out more, click this overview to navigate to the finding details on the source platform. -![Security and risk management finding page](images/security-risk-management-finding-details.png) +![Security and risk management finding page](./images/security-risk-management-finding-details.png) The same Common Vulnerability and Exposure can be classified with different severities in different sources, like cve.org or NVD, and Trivy uses these and other sources to update their database. As such, there may be situations where the severity attributed to a Finding by Trivy is not in line with a specific source. Subsequent analysis can then close a Finding and re-open it with a different severity, if a Trivy database update occurs. -## Sharing a filtered view of findings {#sharing-filtered-view} +## Sharing a filtered view of findings \{#sharing-filtered-view\} To share the current view of the overview or findings page, click the **Copy URL** button in the top right-hand corner of the page. This action copies the URL with the current filters applied to the clipboard. -:::caution[ [**Segments**](../segments) filter won't be considered when sharing the filtered view] +:::caution[ [**Segments**](./segments.mdx) filter won't be considered when sharing the filtered view] ::: -## Ignoring findings {#ignoring-findings} -:::note[This feature is available only to organization admins and organization managers except for findings detected on [Git repositories](#opening-and-closing-items). For those findings, [repository permissions are respected](../repositories/issues.md#ignoring-and-managing-issues)] +## Ignoring findings \{#ignoring-findings\} +:::note[This feature is available only to organization admins and organization managers except for findings detected on [Git repositories](#opening-and-closing-items). For those findings, [repository permissions are respected](../repositories/issues.mdx#ignoring-and-managing-issues)] ::: You can ignore a finding using the context menu both in the findings list page and the findings details page. When ignoring a finding you can optionally specify a reason for doing so. -![Security and risk management finding ignore](images/security-risk-management-finding-ignore.png) +![Security and risk management finding ignore](./images/security-risk-management-finding-ignore.png) From an organization standpoint, ignoring a finding means that you accept the risk it poses and you're not planning on addressing the issue. From Codacy's standpoint, ignoring a finding means it will be removed from the metrics featured in the [overview page](#dashboard) page. Note that the [Open Findings history](#open-findings-history) chart will only be changed at the start of next week. -:::note[[Jira](./integrations/jira-integration.md) findings can't be ignored in Codacy. You should closed the issue directly in Jira.] +:::note[[Jira](./integrations/jira-integration.mdx) findings can't be ignored in Codacy. You should closed the issue directly in Jira.] ::: -:::caution[Ignoring findings detected on [Git repositories](#opening-and-closing-items) will also [ignore the issue at the repository level](../repositories/issues.md#ignoring-and-managing-issues).] +:::caution[Ignoring findings detected on [Git repositories](#opening-and-closing-items) will also [ignore the issue at the repository level](../repositories/issues.mdx#ignoring-and-managing-issues).] ::: You can still see **Ignored** findings in the [findings list](#item-list), by filtering for the **Ignored** status in the **Statuses** dropdown. You can assess which status a finding has at his overview, on the right top corner. -![Security and risk management finding unignore list](images/security-risk-management-finding-unignore-list.png) +![Security and risk management finding unignore list](./images/security-risk-management-finding-unignore-list.png) An Ignored finding can be **unignored** directly from the [findings list](#item-list) or by going to the same menu in the finding details page. Note that in this page you can also find out more about who ignored the finding and why, if such a reason was provided. Unignoring a finding reverts the effects of ignoring it. -![Security and risk management finding unignore](images/security-risk-management-finding-unignore.png) +![Security and risk management finding unignore](./images/security-risk-management-finding-unignore.png) -:::caution[Unignoring findings detected on [Git repositories](#opening-and-closing-items) will also [unignore the issue at the repository level](../repositories/issues.md#ignoring-and-managing-issues).] +:::caution[Unignoring findings detected on [Git repositories](#opening-and-closing-items) will also [unignore the issue at the repository level](../repositories/issues.mdx#ignoring-and-managing-issues).] ::: -:::note[Ignoring and unignoring findings are [auditable actions](../organizations/audit-logs-for-organizations.md#organization).] +:::note[Ignoring and unignoring findings are [auditable actions](../organizations/audit-logs-for-organizations.mdx#organization).] ::: -## Exporting findings {#exporting-the-security-item-list} +## Exporting findings \{#exporting-the-security-item-list\} :::note[This feature is available only to organization admins and organization managers] ::: To export a list of findings as a CSV file, click the options menu in the top right-hand corner of the page and select **Export findings (.csv)**. The exported list always includes all findings, ignoring any applied filters. -## Reviewing severity rules and integration settings {#reviewing-settings} -To [review the severity assignment rules](#item-severities-and-deadlines) or manage the integration with [Jira](./integrations/jira-integration.md) or [Slack](./integrations/slack-integration.md), click the options menu in the top right-hand corner of the page and select respectively **See severity rules** or **View integrations**. +## Reviewing severity rules and integration settings \{#reviewing-settings\} +To [review the severity assignment rules](#item-severities-and-deadlines) or manage the integration with [Jira](./integrations/jira-integration.mdx) or [Slack](./integrations/slack-integration.mdx), click the options menu in the top right-hand corner of the page and select respectively **See severity rules** or **View integrations**. -## How Codacy manages findings {#opening-and-closing-items} +## How Codacy manages findings \{#opening-and-closing-items\} :::caution To open and close findings, Codacy must detect when the associated issues are introduced and fixed. The detection logic is platform-dependent and is described below. ::: @@ -170,12 +170,12 @@ Codacy closes a finding when the source platform stops detecting the associated The following section details when Codacy opens and closes findings for each supported platform. -### How Codacy manages findings detected on Git repositories {#opening-and-closing-codacy-items} +### How Codacy manages findings detected on Git repositories \{#opening-and-closing-codacy-items\} :::note To make sure that Codacy detects security issues correctly: -- [Enable code patterns](../repositories-configure/configuring-code-patterns.md) belonging to the Security category. These patterns are enabled by default, but may not be on custom configurations. -- Alternatively, [apply a coding standard](using-coding-standards.md) that includes patterns belonging to the Security category. +- [Enable code patterns](../repositories-configure/configuring-code-patterns.mdx) belonging to the Security category. These patterns are enabled by default, but may not be on custom configurations. +- Alternatively, [apply a coding standard](using-coding-standards.mdx) that includes patterns belonging to the Security category. - Confirm that the latest [commits](../repositories/commits.mdx) to the default branches of your repositories are analyzed. ::: @@ -185,16 +185,16 @@ Codacy opens a new finding when it detects a new security issue on the default b Codacy closes a finding in either of the following cases: - Codacy detects that the associated issue isn't present in the most recent analyzed commit and therefore is fixed -- You [ignore the associated issue](../repositories/issues.md#ignoring-and-managing-issues) -- You [disable the tool](../repositories-configure/configuring-code-patterns.md) that found the associated issue +- You [ignore the associated issue](../repositories/issues.mdx#ignoring-and-managing-issues) +- You [disable the tool](../repositories-configure/configuring-code-patterns.mdx) that found the associated issue :::caution Deleting a repository deletes all open findings belonging to that repository. ::: -### How Codacy manages findings detected during software composition analysis (SCA) {#opening-and-closing-sca-items} +### How Codacy manages findings detected during software composition analysis (SCA) \{#opening-and-closing-sca-items\} :::note -To make sure that Codacy detects dependency issues correctly, [enable code patterns](../repositories-configure/configuring-code-patterns.md) belonging to the Trivy tool. +To make sure that Codacy detects dependency issues correctly, [enable code patterns](../repositories-configure/configuring-code-patterns.mdx) belonging to the Trivy tool. ::: Vulnerable dependencies are a specific GIT repository finding. Similarly to other repository findings, Codacy opens an issue whenever a commit is analyzed. @@ -206,9 +206,9 @@ The proactive SCA scanning is a business tier feature. If you are a Codacy Pro c ::: -### How Codacy manages findings detected on Jira {#opening-and-closing-jira-items} +### How Codacy manages findings detected on Jira \{#opening-and-closing-jira-items\} :::note -- For Codacy to detect Jira issues, you must [integrate Jira with Security and risk management](./integrations/jira-integration.md). +- For Codacy to detect Jira issues, you must [integrate Jira with Security and risk management](./integrations/jira-integration.mdx). - Codacy retrieves updates from Jira once a day. If an issue is opened and closed on the same day, Codacy may not detect it. - To make sure that Codacy detects Jira issues correctly, assign the **security** label when creating the issue or immediately after. ::: @@ -217,7 +217,7 @@ Codacy opens a new finding when it detects a new Jira issue with a **security** Codacy closes a finding when it detects that the associated Jira issue is marked as Closed. -### How Codacy manages findings detected during penetration testing {#opening-and-closing-pen-testing-items} +### How Codacy manages findings detected during penetration testing \{#opening-and-closing-pen-testing-items\} :::note Penetration testing is available upon request and is provided by a third-party partner. See [how to request penetration testing for your organization](https://www.codacy.com/security). ::: @@ -226,16 +226,16 @@ Codacy opens a finding for each security issue detected during a penetration tes Codacy closes a finding when a subsequent penetration test doesn't detect the underlying security issue. -### How Codacy manages findings detected during application scanning (DAST) {#opening-and-closing-app-scanning-items} +### How Codacy manages findings detected during application scanning (DAST) \{#opening-and-closing-app-scanning-items\} :::note -To view application scanning findings, also known as DAST (Dynamic Application Security Testing) findings, you must first [generate a DAST report and upload it to Codacy](../codacy-api/examples/uploading-dast-results.md). +To view application scanning findings, also known as DAST (Dynamic Application Security Testing) findings, you must first [generate a DAST report and upload it to Codacy](../codacy-api/examples/uploading-dast-results.mdx). ::: Codacy opens a finding for each security issue detected in the DAST report. If subsequent reports identify the same issue, Codacy updates the existing finding. Codacy closes a finding when it's not detected in a subsequent DAST report. If a previously closed issue reappears in a later report, Codacy reopens the finding. -## Finding severities and deadlines {#item-severities-and-deadlines} +## Finding severities and deadlines \{#item-severities-and-deadlines\} The following table defines finding severities and the default number of days to the deadline to fix the associated security issue, based on the importance of the underlying issue: | Finding
severity |
Days to deadline | Underlying Codacy
issue severity | Underlying Jira
issue priority 1 | @@ -247,8 +247,8 @@ The following table defines finding severities and the default number of days to 1 Those listed are the default Jira priority names. If you rename a default Jira priority, it keeps the correct mapping. -### Customize deadlines {#item-configurable-deadlines} -:::note[This feature is available only to [organization admins and organization managers](../organizations/roles-and-permissions-for-organizations.md).] +### Customize deadlines \{#item-configurable-deadlines\} +:::note[This feature is available only to [organization admins and organization managers](../organizations/roles-and-permissions-for-organizations.mdx).] ::: You can configure your findings deadline by clicking on the "Configure SLAs" button, on the right corner of the page. @@ -262,7 +262,7 @@ In the open configuration modal you'll be able to input your deadline preference As soon as changes are saved, your open findings statuses will be updated accordingly. You are also able to reset to Codacy default deadline values (see table above) at any time. -## Finding statuses {#item-statuses} +## Finding statuses \{#item-statuses\} The following table describes how finding statuses map to deadlines: @@ -302,18 +302,18 @@ The following table describes how finding statuses map to deadlines: ## Supported security categories :::note -Due to a recent update, some issues may be temporarily assigned the **Not yet categorized** category. To categorize these issues, you can [reanalyze the default branch of the relevant repository](../faq/repositories/how-do-i-reanalyze-my-repository.md#reanalyzing-a-branch). For a list of repositories that have issues with this category, use the **Security category** filter on the [Findings](#item-list) page. +Due to a recent update, some issues may be temporarily assigned the **Not yet categorized** category. To categorize these issues, you can [reanalyze the default branch of the relevant repository](../faq/repositories/how-do-i-reanalyze-my-repository.mdx#reanalyzing-a-branch). For a list of repositories that have issues with this category, use the **Security category** filter on the [Findings](#item-list) page. Note that some issues just don't have a security category. These issues will remain **Not yet categorized**. ::: Each Codacy issue reported by Security and risk management belongs to one of the following security categories: - +-->*/} | Security category | Description | |------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -359,7 +359,7 @@ The following table lists the available scan types and their descriptions: Security and risk management supports checking the languages and infrastructure-as-code platforms below for any Codacy security issues reported by the corresponding tools: - +-->*/}
@@ -539,7 +539,7 @@ Security and risk management supports checking the languages and infrastructure-
-## Dependencies {#dependencies-list} +## Dependencies \{#dependencies-list\} :::caution The dependency tab is a business-tier feature. If you are a Codacy Pro customer interested in upgrading to gain access to this feature, contact our customer success team. ::: @@ -549,7 +549,7 @@ The **Security and risk management Dependencies** page displays a unified view o To access the dependencies page, access the [overview page](#dashboard) and click the **Dependencies** tab. -![Security and risk management dependencies page](images/security-risk-management-dependencies-list.png) +![Security and risk management dependencies page](./images/security-risk-management-dependencies-list.png) When viewing dependencies, you'll be presented with a list of the dependencies used by all repositories in your organization. For each dependency, you'll be able to see how many repositories are making use of it, how many different versions you are using across all repositories, and how many security findings were found due to the presence of that dependency. @@ -560,11 +560,11 @@ You can sort the dependencies list using the sort dropdown to prioritize depende You're also able to click any dependency to find out more information about it. -![Security and risk management dependency page](images/security-risk-management-dependencies-single.png) +![Security and risk management dependency page](./images/security-risk-management-dependencies-single.png) The dependency overview page offers a quick bird's-eye view of that particular dependency. You'll be able to see all different versions that are being used, including which repository is using them, the oldest and most recent versions you're leveraging, as well as the highest criticality of security issues, the license 6 applied to any particular version of that dependency, and the [OSSF Scorecard](#ossf-scorecard) security assessment. -### OSSF Scorecard {#ossf-scorecard} +### OSSF Scorecard \{#ossf-scorecard\} The **OSSF Scorecard** feature provides additional security insights for your dependencies by displaying security assessment data from the Open Source Security Foundation (OSSF) Scorecard project. The OSSF Scorecard is an automated tool that evaluates open source repositories against a comprehensive set of security best practices. It performs various checks on a dependency's repository to assess whether the project follows security best practices and helps determine if the dependency is safe for consumption. @@ -584,18 +584,18 @@ When available, OSSF Scorecard information appears on the dependency overview pa This information helps you make informed decisions about the security risks associated with your dependencies and identify which dependencies may require additional scrutiny or alternative options. -![Security and risk management OSSF scorecard report](images/security-risk-management-ossf-scorecard.png) +![Security and risk management OSSF scorecard report](./images/security-risk-management-ossf-scorecard.png) 1: Semgrep supports additional security rules when signing up for [Semgrep Pro](https://semgrep.dev/pricing/). 2: Currently, Trivy only supports scanning YAML files on this platform. -3: Supported as a [client-side tool](../repositories-configure/local-analysis/client-side-tools.md). +3: Supported as a [client-side tool](../repositories-configure/local-analysis/client-side-tools.mdx). 4: Includes the plugin [Find Security Bugs](https://find-sec-bugs.github.io/). 5: Includes the plugins [no-unsanitized](https://www.npmjs.com/package/eslint-plugin-no-unsanitized), [security](https://www.npmjs.com/package/eslint-plugin-security), [security-node](https://www.npmjs.com/package/eslint-plugin-security-node), and [xss](https://www.npmjs.com/package/eslint-plugin-xss). -6: Visit the [supported languages and tools](../getting-started/supported-languages-and-tools.md#supported-languages-and-tools) page for a list of supported languages. +6: Visit the [supported languages and tools](../getting-started/supported-languages-and-tools.mdx#supported-languages-and-tools) page for a list of supported languages. -## App scanning {#app-scanning} +## App scanning \{#app-scanning\} :::caution App scanning is a business feature. If you are a Codacy Pro customer, contact our customer success team to access a short trial. ::: @@ -604,7 +604,7 @@ The **Security and risk management > App scanning** page allows organizations to To access the App scanning page, go to the [Overview page](#dashboard) and click the **App scanning** tab. -![Security and risk management app scanning page](images/security-risk-management-app-scanning.png) +![Security and risk management app scanning page](./images/security-risk-management-app-scanning.png) App scanning analyzes applications in production or production-like environments to help identify vulnerabilities such as misconfigurations, insecure authentication, or other security issues that occur in real-world usage. Because it doesn't rely on access to source code, it’s language-agnostic and useful for validating security across your entire stack. @@ -623,7 +623,7 @@ Codacy supports two types of scanning: - Insecure CORS or HTTP method configurations :::note -Already using ZAP? [Upload your results via the API.](../codacy-api/examples/uploading-dast-results.md) +Already using ZAP? [Upload your results via the API.](../codacy-api/examples/uploading-dast-results.mdx) ::: ### Creating an App Scanning target @@ -659,10 +659,10 @@ If exposing your API specification isn't feasible for your team, let us know via You can initiate scans in two ways: - From the **App scanning** tab in the Security and risk management dashboard -- By automating scans using [Codacy's API](../codacy-api/examples/triggering-dast-scans.md) +- By automating scans using [Codacy's API](../codacy-api/examples/triggering-dast-scans.mdx) :::caution -Only [admins and organization managers](../organizations/roles-and-permissions-for-organizations.md) can create targets and start scans, both in-app and via the API. +Only [admins and organization managers](../organizations/roles-and-permissions-for-organizations.mdx) can create targets and start scans, both in-app and via the API. :::
@@ -694,6 +694,6 @@ Currently, DAST findings are only visible to admin and organization admin roles. As previously mentioned, once a scan completes, results will be available under the **Findings** tab. Use the **Scan types > DAST/App scanning** filter to view relevant findings. Additionaly, you can click on a configured target to expand all of that target's results. -![DAST target results](images/security-risk-management-app-scanning-see-results.png) +![DAST target results](./images/security-risk-management-app-scanning-see-results.png) Follow our [roadmap](https://roadmap.codacy.com) for updates on this feature. diff --git a/docusaurus/docs/organizations/organization-overview.mdx b/docusaurus/docs/organizations/organization-overview.mdx index 9eb1a5617e..ad256c2b5a 100644 --- a/docusaurus/docs/organizations/organization-overview.mdx +++ b/docusaurus/docs/organizations/organization-overview.mdx @@ -5,7 +5,7 @@ description: The Organization overview provides an overview of the repositories import DashboardApiReportNote from './../_includes/DashboardApiReportNote.mdx' -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. +The **Organization overview** provides an overview of the repositories belonging to your Git provider organization that you [follow on Codacy](managing-repositories.mdx). Here you can compare their statuses and check for items that require your attention. To access your Organization overview, select an organization from the top navigation bar and select **Overview** on the left navigation sidebar. @@ -15,7 +15,7 @@ On the Organization overview you have the following areas to help you monitor yo - [Overall quality chart](#overall-quality-chart) - [Last updated repositories](#last-updated-repositories) -- [Issues metrics](issues-metrics.md) +- [Issues metrics](issues-metrics.mdx) On this page, you can also see the **Organization setup** area, which provides you with a checklist of items that you should complete to ensure that your organization is set up correctly and that you're getting the most out of Codacy. @@ -25,7 +25,7 @@ The following sections provide a detailed description of the repository-related ## Overall quality chart -The **Overall quality** chart compares the repositories that you follow regarding [grade](../faq/code-analysis/which-metrics-does-codacy-calculate.md#grade), [issues](../faq/code-analysis/which-metrics-does-codacy-calculate.md#issues), [complex files](../faq/code-analysis/which-metrics-does-codacy-calculate.md#complexity), [duplication](../faq/code-analysis/which-metrics-does-codacy-calculate.md#duplication), and [code coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.md#code-coverage). Each tab displays the average value for the corresponding metric for the last updated repositories. +The **Overall quality** chart compares the repositories that you follow regarding [grade](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#grade), [issues](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#issues), [complex files](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#complexity), [duplication](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#duplication), and [code coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#code-coverage). Each tab displays the average value for the corresponding metric for the last updated repositories. :::caution - 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. @@ -43,7 +43,7 @@ If you have over 8 repositories, the chart displays your repositories grouped by ![Overall quality chart with grouped repositories](images/organization-overview-overall-quality-grouped.png) :::tip -If you don't have coverage set up for any of your repositories yet, the coverage tab provides you with instructions on [how to add coverage for your repositories](../coverage-reporter/index.md). +If you don't have coverage set up for any of your repositories yet, the coverage tab provides you with instructions on [how to add coverage for your repositories](../coverage-reporter/index.mdx). ::: @@ -64,6 +64,6 @@ The exact value of the last updated date of the repositories depends on your Git ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Using the Codacy API to obtain current issues in repositories](../codacy-api/examples/obtaining-current-issues-in-repositories.md) -- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx) +- [Using the Codacy API to obtain current issues in repositories](../codacy-api/examples/obtaining-current-issues-in-repositories.mdx) +- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files.mdx) diff --git a/docusaurus/docs/organizations/roles-and-permissions-for-organizations.mdx b/docusaurus/docs/organizations/roles-and-permissions-for-organizations.mdx index 0ecc622837..3c1bc78244 100644 --- a/docusaurus/docs/organizations/roles-and-permissions-for-organizations.mdx +++ b/docusaurus/docs/organizations/roles-and-permissions-for-organizations.mdx @@ -20,7 +20,7 @@ To review the permissions granted by each role, see the tables for each Git prov - [Permissions for GitLab](#permissions-for-gitlab) - [Permissions for Bitbucket](#permissions-for-bitbucket) -To list and manage the members of your Codacy organization, see the [Managing people](managing-people.md) page. +To list and manage the members of your Codacy organization, see the [Managing people](managing-people.mdx) page. ## Configuring repository management permissions \{#change-analysis-configuration\} @@ -29,13 +29,13 @@ By default, only users with the Codacy role **repository write** can change anal To change this, open your organization **Settings**, page **Roles and permissions**, and choose the Codacy roles that can perform the following operations on the repositories of your organization: -- [Ignore issues](../repositories/issues.md#ignoring-and-managing-issues) -- [Ignore files](../repositories-configure/ignoring-files.md) -- [Configure code patterns](../repositories-configure/configuring-code-patterns.md) -- [Configure languages](../repositories-configure/languages.md) +- [Ignore issues](../repositories/issues.mdx#ignoring-and-managing-issues) +- [Ignore files](../repositories-configure/ignoring-files.mdx) +- [Configure code patterns](../repositories-configure/configuring-code-patterns.mdx) +- [Configure languages](../repositories-configure/languages.mdx) - [Manage branches](../repositories-configure/managing-branches.mdx) -- [Reanalyze branches and pull requests](../faq/repositories/how-do-i-reanalyze-my-repository.md) -- [Create targets and run Dynamic Application Security Testing scans](../organizations/managing-security-and-risk.md#app-scanning) +- [Reanalyze branches and pull requests](../faq/repositories/how-do-i-reanalyze-my-repository.mdx) +- [Create targets and run Dynamic Application Security Testing scans](../organizations/managing-security-and-risk.mdx#app-scanning) ![Configuring repository management permissions](images/roles-permissions-repo-management.png) @@ -60,10 +60,10 @@ To assign the organization manager role: 1. In the **Organization managers** area, use the search field to find the relevant organization member and click the member's name. :::note - You can only assign the organization manager role to [members of your organization](./managing-people.md#joining). + You can only assign the organization manager role to [members of your organization](./managing-people.mdx#joining). ::: - ![Security and risk management access management](images/roles-permissions-organization-manager-assign.png) + ![Security and risk management access management](./images/roles-permissions-organization-manager-assign.png) ### Revoking the organization manager role @@ -232,11 +232,11 @@ The table below maps the GitHub Cloud and GitHub Enterprise roles to the corresp -1: Outside collaborators aren't supported as members of organizations on Codacy. You can still [add outside collaborators to Codacy](managing-people.md#adding-people) so that Codacy analyzes their commits to private repositories, but they won't be able to join your Codacy organization. -2: Joining an organization may need an approval depending on your setting for [accepting new people](changing-your-plan-and-billing.md#allowing-new-people-to-join-your-organization). +1: Outside collaborators aren't supported as members of organizations on Codacy. You can still [add outside collaborators to Codacy](managing-people.mdx#adding-people) so that Codacy analyzes their commits to private repositories, but they won't be able to join your Codacy organization. +2: Joining an organization may need an approval depending on your setting for [accepting new people](changing-your-plan-and-billing.mdx#allowing-new-people-to-join-your-organization). 3: These users can only see security items originating from Codacy repositories that they follow. 4: Requires that an organization owner has given the Codacy GitHub App access to the repositories to add or remove. -5: [Audit logs](./audit-logs-for-organizations.md) are available only on [Business plan](https://www.codacy.com/pricing). +5: [Audit logs](./audit-logs-for-organizations.mdx) are available only on [Business plan](https://www.codacy.com/pricing). ## Permissions for GitLab @@ -396,10 +396,10 @@ The table below maps the GitLab Cloud and GitLab Enterprise roles to the corresp -1: External users aren't supported as members of organizations on Codacy. You can still [add external users to Codacy](managing-people.md#adding-people) so that Codacy analyzes their commits to private repositories, but they won't be able to join your Codacy organization. -2: Joining an organization may need an approval depending on your setting for [accepting new people](changing-your-plan-and-billing.md#allowing-new-people-to-join-your-organization). +1: External users aren't supported as members of organizations on Codacy. You can still [add external users to Codacy](managing-people.mdx#adding-people) so that Codacy analyzes their commits to private repositories, but they won't be able to join your Codacy organization. +2: Joining an organization may need an approval depending on your setting for [accepting new people](changing-your-plan-and-billing.mdx#allowing-new-people-to-join-your-organization). 3: These users can only see security items originating from Codacy repositories that they follow. -4: [Audit logs](./audit-logs-for-organizations.md) are available only on [Business plan](https://www.codacy.com/pricing). +4: [Audit logs](./audit-logs-for-organizations.mdx) are available only on [Business plan](https://www.codacy.com/pricing). ## Permissions for Bitbucket @@ -510,11 +510,11 @@ The table below maps the Bitbucket Cloud and Bitbucket Server roles to the corre 1: Codacy can't distinguish the Bitbucket roles Read and Write because of a limitation on the Bitbucket API. -2: Joining an organization may need an approval depending on your setting for [accepting new people](changing-your-plan-and-billing.md#allowing-new-people-to-join-your-organization). +2: Joining an organization may need an approval depending on your setting for [accepting new people](changing-your-plan-and-billing.mdx#allowing-new-people-to-join-your-organization). 3: These users can only see security items originating from Codacy repositories that they follow. -4: [Audit logs](./audit-logs-for-organizations.md) are available only on [Business plan](https://www.codacy.com/pricing). +4: [Audit logs](./audit-logs-for-organizations.mdx) are available only on [Business plan](https://www.codacy.com/pricing). ## See also -- [Managing people](managing-people.md) -- [Accepting new people to your organization](changing-your-plan-and-billing.md#allowing-new-people-to-join-your-organization) +- [Managing people](managing-people.mdx) +- [Accepting new people to your organization](changing-your-plan-and-billing.mdx#allowing-new-people-to-join-your-organization) diff --git a/docusaurus/docs/organizations/segments.md b/docusaurus/docs/organizations/segments.mdx similarity index 84% rename from docusaurus/docs/organizations/segments.md rename to docusaurus/docs/organizations/segments.mdx index 2da0b94b16..344636be19 100644 --- a/docusaurus/docs/organizations/segments.md +++ b/docusaurus/docs/organizations/segments.mdx @@ -11,17 +11,17 @@ Segments are dimensions that Codacy reads from your provider that organizes repo ## Where can Segments be utilised? -- [Repository list](../managing-repositories/#provider-segments) -- [Security & Management Risk](../managing-security-and-risk/) +- [Repository list](./managing-repositories.mdx#provider-segments) +- [Security & Management Risk](./managing-security-and-risk.mdx) -## Enabling Segments {#enabling-segments} +## Enabling Segments \{#enabling-segments\} To enable Segments, an initial sync between your provider and Codacy needs to happen. Once completed, you can use Segments to better locate and organize repositories within Codacy. -![Segments sync](../organizations/images/Segments-no-sync.png) -![Segments after sync](../organizations/images/segments-after-sync.png) +![Segments sync](./images/Segments-no-sync.png) +![Segments after sync](./images/segments-after-sync.png)

-### GitHub Custom Properties {#github-custom-properties} +### GitHub Custom Properties \{#github-custom-properties\} Custom properties allow you to assign tags or metadata to repositories, making it easier to categorize and filter them. Create, use, and manage custom properties for your repositories directly in GitHub. > Refer to [GitHub's official documentation](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization#adding-custom-properties) for detailed steps on how to add, edit, and manage repository **Custom Properties**. @@ -32,13 +32,10 @@ For changes to repository **Custom Properties** in GitHub to be **automatically* If the permission is **not accepted**, users will still be able to use Repository Custom Properties as filters in Codacy, but will need to manually trigger a sync. This can be done using the **manual sync** button available in the filter dropdown, which allows users to synchronize changes from GitHub, though the process may take longer. ::: -### Bitbucket Projects {#bitbucket-projects} +### Bitbucket Projects \{#bitbucket-projects\} Bitbucket Projects allow you to organize your repositories into relevant contexts for you, making it easier to categorize and filter them. Create, use, and manage Projects for your repositories directly in Bitbucket. > Refer to [Bitbucket's official documentation](https://support.atlassian.com/bitbucket-cloud/docs/create-a-project/) for detailed steps on how to add, edit, and manage **Projects**. #### Keep Segments in sync After the first sync is done, Bitbucket Projects will continue to be insync with Codacy automatically. - - -

diff --git a/docusaurus/docs/organizations/using-coding-standards.md b/docusaurus/docs/organizations/using-coding-standards.mdx similarity index 86% rename from docusaurus/docs/organizations/using-coding-standards.md rename to docusaurus/docs/organizations/using-coding-standards.mdx index c56c607a0b..a4ce7f1a5c 100644 --- a/docusaurus/docs/organizations/using-coding-standards.md +++ b/docusaurus/docs/organizations/using-coding-standards.mdx @@ -17,7 +17,7 @@ This page covers the following topics: - [Using a coding standard alongside repository-level customizations](#using-with-repository-configuration) - [Using multiple coding standards](#using-multiple) -## Creating a coding standard {#creating} +## Creating a coding standard \{#creating\} :::note Codacy currently supports up to 10 coding standards per organization. ::: @@ -40,11 +40,11 @@ To create a coding standard for your organization: With the advanced setup, you can optionally **select a repository as the baseline** for the new coding standard. This is useful if you already have a well-configured repository that you wish to use as a template. - ![Creating a new coding standard](images/coding-standard-create.png) + ![Creating a new coding standard](./images/coding-standard-create.png) 1. Click **Create coding standard** to proceed to the [guided setup](#guided-setup) or [advanced setup](#advanced-settings), depending on your choice. -## Configuring a coding standard (guided setup) {#guided-setup} +## Configuring a coding standard (guided setup) \{#guided-setup\} If you selected **Guided setup** when [creating a new coding standard](#creating), follow these steps: 1. Adjust the sensitivity of the coding standard from **Essential** to **Comprehensive** for each issue category group: @@ -56,7 +56,7 @@ If you selected **Guided setup** when [creating a new coding standard](#creating Initially, set the sensitivity to **Essential** for most category groups to focus on critical code patterns. It helps streamline the integration process with Codacy without overwhelming developers with too many reported issues. You can gradually include more patterns as needed. ::: - ![Coding standard presets](images/coding-standard-presets.png) + ![Coding standard presets](./images/coding-standard-presets.png) 1. Click **Next: Select and apply to repositories**. @@ -64,9 +64,9 @@ If you selected **Guided setup** when [creating a new coding standard](#creating Codacy will start using the new coding standard on the next analysis of each selected repository. - ![Applying the coding standard to repositories](images/coding-standard-apply.png) + ![Applying the coding standard to repositories](./images/coding-standard-apply.png) -## Configuring a coding standard (advanced setup) {#advanced-settings} +## Configuring a coding standard (advanced setup) \{#advanced-settings\} If you selected **Advanced setup** when [creating a new coding standard](#creating) or are editing an existing coding standard, follow these steps: 1. Select the programming languages that the new coding standard should include. @@ -81,7 +81,7 @@ If you selected **Advanced setup** when [creating a new coding standard](#creati 1. In the next step, explicitly disable the tools that you don't want to use. ::: - ![Selecting the languages for the coding standard](images/coding-standard-select-languages.png) + ![Selecting the languages for the coding standard](./images/coding-standard-select-languages.png) 1. Click **Next: Tools and patterns**. @@ -92,16 +92,16 @@ If you selected **Advanced setup** when [creating a new coding standard](#creati - You can also use the **Discover patterns** option to find patterns across all tools. :::tip - - Use the filters to find the relevant tools and code patterns. The recommended configurations are manually curated by Codacy or based on tool defaults and are marked with the icon ![Recommended icon](images/coding-standard-recommended-icon.png). + - Use the filters to find the relevant tools and code patterns. The recommended configurations are manually curated by Codacy or based on tool defaults and are marked with the icon ![Recommended icon](./images/coding-standard-recommended-icon.png). - To toggle multiple code patterns at once, click the checkbox of the first pattern and **Shift+click** the checkbox of the last pattern in a range. - To toggle all the code patterns visible on the list, click the checkbox on the header of the code patterns list. If there are more code patterns to load on the list, you can click the link **Enable/Disable all <N> patterns** to toggle all patterns matching the current filters. ::: - ![Configuring the tools and patterns for the coding standard](images/coding-standard-configure-tools.png) + ![Configuring the tools and patterns for the coding standard](./images/coding-standard-configure-tools.png) 1. Proceed with the remaining wizard steps to finish [creating](#creating) or [editing](#editing) your coding standard. -## Defining default coding standards {#set-default} +## Defining default coding standards \{#set-default\} For ease of management, you can define multiple default coding standards that automatically apply to new repositories. In the absence of default coding standards, Codacy applies global defaults to all new repositories. :::note @@ -118,7 +118,7 @@ To mark an existing coding standard as default: ![Setting a coding standard as the default](images/coding-standard-set-default.png) -## Editing a coding standard {#editing} +## Editing a coding standard \{#editing\} :::note Any edits to the configurations of a coding standard are automatically applied on the next analysis of each associated repository. ::: @@ -129,7 +129,7 @@ To edit an existing coding standard or change the repositories that follow that 1. Click the edit icon on the coding standard card. - ![Editing an existing coding standard](images/coding-standard-edit.png) + ![Editing an existing coding standard](./images/coding-standard-edit.png) 1. Edit the current coding standard configurations and click the button **Next** to advance to the following [configuration pages](#advanced-settings): @@ -141,7 +141,7 @@ To edit an existing coding standard or change the repositories that follow that On this page, you can rename the coding standard by clicking the edit icon next to the name of the coding standard. - ![Renaming a coding standard](images/coding-standard-rename.png) + ![Renaming a coding standard](./images/coding-standard-rename.png) - **Choose tools and patterns**: the tool and code pattern configurations of the coding standard. - **Select and apply to repositories**: the repositories that follow the coding standard. @@ -150,7 +150,7 @@ To edit an existing coding standard or change the repositories that follow that Codacy will start using the updated coding standard on the next analysis of each selected repository. -## Deleting a coding standard {#deleting} +## Deleting a coding standard \{#deleting\} To delete a coding standard: 1. Open your organization **Policies** page, tab **Coding standards**. @@ -159,13 +159,13 @@ To delete a coding standard: ![Deleting a coding standard](images/coding-standard-delete.png) -## Using a coding standard alongside tool configuration files {#using-with-tool-configuration} -When using a [tool configuration file](../repositories-configure/configuring-code-patterns.md#using-your-own-tool-configuration-files) alongside a coding standard, the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled. +## Using a coding standard alongside tool configuration files \{#using-with-tool-configuration\} +When using a [tool configuration file](../repositories-configure/configuring-code-patterns.mdx#using-your-own-tool-configuration-files) alongside a coding standard, the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled. -## Using a coding standard alongside repository-level customizations {#using-with-repository-configuration} +## Using a coding standard alongside repository-level customizations \{#using-with-repository-configuration\} Tools and patterns enabled by a coding standard are enforced and cannot be disabled at the repository level. You can add extra tools and patterns, if these are not already enabled by any applied coding standard. -## Using multiple coding standards {#using-multiple} +## Using multiple coding standards \{#using-multiple\} When Codacy analyzes your code using multiple coding standards, it merges the tools and patterns from each standard. A common strategy is to start with a baseline standard containing fundamental rules that apply across all repositories, then layer additional standards based on specific needs. You can organize these additional standards by: @@ -175,7 +175,7 @@ A common strategy is to start with a baseline standard containing fundamental ru - **Languages or frameworks:** for example, React, Java or Python - **Teams or tribes:** Allow different teams or tribes to maintain their own standards while inheriting organization-wide rules -![Coding standards strategies](images/coding-standard-strategy.png) +![Coding standards strategies](./images/coding-standard-strategy.png) :::note You can apply up to 10 coding standards to your organization. Standards can overlap, meaning a single repository can follow multiple standards simultaneously. @@ -185,14 +185,14 @@ You can apply up to 10 coding standards to your organization. Standards can over If the same pattern appears in multiple standards, the version from the most recently created and applied standard (with its parameters) takes precedence. ::: -### Implementation guidelines {#standards-implementation} +### Implementation guidelines \{#standards-implementation\} Consider these points when implementing coding standards: - **Keep maintenance simple:** Minimize overlap between standards and establish clear ownership to reduce maintenance complexity -- **Manage access:** Assign organization managers or Git provider admin roles to users who should manage (create, edit and delete) organization-level standards (learn more in [Roles and Permissions](./roles-and-permissions-for-organizations.md/#managing-the-organization-manager-role)) +- **Manage access:** Assign organization managers or Git provider admin roles to users who should manage (create, edit and delete) organization-level standards (learn more in [Roles and Permissions](./roles-and-permissions-for-organizations.mdx#managing-the-organization-manager-role)) - **Be mindful of repository customization:** Individual repositories can have their own specific overrides through additional code patterns, custom tool configurations, or local configuration files ## See also -- [Configuring code patterns on each repository](../repositories-configure/configuring-code-patterns.md) +- [Configuring code patterns on each repository](../repositories-configure/configuring-code-patterns.mdx) - [How to implement Google JavaScript style guide with Codacy](https://blog.codacy.com/implement-google-javascript-style-guide-with-codacy/) diff --git a/docusaurus/docs/organizations/using-gate-policies.md b/docusaurus/docs/organizations/using-gate-policies.mdx similarity index 77% rename from docusaurus/docs/organizations/using-gate-policies.md rename to docusaurus/docs/organizations/using-gate-policies.mdx index db7e4620e5..1a30082e14 100644 --- a/docusaurus/docs/organizations/using-gate-policies.md +++ b/docusaurus/docs/organizations/using-gate-policies.mdx @@ -3,15 +3,15 @@ title: Using gate policies --- -Gate policies help you ensure that Codacy uses the same [quality gates](../repositories-configure/adjusting-quality-gates.md) across your organization repositories. +Gate policies help you ensure that Codacy uses the same [quality gates](../repositories-configure/adjusting-quality-gates.mdx) across your organization repositories. Codacy provides a built-in gate policy, **Codacy Gate Policy**, which sets minimum quality levels for pull requests and commits. The following screenshot displays the default configuration values: -![Codacy built-in gate policy](images/gate-policy-codacy-default.png) +![Codacy built-in gate policy](./images/gate-policy-codacy-default.png) By default, Codacy applies the **Codacy Gate Policy** automatically to newly added repositories. You can then create new gate policies with different quality gates and make them the default for your organization. -## Creating a new gate policy {#creating} +## Creating a new gate policy \{#creating\} To create a new gate policy for your organization: 1. Open your organization **Policies** page, tab **Gate policies**. @@ -20,19 +20,19 @@ To create a new gate policy for your organization: 1. Enter a unique name and click **Create gate policy**. - ![Creating a new gate policy](images/gate-policy-create.png) + ![Creating a new gate policy](./images/gate-policy-create.png) 1. Set the values for the quality gates and click **Next: Select and apply to repositories**. - ![Selecting the quality gate values for the gate policy](images/gate-policy-select-values.png) + ![Selecting the quality gate values for the gate policy](./images/gate-policy-select-values.png) 1. Select existing repositories that should follow the gate policy and click **Save and apply gate policy**. Codacy will start using the new gate policy on the next analysis of each selected repository. - ![Applying the gate policy to repositories](images/gate-policy-apply.png) + ![Applying the gate policy to repositories](./images/gate-policy-apply.png) -## Setting a gate policy as default {#set-default} +## Setting a gate policy as default \{#set-default\} To set a gate policy as default: 1. Open your organization **Policies** page, tab **Gate policies**. @@ -43,18 +43,18 @@ To set a gate policy as default: Only one gate policy at a time can be the default gate policy. ::: - ![Setting a gate policy as the default](images/gate-policy-set-default.png) + ![Setting a gate policy as the default](./images/gate-policy-set-default.png) Codacy will start applying the default gate policy to newly added repositories. -## Editing a gate policy {#editing} +## Editing a gate policy \{#editing\} To edit the quality gates of an existing gate policy or change the repositories that follow that gate policy: 1. Open your organization **Policies** page, tab **Gate policies**. 1. Click the edit icon on the gate policy card. - ![Editing an existing gate policy](images/gate-policy-edit.png) + ![Editing an existing gate policy](./images/gate-policy-edit.png) 1. Edit the current quality gate values and click the button **Next: Select and apply to repositories**. @@ -70,7 +70,7 @@ To edit the quality gates of an existing gate policy or change the repositories If you stop applying a gate policy to a repository, Codacy restores the previous quality gates of that repository. -## Deleting a gate policy {#deleting} +## Deleting a gate policy \{#deleting\} :::note You can't delete the built-in **Codacy Gate Policy**. ::: @@ -81,7 +81,7 @@ To delete an organization gate policy: 1. Click the trash can icon on the gate policy card and confirm. - ![Deleting a gate policy](images/gate-policy-delete.png) + ![Deleting a gate policy](./images/gate-policy-delete.png) When you delete a gate policy: diff --git a/docusaurus/docs/organizations/what-are-organizations.md b/docusaurus/docs/organizations/what-are-organizations.mdx similarity index 84% rename from docusaurus/docs/organizations/what-are-organizations.md rename to docusaurus/docs/organizations/what-are-organizations.mdx index fc1060843c..4d46ccb0ba 100644 --- a/docusaurus/docs/organizations/what-are-organizations.md +++ b/docusaurus/docs/organizations/what-are-organizations.mdx @@ -11,7 +11,7 @@ Changes to the organizations, repositories, and team members are synchronized wi To add a new organization to Codacy, select **Add organization** on the navigation menu. -![Adding an organization](images/organization-add-menu.png) +![Adding an organization](./images/organization-add-menu.png) This opens the list of organizations on your Git providers. @@ -19,14 +19,14 @@ This opens the list of organizations on your Git providers. The organization with the same name as your Git provider username contains your personal repositories. ::: -![Adding an organization](images/organization-add.png) +![Adding an organization](./images/organization-add.png) - To add a new organization to Codacy, click the link **Add** for that organization. - To join an organization that's already on Codacy, click the link **Join** for that organization. -- To add organizations from a Git provider not yet listed on this page, click **Add provider** and give the [necessary permissions](../getting-started/which-permissions-does-codacy-need-from-my-account.md) for Codacy to sync with the new Git provider and display your organizations. +- To add organizations from a Git provider not yet listed on this page, click **Add provider** and give the [necessary permissions](../getting-started/which-permissions-does-codacy-need-from-my-account.mdx) for Codacy to sync with the new Git provider and display your organizations. :::note -If you can't see the organization you're looking for, [follow these troubleshooting instructions](../faq/troubleshooting/why-cant-i-see-my-organization.md). +If you can't see the organization you're looking for, [follow these troubleshooting instructions](../faq/troubleshooting/why-cant-i-see-my-organization.mdx). ::: ## Updates on the Git provider @@ -46,7 +46,7 @@ If an update to your organization name isn't automatically reflected on Codacy, | Bitbucket Cloud | Yes | Yes | No | No | No | No | | Bitbucket Server | Yes | Yes | No | No | No | No | -Se also the [roles and permission mapping from the Git providers](roles-and-permissions-for-organizations.md). +Se also the [roles and permission mapping from the Git providers](./roles-and-permissions-for-organizations.mdx). ## Deleting an organization @@ -54,13 +54,13 @@ Deleting an organization on Codacy completely removes the configurations and all To delete an organization, open the **Profile** page and click the button **Delete organization**. -![Deleting an organization](images/organization-delete.png) +![Deleting an organization](./images/organization-delete.png) ## See also -- [How does Codacy support GitLab Cloud?](../faq/general/how-does-codacy-support-gitlab-cloud.md) -- [How does Codacy support GitLab Enterprise?](../faq/general/how-does-codacy-support-gitlab-enterprise.md) -- [How does Codacy support Bitbucket Cloud?](../faq/general/how-does-codacy-support-bitbucket-cloud.md) -- [How does Codacy support Bitbucket Server?](../faq/general/how-does-codacy-support-bitbucket-server.md) +- [How does Codacy support GitLab Cloud?](../faq/general/how-does-codacy-support-gitlab-cloud.mdx) +- [How does Codacy support GitLab Enterprise?](../faq/general/how-does-codacy-support-gitlab-enterprise.mdx) +- [How does Codacy support Bitbucket Cloud?](../faq/general/how-does-codacy-support-bitbucket-cloud.mdx) +- [How does Codacy support Bitbucket Server?](../faq/general/how-does-codacy-support-bitbucket-server.mdx) diff --git a/docusaurus/docs/release-notes/cloud/2018/2018-10-19-cloud.md b/docusaurus/docs/release-notes/cloud/2018/2018-10-19-cloud.md index 10e3c6074a..43542c7d74 100644 --- a/docusaurus/docs/release-notes/cloud/2018/2018-10-19-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2018/2018-10-19-cloud.md @@ -16,7 +16,7 @@ slug: /release-notes/cloud/cloud-2018-10-19 - We updated the following tools: - Scalameta now supports Scala 2.12 - - Credo version [0.10.2](https://github.com/rrrene/credo/blob/master/CHANGELOG.md#0102) + - Credo version [0.10.2](https://github.com/rrrene/credo/blob/master/CHANGELOG.mdx#0102) - Checkstyle version [8.13](http://checkstyle.sourceforge.net/releasenotes.html#Release_8.13) - Bandit version [1.5.1](https://github.com/PyCQA/bandit/releases/tag/1.5.1) - PHP_CodeSniffer version [3.1](https://pear.php.net/package/PHP_CodeSniffer/download/3.1.0) diff --git a/docusaurus/docs/release-notes/cloud/2018/2018-11-02-cloud.md b/docusaurus/docs/release-notes/cloud/2018/2018-11-02-cloud.md index 3047fa92c6..4abe556b37 100644 --- a/docusaurus/docs/release-notes/cloud/2018/2018-11-02-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2018/2018-11-02-cloud.md @@ -21,7 +21,7 @@ slug: /release-notes/cloud/cloud-2018-11-02 ## Tool updates -- Updated RuboCop to version [v0.59.2](https://github.com/rubocop/rubocop/blob/master/relnotes/v0.59.2.md) +- Updated RuboCop to version [v0.59.2](https://github.com/rubocop/rubocop/blob/master/relnotes/v0.59.2.mdx) - Updated ESLint to version [v5.7.0](https://eslint.org/blog/2018/10/eslint-v5.7.0-released) - Added support to [TSLint 5](https://www.npmjs.com/package/tslint/v/5.11.0) - Previous versions are no longer supported. diff --git a/docusaurus/docs/release-notes/cloud/2018/2018-11-16-cloud.md b/docusaurus/docs/release-notes/cloud/2018/2018-11-16-cloud.md index 0f8f486203..d3ccfb40a7 100644 --- a/docusaurus/docs/release-notes/cloud/2018/2018-11-16-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2018/2018-11-16-cloud.md @@ -17,7 +17,7 @@ Created default patterns for Flawfinder. We updated the following tools to newer versions: -- RuboCop to [v0.60.0](https://github.com/rubocop/rubocop/blob/master/relnotes/v0.60.0.md) +- RuboCop to [v0.60.0](https://github.com/rubocop/rubocop/blob/master/relnotes/v0.60.0.mdx) - ESLint to [v5.8.0](https://eslint.org/blog/2018/10/eslint-v5.8.0-released) - ESLint plugin airbnb-eslint-config to [v17.1.0](https://www.npmjs.com/package/eslint-config-airbnb/v/17.1.0) - ESLint plugin babel-eslint to [v10.0.1](https://www.npmjs.com/package/babel-eslint/v/10.0.1) diff --git a/docusaurus/docs/release-notes/cloud/2019/2019-02-18-cloud-bitbucket-changes.md b/docusaurus/docs/release-notes/cloud/2019/2019-02-18-cloud-bitbucket-changes.md index 284e152eb7..2a8ff529a2 100644 --- a/docusaurus/docs/release-notes/cloud/2019/2019-02-18-cloud-bitbucket-changes.md +++ b/docusaurus/docs/release-notes/cloud/2019/2019-02-18-cloud-bitbucket-changes.md @@ -27,7 +27,7 @@ Previously, we were using OAuth 1, which forced us to request all permissions. T The original user who set up your Bitbucket integration will need to log in to Codacy to confirm the new permissions. **Otherwise, Codacy will no longer be able to detect new Pull Requests, and existing repositories will stop receiving Pull Request status and comments on Bitbucket.** -If the original user who set up your Bitbucket integration isn't available, someone who has Admin permissions in both Codacy and Bitbucket to [re-do the integration](../../../repositories-configure/integrations/bitbucket-integration.md) in Codacy. +If the original user who set up your Bitbucket integration isn't available, someone who has Admin permissions in both Codacy and Bitbucket to [re-do the integration](../../../repositories-configure/integrations/bitbucket-integration.mdx) in Codacy. You can log in with Bitbucket through [www.codacy.com/login-with/bitbucket](https://www.codacy.com/login-with/bitbucket). diff --git a/docusaurus/docs/release-notes/cloud/2019/2019-03-29-cloud.md b/docusaurus/docs/release-notes/cloud/2019/2019-03-29-cloud.md index db637c97ee..77568c2153 100644 --- a/docusaurus/docs/release-notes/cloud/2019/2019-03-29-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2019/2019-03-29-cloud.md @@ -9,7 +9,7 @@ slug: /release-notes/cloud/cloud-2019-03-29 ## Product enhancements -- We now integrate with [Bitbucket using OAuth2](../../../organizations/what-are-organizations.md). This has allowed us to reduce the level of permissions we require when you integrate Codacy with your Bitbucket account. +- We now integrate with [Bitbucket using OAuth2](../../../organizations/what-are-organizations.mdx). This has allowed us to reduce the level of permissions we require when you integrate Codacy with your Bitbucket account. - We updated TSLint to version [5.14.0](https://www.npmjs.com/package/tslint/v/5.14.0). diff --git a/docusaurus/docs/release-notes/cloud/2019/2019-05-20-cloud.md b/docusaurus/docs/release-notes/cloud/2019/2019-05-20-cloud.md index a07885bb57..dc2ea923fd 100644 --- a/docusaurus/docs/release-notes/cloud/2019/2019-05-20-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2019/2019-05-20-cloud.md @@ -9,7 +9,7 @@ slug: /release-notes/cloud/cloud-2019-05-20 ## Product enhancements -- As a way of improving performance and provide faster analysis, Codacy will no longer check for new updates in projects that don't have [post-commit hooks](../../../repositories-configure/integrations/post-commit-hooks.md) enabled. +- As a way of improving performance and provide faster analysis, Codacy will no longer check for new updates in projects that don't have [post-commit hooks](../../../repositories-configure/integrations/post-commit-hooks.mdx) enabled. ## Bug fixes diff --git a/docusaurus/docs/release-notes/cloud/2019/2019-11-15-cloud.md b/docusaurus/docs/release-notes/cloud/2019/2019-11-15-cloud.md index 5fdaf4c699..a0f70d5e0b 100644 --- a/docusaurus/docs/release-notes/cloud/2019/2019-11-15-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2019/2019-11-15-cloud.md @@ -11,7 +11,7 @@ slug: /release-notes/cloud/cloud-2019-11-15 Synced organizations for GitHub are live! -This feature will allow for easier integration with GitHub and organization management. Here you can find our [documentation on the new features and how to use them](../../../organizations/what-are-organizations.md). +This feature will allow for easier integration with GitHub and organization management. Here you can find our [documentation on the new features and how to use them](../../../organizations/what-are-organizations.mdx). As a consequence, the next time you log in to Codacy you will see a window asking for one additional permission on GitHub with this information: diff --git a/docusaurus/docs/release-notes/cloud/2021/2021-07-03-cloud-scheduled-db-maintenance.md b/docusaurus/docs/release-notes/cloud/2021/2021-07-03-cloud-scheduled-db-maintenance.md index 42a2be57c0..7b4a1df8a4 100644 --- a/docusaurus/docs/release-notes/cloud/2021/2021-07-03-cloud-scheduled-db-maintenance.md +++ b/docusaurus/docs/release-notes/cloud/2021/2021-07-03-cloud-scheduled-db-maintenance.md @@ -32,4 +32,4 @@ The following is the expected impact after the maintenance operation is complete ## What to do if you're missing information on your repositories? -You can wait for Codacy to analyze new pushes to your repositories or [manually trigger the re-analysis](../../../faq/repositories/how-do-i-reanalyze-my-repository.md) of any commits and pull requests to re-populate the pages. +You can wait for Codacy to analyze new pushes to your repositories or [manually trigger the re-analysis](../../../faq/repositories/how-do-i-reanalyze-my-repository.mdx) of any commits and pull requests to re-populate the pages. diff --git a/docusaurus/docs/release-notes/cloud/2021/2021-11-02-cloud-legacy-organizations.md b/docusaurus/docs/release-notes/cloud/2021/2021-11-02-cloud-legacy-organizations.md index a9580e1781..6e377d075a 100644 --- a/docusaurus/docs/release-notes/cloud/2021/2021-11-02-cloud-legacy-organizations.md +++ b/docusaurus/docs/release-notes/cloud/2021/2021-11-02-cloud-legacy-organizations.md @@ -4,11 +4,11 @@ slug: /release-notes/cloud/cloud-2021-11-02-legacy-organizations --- -On November 2, 2021, as part of our efforts to improve Codacy Cloud and allow all our customers to benefit from a more seamless experience, we’re removing the support for legacy manual organizations. As part of this process, we'll automatically migrate your legacy organization to a new [synced organization](../../../organizations/what-are-organizations.md). +On November 2, 2021, as part of our efforts to improve Codacy Cloud and allow all our customers to benefit from a more seamless experience, we’re removing the support for legacy manual organizations. As part of this process, we'll automatically migrate your legacy organization to a new [synced organization](../../../organizations/what-are-organizations.mdx). To make sure that Codacy will continue to analyze your repositories **please perform the following steps before November 2, 2021**: -1. **If you're using GitHub** you must [install the Codacy GitHub App](https://github.com/apps/codacy-production/installations/new) on the GitHub organizations that contain your repositories so that Codacy has the [necessary permissions](../../../getting-started/which-permissions-does-codacy-need-from-my-account.md) to analyze your code. +1. **If you're using GitHub** you must [install the Codacy GitHub App](https://github.com/apps/codacy-production/installations/new) on the GitHub organizations that contain your repositories so that Codacy has the [necessary permissions](../../../getting-started/which-permissions-does-codacy-need-from-my-account.mdx) to analyze your code. 1. Make sure that your Git provider organization owners belong to the **Administrators** team of your legacy organization on Codacy. @@ -32,4 +32,4 @@ Codacy appreciates your continued support through this time of growth and change ## See also -- **On Codacy Self-hosted,** legacy manual organizations stopped being supported on [version 5.0.0](../self-hosted/self-hosted-v5.0.0.md) +- **On Codacy Self-hosted,** legacy manual organizations stopped being supported on [version 5.0.0](./../../self-hosted/v5.0.0-self-hosted.md) diff --git a/docusaurus/docs/release-notes/cloud/2021/2021-11-cloud.md b/docusaurus/docs/release-notes/cloud/2021/2021-11-cloud.md index 5ad416f4cf..0b87566542 100644 --- a/docusaurus/docs/release-notes/cloud/2021/2021-11-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2021/2021-11-cloud.md @@ -18,7 +18,7 @@ These release notes are for the Codacy Cloud updates during November 2021. - Now, Codacy supports linting OpenAPI and AsyncAPI descriptions in either YAML or JSON files using [Spectral](https://stoplight.io/open-source/spectral/). (CY-5088) -- You can now [use an organization coding standard](../../../organizations/using-coding-standards.md) to apply the same coding best practices, conventions, or security rules to a group of repositories. (CY-4654) +- You can now [use an organization coding standard](../../../organizations/using-coding-standards.mdx) to apply the same coding best practices, conventions, or security rules to a group of repositories. (CY-4654) ![Organization coding standard](../../images/cy-4654.png) diff --git a/docusaurus/docs/release-notes/cloud/2021/2021-12-cloud.md b/docusaurus/docs/release-notes/cloud/2021/2021-12-cloud.md index 9550145afb..8b4de64134 100644 --- a/docusaurus/docs/release-notes/cloud/2021/2021-12-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2021/2021-12-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during December 2021. ## Product enhancements -- It's now possible to [assign a coding standard automatically to new repositories](../../../organizations/using-coding-standards.md#set-default). (CY-5263) +- It's now possible to [assign a coding standard automatically to new repositories](../../../organizations/using-coding-standards.mdx#set-default). (CY-5263) ## Bug fixes diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-01-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-01-cloud.md index 3acd15cb49..9032ca437d 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-01-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-01-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during January 2022. ## Product enhancements -- The Codacy API now includes endpoints that allow you to [create and manage project API tokens programmatically](../../../codacy-api/examples/creating-repository-api-tokens-programmatically.md). This feature can be used to automate setting up coverage for either new repositories or for all your existing repositories. (CY-5090) +- The Codacy API now includes endpoints that allow you to [create and manage project API tokens programmatically](../../../codacy-api/examples/creating-repository-api-tokens-programmatically.mdx). This feature can be used to automate setting up coverage for either new repositories or for all your existing repositories. (CY-5090) - Added the plugin [eslint-plugin-storybook](https://www.npmjs.com/package/eslint-plugin-storybook) to [codacy-eslint](https://github.com/codacy/codacy-eslint). (CY-5406) - Now, Codacy supports static code analysis for Dart/Flutter projects using [dartanalyzer](https://github.com/dart-lang/sdk/tree/main/pkg/analyzer_cli). The new tool checks your code for errors and warnings that are specified in the [Dart language specification](https://dart.dev/guides/language/spec). (CY-4314) - Now, all configurable Stylelint code patterns have [default values set to the recommended settings](https://github.com/codacy/codacy-stylelint/pull/240/files), ensuring that they're ready to be used as soon as you enable them. (CY-3275) diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-02-16-cloud-pmd-legacy-removal.md b/docusaurus/docs/release-notes/cloud/2022/2022-02-16-cloud-pmd-legacy-removal.md index 60557ccb50..ad79095d7b 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-02-16-cloud-pmd-legacy-removal.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-02-16-cloud-pmd-legacy-removal.md @@ -14,6 +14,6 @@ However, the legacy version of PMD is almost five years old and is no longer bei ## If you were using PMD (Legacy) -To continue using PMD to analyze your repositories, [enable the **PMD** tool](../../../repositories-configure/configuring-code-patterns.md) on the **Code patterns** page of your repositories. +To continue using PMD to analyze your repositories, [enable the **PMD** tool](../../../repositories-configure/configuring-code-patterns.mdx) on the **Code patterns** page of your repositories. If you have any questions or need help, please contact [support@codacy.com](mailto:support@codacy.com). diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-02-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-02-cloud.md index ffff38e90c..a180eeee19 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-02-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-02-cloud.md @@ -16,13 +16,13 @@ These release notes are for the Codacy Cloud updates during February 2022. ## Product enhancements -- The [**Overall quality** chart](../../../organizations/organization-overview.md#overall-quality-chart) now allows drilling down on the information to understand which repositories require attention to improve the organization's code quality. (Beta) (CY-5580) +- The [**Overall quality** chart](../../../organizations/organization-overview.mdx#overall-quality-chart) now allows drilling down on the information to understand which repositories require attention to improve the organization's code quality. (Beta) (CY-5580) ![Drilling down on the Overall quality chart](../../images/cy-5580.png) - Now, Codacy calculates the new metric [diff coverage for pull requests](../../../repositories/pull-requests.mdx#quality-overview). (CY-5533) - It's also possible to [set up a quality gate rule](../../../repositories-configure/adjusting-quality-gates.md) for diff coverage. (CY-5534) + It's also possible to [set up a quality gate rule](../../../repositories-configure/adjusting-quality-gates.mdx) for diff coverage. (CY-5534) ![Diff coverage for a pull request](../../images/cy-5533.png) @@ -41,8 +41,8 @@ These release notes are for the Codacy Cloud updates during February 2022. - [rubocop-ast 1.15.1](https://rubygems.org/gems/rubocop-ast/versions/1.15.1) - Now, the **Coverage** column always appears on the Files page even when there's no coverage data, avoiding a jump in the view. (CY-5518) -- Now, the [**Issues breakdown** area on the Repository Dashboard](../../../repositories/repository-dashboard.md#issues-breakdown) displays all issue categories, including **Code complexity**. (CY-5463) -- You can now use the Codacy configuration file to [adjust how PMD CPD detects duplicated code](../../../repositories-configure/codacy-configuration-file.md#pmd-cpd-duplication), giving you more flexibility to eliminate false positives. (CY-5184) +- Now, the [**Issues breakdown** area on the Repository Dashboard](../../../repositories/repository-dashboard.mdx#issues-breakdown) displays all issue categories, including **Code complexity**. (CY-5463) +- You can now use the Codacy configuration file to [adjust how PMD CPD detects duplicated code](../../../repositories-configure/codacy-configuration-file.mdx#pmd-cpd-duplication), giving you more flexibility to eliminate false positives. (CY-5184) ## Tool versions diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-03-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-03-cloud.md index a333909c9e..2b80bb311a 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-03-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-03-cloud.md @@ -22,7 +22,7 @@ These release notes are for the Codacy Cloud updates during March 2022. - Configuring the project - Changing the following analysis settings: ignoring issues and files, configuring code patterns, configuring file extensions, and managing branches - [See the updated permissions](../../../organizations/roles-and-permissions-for-organizations.md#permissions-for-gitlab) for all GitLab roles. (CY-5876) + [See the updated permissions](../../../organizations/roles-and-permissions-for-organizations.mdx#permissions-for-gitlab) for all GitLab roles. (CY-5876) - Included ESLint 8 as a new supported tool and deprecated ESLint 7. @@ -46,18 +46,18 @@ These release notes are for the Codacy Cloud updates during March 2022. - The **Organization Overview** and **Repositories list** pages have improved loading times using a short-lived cache in the user's browser. (CY-5793) -- Codacy Coverage Reporter now supports [automatic commit SHA hash detection](../../../coverage-reporter/troubleshooting-coverage-cli-issues.md#commit-detection) on AWS CodeBuild. (CY-5787) +- Codacy Coverage Reporter now supports [automatic commit SHA hash detection](../../../coverage-reporter/troubleshooting-coverage-cli-issues.mdx#commit-detection) on AWS CodeBuild. (CY-5787) - Added new Codacy Analysis CLI options to allow uploading analysis results in batches of configurable size and to use only specific tool categories while performing the analysis. For more information [see the documentation](https://github.com/codacy/codacy-analysis-cli#commands-and-configuration) of the options `--tool` and `--upload-batch-size`. (CY-5727) - The [**Repositories list** page](https://docs.codacy.com/v7.0/organizations/managing-repositories/) now allows sorting the list of repositories using the available columns in organizations with less than 100 repositories. (CY-5695) -- Moved the code coverage setup page under the repository **Settings**, tab **Coverage**. The new page includes a list of the most recent coverage reports uploaded to Codacy to [help you troubleshoot your coverage setup](../../../coverage-reporter/index.md#uploading-coverage). (CY-5399) +- Moved the code coverage setup page under the repository **Settings**, tab **Coverage**. The new page includes a list of the most recent coverage reports uploaded to Codacy to [help you troubleshoot your coverage setup](../../../coverage-reporter/index.mdx#uploading-coverage). (CY-5399) ## Bug fixes -- Fixed an issue that prevented running [standalone tools](../../../repositories-configure/local-analysis/client-side-tools.md) using the Codacy Analysis CLI GitHub Action. (CY-5812) -- Fixed an issue that caused inconsistencies on the last updated date when listing GitHub repositories. Now, the last updated date is the [date of the last push to the repositories](../../../organizations/organization-overview.md#last-updated-repositories). (CY-5784) +- Fixed an issue that prevented running [standalone tools](../../../repositories-configure/local-analysis/client-side-tools.mdx) using the Codacy Analysis CLI GitHub Action. (CY-5812) +- Fixed an issue that caused inconsistencies on the last updated date when listing GitHub repositories. Now, the last updated date is the [date of the last push to the repositories](../../../organizations/organization-overview.mdx#last-updated-repositories). (CY-5784) - Fixed an issue on the API endpoint [getRepositoryPullRequest](https://api.codacy.com/api/api-docs#getrepositorypullrequest) where the grades for coverage weren't being taken into account when calculating if the pull request is up to standards. (CY-5716) - dartanalyzer now supports including the packages [lints](https://pub.dev/packages/lints) and [flutter_lints](https://pub.dev/packages/flutter_lints) in the `analysis_option.yaml` configuration file. (CY-5626) - The re-analyze button is now hidden on repositories that are running analysis through a build server. (CY-4205) @@ -78,7 +78,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Cppcheck 2.2 - Credo 1.4.0 - CSSLint 1.0.5 -- **[dartanalyzer 2.16.1](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#2161---2022-02-09) (updated from 2.15.1)** +- **[dartanalyzer 2.16.1](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx#2161---2022-02-09) (updated from 2.15.1)** - detekt 1.19.0 - **[ESLint 8.12.0](https://github.com/eslint/eslint/releases/tag/v8.12.0) (new)** - ESLint 7.32.0 (**deprecated**) diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-04-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-04-cloud.md index 79f93b5bf3..b0c664c5d8 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-04-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-04-cloud.md @@ -22,7 +22,7 @@ These release notes are for the Codacy Cloud updates during April 2022. ## Bug fixes - Fixed a broken link in the notification emails sent to organization admins when new members ask to join an organization. (CY-5979) -- Now, the PMD CPD duplication tool runs [without the `--ignore-identifiers` flag](../../../repositories-configure/codacy-configuration-file.md#pmd-cpd-duplication) because it was found to report more false positives. (CY-5955) +- Now, the PMD CPD duplication tool runs [without the `--ignore-identifiers` flag](../../../repositories-configure/codacy-configuration-file.mdx#pmd-cpd-duplication) because it was found to report more false positives. (CY-5955) - Fixed an issue that prevented Codacy from listing GitHub repositories on the Repositories list. (CY-5935) - Fixed an issue that could cause the **Organization Overview** page to display pull requests with the wrong status under the **Most problematic** open pull requests tab. (CY-5872) @@ -42,7 +42,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Cppcheck 2.2 - Credo 1.4.0 - CSSLint 1.0.5 -- **[dartanalyzer 2.16.2](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md) (updated from 2.16.1)** +- **[dartanalyzer 2.16.2](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx) (updated from 2.16.1)** - detekt 1.19.0 - **[ESLint 8.14.0](https://github.com/eslint/eslint/releases/tag/v8.14.0) (updated from 8.12.0)** - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-05-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-05-cloud.md index 6387906fec..0039264d39 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-05-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-05-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during May 2022. ## Product enhancements -- The [**Code Patterns** page](../../../repositories-configure/configuring-code-patterns.md) was redesigned to make which tool is being configured more noticeable. (CY-6021) +- The [**Code Patterns** page](../../../repositories-configure/configuring-code-patterns.mdx) was redesigned to make which tool is being configured more noticeable. (CY-6021) ![Configuring code patterns for a tool](../../images/cy-6021.png) @@ -51,7 +51,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Cppcheck 2.2 - Credo 1.4.0 - CSSLint 1.0.5 -- **[dartanalyzer 2.17.0](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#2170---2022-05-11) (updated from 2.16.2)** +- **[dartanalyzer 2.17.0](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx#2170---2022-05-11) (updated from 2.16.2)** - detekt 1.19.0 - **[ESLint 8.15.0](https://github.com/eslint/eslint/releases/tag/v8.15.0) (updated from 8.14.0)** - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-06-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-06-cloud.md index d03e0e62e1..87b4e09351 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-06-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-06-cloud.md @@ -16,8 +16,8 @@ These release notes are for the Codacy Cloud updates during June 2022. ## Product enhancements -- Codacy now supports using [expiring access tokens](https://docs.gitlab.com/ee/integration/oauth_provider.html#expiring-access-tokens) to integrate with GitLab. Users affected by issues connecting to GitLab should re-login on the Codacy UI **using their GitLab accounts**, or [revoke the GitLab integration on Codacy](../../../getting-started/which-permissions-does-codacy-need-from-my-account.md#revoking-access-to-integrations) if the issues persist. (CY-6117) -- [Pull request notification emails](../../../account/emails.md#managing-your-email-notifications) now display the diff coverage metric. (CY-5700) +- Codacy now supports using [expiring access tokens](https://docs.gitlab.com/ee/integration/oauth_provider.html#expiring-access-tokens) to integrate with GitLab. Users affected by issues connecting to GitLab should re-login on the Codacy UI **using their GitLab accounts**, or [revoke the GitLab integration on Codacy](../../../getting-started/which-permissions-does-codacy-need-from-my-account.mdx#revoking-access-to-integrations) if the issues persist. (CY-6117) +- [Pull request notification emails](../../../account/emails.mdx#managing-your-email-notifications) now display the diff coverage metric. (CY-5700) ## Bug fixes @@ -66,7 +66,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Revive 1.2.1 - RuboCop 1.28.2 - Scalastyle 1.5.0 -- **[ShellCheck 0.8.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md#v080---2021-11-06) (updated from v0.7.2)** +- **[ShellCheck 0.8.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.mdx#v080---2021-11-06) (updated from v0.7.2)** - SonarC# 8.39 - SonarVB 8.15 - Spectral 1.2.7 diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-07-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-07-cloud.md index 424e2c15e8..e0107f1961 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-07-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-07-cloud.md @@ -56,7 +56,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Revive 1.2.1 - RuboCop 1.28.2 - Scalastyle 1.5.0 -- **[ShellCheck 0.8.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md#v080---2021-11-06) (updated from v0.8.0)** +- **[ShellCheck 0.8.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.mdx#v080---2021-11-06) (updated from v0.8.0)** - SonarC# 8.39 - SonarVB 8.15 - Spectral 1.2.7 diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-08-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-08-cloud.md index c0f45917f8..7441930df9 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-08-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-08-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during August 2022. ## Product enhancements -- The [GitHub integration](../../../repositories-configure/integrations/github-integration.md) now uses a GitHub Apps token instead of a personal one so that the following features continue working even if the person who created the integration leaves the organization on GitHub: +- The [GitHub integration](../../../repositories-configure/integrations/github-integration.mdx) now uses a GitHub Apps token instead of a personal one so that the following features continue working even if the person who created the integration leaves the organization on GitHub: - Analyzing new commits and pull requests - Updating the status check of pull requests @@ -29,7 +29,7 @@ These release notes are for the Codacy Cloud updates during August 2022. - Added the new API endpoint [searchOrganizationRepositoriesWithAnalysis](https://api.codacy.com/api/api-docs#searchorganizationrepositorieswithanalysis) to allow searching for repositories in more advanced use cases. For now, it's possible to search for repositories filtered by a list of names. (PLUTO-45) -- Codacy now displays the coverage variation metric with a precision of two decimal places on the [Pull request](../../../repositories/pull-requests.mdx), [Commit](../../../repositories/commits.mdx), and [Files](../../../repositories/files.md) page. +- Codacy now displays the coverage variation metric with a precision of two decimal places on the [Pull request](../../../repositories/pull-requests.mdx), [Commit](../../../repositories/commits.mdx), and [Files](../../../repositories/files.mdx) page. The increased precision of the metric reflects the code coverage changes better by reducing issues with rounding errors. (IO-92, IO-93) @@ -39,7 +39,7 @@ These release notes are for the Codacy Cloud updates during August 2022. - Improved the error handling for the [Stylelint exit codes](https://stylelint.io/user-guide/usage/cli/#exit-codes). (IO-47) -- The [Organization Overview](../../../organizations/organization-overview.md) now allows filtering repositories to help you see and focus on the information for the repositories that matter most to your team. (CY-5573) +- The [Organization Overview](../../../organizations/organization-overview.mdx) now allows filtering repositories to help you see and focus on the information for the repositories that matter most to your team. (CY-5573) ![Repository filter on the Organization Overview](../../images/cy-5573.png) diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-09-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-09-cloud.md index e838b4d9ea..9723d566fe 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-09-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-09-cloud.md @@ -16,13 +16,13 @@ These release notes are for the Codacy Cloud updates during September 2022. ## Product enhancements -- Codacy now displays the coverage variation metric with a precision of two decimal places on the [Repository Dashboard](../../../repositories/repository-dashboard.md) and [Organization Overview](../../../organizations/organization-overview.md), and you can [define quality gates](../../../repositories-configure/adjusting-quality-gates.md) with a coverage variation threshold using the same precision. +- Codacy now displays the coverage variation metric with a precision of two decimal places on the [Repository Dashboard](../../../repositories/repository-dashboard.mdx) and [Organization Overview](../../../organizations/organization-overview.mdx), and you can [define quality gates](../../../repositories-configure/adjusting-quality-gates.mdx) with a coverage variation threshold using the same precision. The increased precision of the metric reflects the code coverage changes better by reducing issues with rounding errors. (IO-54, IO-56) ![Coverage threshold with two decimal places on the Quality settings page](../../images/io-56.png) -- While [configuring a coding standard](../../../organizations/using-coding-standards.md), you can now toggle all code patterns that are currently visible on the list using the new checkbox on the header. This allows you to conveniently toggle code patterns in bulk, for example, to enable all security code patterns. (CY-6336) +- While [configuring a coding standard](../../../organizations/using-coding-standards.mdx), you can now toggle all code patterns that are currently visible on the list using the new checkbox on the header. This allows you to conveniently toggle code patterns in bulk, for example, to enable all security code patterns. (CY-6336) ![Selecting all code patterns while configuring a coding standard](../../images/cy-6336.png) diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-10-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-10-cloud.md index 58b2f90dd3..38987a4945 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-10-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-10-cloud.md @@ -17,7 +17,7 @@ These release notes are for the Codacy Cloud updates during October 2022. ## Product enhancements - Improved the performance and error handling of retrieving many open pull requests from the Git providers while populating the [**Pull requests** page](../../../repositories/pull-requests.mdx). (IO-133) -- While [configuring a coding standard](../../../organizations/using-coding-standards.md), you can now click the link **Enable/Disable all <N> patterns** to toggle all patterns matching the current filters, including the code patterns that weren't loaded on the list yet. (CY-6255) +- While [configuring a coding standard](../../../organizations/using-coding-standards.mdx), you can now click the link **Enable/Disable all <N> patterns** to toggle all patterns matching the current filters, including the code patterns that weren't loaded on the list yet. (CY-6255) ## Bug fixes diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-11-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-11-cloud.md index 09c5bc9482..c8784def7c 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-11-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-11-cloud.md @@ -16,9 +16,9 @@ These release notes are for the Codacy Cloud updates during November 2022. ## Product enhancements -- Improved the performance of applying [coding standards](../../../organizations/using-coding-standards.md) to repositories to avoid timeouts when updating hundreds of repositories. (PLUTO-83) -- The **Status** column of the [coverage reports list](../../../coverage-reporter/index.md#validating-coverage) now includes direct links to troubleshooting instructions when there are coverage errors. (IO-155) -- Codacy now supports the [client-side tool Unity Roslyn Analyzers](../../../repositories-configure/local-analysis/client-side-tools.md) for reporting error-prone and performance issues on C# projects that use the Unity framework. (IO-96) +- Improved the performance of applying [coding standards](../../../organizations/using-coding-standards.mdx) to repositories to avoid timeouts when updating hundreds of repositories. (PLUTO-83) +- The **Status** column of the [coverage reports list](../../../coverage-reporter/index.mdx#validating-coverage) now includes direct links to troubleshooting instructions when there are coverage errors. (IO-155) +- Codacy now supports the [client-side tool Unity Roslyn Analyzers](../../../repositories-configure/local-analysis/client-side-tools.mdx) for reporting error-prone and performance issues on C# projects that use the Unity framework. (IO-96) ## Bug fixes diff --git a/docusaurus/docs/release-notes/cloud/2022/2022-12-cloud.md b/docusaurus/docs/release-notes/cloud/2022/2022-12-cloud.md index 8c69069108..50169ae3b6 100644 --- a/docusaurus/docs/release-notes/cloud/2022/2022-12-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2022/2022-12-cloud.md @@ -16,14 +16,14 @@ These release notes are for the Codacy Cloud updates during December 2022. ## Product enhancements -- The pull request detail page now displays a message when Codacy can't calculate the pull request metrics. The message includes a link to the **Coverage** tab in your repository settings, where you can [test and validate your coverage setup](../../../coverage-reporter/index.md#validating-coverage). (IO-152) +- The pull request detail page now displays a message when Codacy can't calculate the pull request metrics. The message includes a link to the **Coverage** tab in your repository settings, where you can [test and validate your coverage setup](../../../coverage-reporter/index.mdx#validating-coverage). (IO-152) ![Warning on pull request missing coverage data](../../images/io-152.png) ## Bug fixes - Fixed an issue that caused Codacy to display the coverage value on the wrong file in specific edge cases. (COV-25) -- All [coding standards API endpoints](https://api.codacy.com/api/api-docs#codacy-api-coding-standards) now return the **`403 Forbidden`** status code when authorization is required instead of **`401 Forbidden`**, since user permissions on Codacy are [synced with the permissions on the Git provider](../../../organizations/roles-and-permissions-for-organizations.md) and re-authenticating the user doesn't change the access to the endpoints. (IO-333) +- All [coding standards API endpoints](https://api.codacy.com/api/api-docs#codacy-api-coding-standards) now return the **`403 Forbidden`** status code when authorization is required instead of **`401 Forbidden`**, since user permissions on Codacy are [synced with the permissions on the Git provider](../../../organizations/roles-and-permissions-for-organizations.mdx) and re-authenticating the user doesn't change the access to the endpoints. (IO-333) - Fixed an issue affecting GitLab repositories configured to use merge request pipelines, where Codacy would create a separate branch pipeline. (PLUTO-184) - Fixed an issue that caused Checkov to output warnings when the tool had no files to analyze. (TS-11) @@ -66,7 +66,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Revive 1.2.3 - RuboCop 1.39.0 - Scalastyle 1.5.0 -- **[ShellCheck 0.9.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md#v090---2022-12-12) (updated from 0.8.0)** +- **[ShellCheck 0.9.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.mdx#v090---2022-12-12) (updated from 0.8.0)** - SonarC# 8.39 - SonarVB 8.15 - Spectral 1.2.7 diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-01-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-01-cloud.md index f32584e895..9cfb2129cc 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-01-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-01-cloud.md @@ -16,23 +16,23 @@ These release notes are for the Codacy Cloud updates during January 2023. ## Product enhancements -- The Codacy Coverage Reporter now supports [automatic commit SHA-1 detection](../../../coverage-reporter/troubleshooting-coverage-cli-issues.md#commit-detection) on Argo CD. (TS-140) -- Extended the visibility of the [coding standards page](../../../organizations/using-coding-standards.md) to all users, regardless of their permission level. (IO-359) -- The pull request detail page now displays the [commits that are missing coverage data](../../../coverage-reporter/index.md#validating-coverage) for Codacy to calculate the coverage metrics. This information is also visible in the analysis logs. (IO-152) +- The Codacy Coverage Reporter now supports [automatic commit SHA-1 detection](../../../coverage-reporter/troubleshooting-coverage-cli-issues.mdx#commit-detection) on Argo CD. (TS-140) +- Extended the visibility of the [coding standards page](../../../organizations/using-coding-standards.mdx) to all users, regardless of their permission level. (IO-359) +- The pull request detail page now displays the [commits that are missing coverage data](../../../coverage-reporter/index.mdx#validating-coverage) for Codacy to calculate the coverage metrics. This information is also visible in the analysis logs. (IO-152) ![Pull request analysis logs showing the commits that are missing coverage data](../../images/io-152b.png) -- The documentation now includes an end-to-end example illustrating the usage of an [API endpoint to identify commits without coverage data](../../../codacy-api/examples/identifying-commits-without-coverage-data.md) to troubleshoot issues with the calculation of coverage metrics. (DOCS-503) +- The documentation now includes an end-to-end example illustrating the usage of an [API endpoint to identify commits without coverage data](../../../codacy-api/examples/identifying-commits-without-coverage-data.mdx) to troubleshoot issues with the calculation of coverage metrics. (DOCS-503) -- Codacy now supports [reporting a summary of the coverage metrics](../../../repositories-configure/integrations/github-integration.md#coverage-summaries) directly on your pull requests. For now, this feature is only supported on GitHub Cloud. (COV-2, COV-3) +- Codacy now supports [reporting a summary of the coverage metrics](../../../repositories-configure/integrations/github-integration.mdx#coverage-summaries) directly on your pull requests. For now, this feature is only supported on GitHub Cloud. (COV-2, COV-3) ![Coverage summary on GitHub](../../images/cov-2.png) ## Bug fixes -- Codacy no longer counts ignored files towards the [maximum number of files for calculating complexity](../../../faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md). (TS-93) +- Codacy no longer counts ignored files towards the [maximum number of files for calculating complexity](../../../faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.mdx). (TS-93) - Fixed an issue that caused all ESLint 8 code patterns to be turned off by default when adding a new repository. (TS-50) - Fixed the repository page not opening for Bitbucket users with scope `repository:admin` when the Bitbucket repository has many branch restrictions. (PLUTO-290) - The Files page now correctly loads and displays more files when scrolling. (PLUTO-225) diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-02-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-02-cloud.md index 27bc9b784b..43bd1d1c49 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-02-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-02-cloud.md @@ -17,7 +17,7 @@ These release notes are for the Codacy Cloud updates during February 2023. ## Product enhancements - In some Enterprise plans, Codacy now automatically adds to the organization new people that commit to your private repositories and analyzes their commits, providing a more streamlined user management experience. (PLUTO-244) -- You can now run the Codacy Coverage Reporter [Java binary](../../../coverage-reporter/alternative-ways-of-running-coverage-reporter.md#java) using the latest Java version. (TS-261) +- You can now run the Codacy Coverage Reporter [Java binary](../../../coverage-reporter/alternative-ways-of-running-coverage-reporter.mdx#java) using the latest Java version. (TS-261) - Added support for the following ESLint plugins: - [eslint-config-qiw](https://www.npmjs.com/package/eslint-config-qiwi) (TS-256) - [@remix-run/eslint-config](https://www.npmjs.com/package/@remix-run/eslint-config) (TS-234) @@ -28,7 +28,7 @@ These release notes are for the Codacy Cloud updates during February 2023. - Fixed an unexpected error when editing a coding standard and moving back to the **Select languages** step and then forward to the tool selection step. (IO-434) - Fixed an issue that caused Codacy to send incorrect analysis status notifications to Git providers when failing to reanalyze a pull request. (IO-424) - The **Files** page on public repositories now correctly displays the **Coverage** column to users who are logged out. (COV-181) -- Fixed the scenarios where Codacy didn't merge the coverage data from [multiple coverage reports](../../../coverage-reporter/uploading-coverage-in-advanced-scenarios.md#multiple-reports). (COV-147) +- Fixed the scenarios where Codacy didn't merge the coverage data from [multiple coverage reports](../../../coverage-reporter/uploading-coverage-in-advanced-scenarios.mdx#multiple-reports). (COV-147) ## Tool versions @@ -41,7 +41,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Checkov 2.1.188 - Checkstyle 10.3.1 - Clang-Tidy 10.0.1 -- **[CodeNarc 3.2.0](https://github.com/CodeNarc/CodeNarc/blob/master/CHANGELOG.md#version-320----jan-2023) (updated from 2.2.0)** +- **[CodeNarc 3.2.0](https://github.com/CodeNarc/CodeNarc/blob/master/CHANGELOG.mdx#version-320----jan-2023) (updated from 2.2.0)** - CoffeeLint 2.1.0 - **[Cppcheck 2.10](https://github.com/danmar/cppcheck/releases/tag/2.10) (updated from 2.2)** - Credo 1.4.0 diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-03-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-03-cloud.md index 2c18d79c30..855cc41286 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-03-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-03-cloud.md @@ -21,7 +21,7 @@ These release notes are for the Codacy Cloud updates during March 2023. - [pylint-beam](https://github.com/kvudata/pylint-beam) for Pylint (Python 3) (TS-274) - [PHPCompatibilityWP](https://github.com/PHPCompatibility/PHPCompatibilityWP) for PHP_CodeSniffer (TS-56) - Some Enterprise plans now allow downloading a CSV list of all organization members from the **People** page. This feature is also available on all plans using the API endpoint [listPeopleFromOrganizationCsv](https://api.codacy.com/api/api-docs#listpeoplefromorganizationcsv). (PLUTO-388) -- Codacy now supports up to 10 coding standards per organization, allowing you to [optimize and apply quality settings to multiple repositories quickly](../../../organizations/using-coding-standards.md). (IO-358) +- Codacy now supports up to 10 coding standards per organization, allowing you to [optimize and apply quality settings to multiple repositories quickly](../../../organizations/using-coding-standards.mdx). (IO-358) ![Multiple coding standards](../../images/io-358.png) diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-04-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-04-cloud.md index 8b23e3cc6d..e3d6baa7e7 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-04-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-04-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during April 2023. ## Product enhancements -- We’ve revamped the way you [manage your repositories](../../../organizations/managing-repositories.md) on Codacy. You can now select which repositories you want to follow on Codacy, giving you more control over your dashboard for a cleaner, more personalized view. (PLUTO-336) +- We’ve revamped the way you [manage your repositories](../../../organizations/managing-repositories.mdx) on Codacy. You can now select which repositories you want to follow on Codacy, giving you more control over your dashboard for a cleaner, more personalized view. (PLUTO-336) ## Bug fixes diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-05-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-05-cloud.md index 880792a5b1..f91016b7fd 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-05-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-05-cloud.md @@ -21,11 +21,11 @@ These release notes are for the Codacy Cloud updates during May 2023. - [eslint-plugin-markdown](https://www.npmjs.com/package/eslint-plugin-markdown) (TS-121) - [eslint-plugin-yml](https://www.npmjs.com/package/eslint-plugin-yml) (TS-121) -- The [quality gates](../../../repositories-configure/adjusting-quality-gates.md) defined for your repository now apply to both pull requests and commits. (PLUTO-540) +- The [quality gates](../../../repositories-configure/adjusting-quality-gates.mdx) defined for your repository now apply to both pull requests and commits. (PLUTO-540) -- To enhance your experience and bring clarity to your settings, we've split the **Quality settings** of your repository into two tabs, [**Gates**](../../../repositories-configure/adjusting-quality-gates.md) and [**Goals**](../../../repositories-configure/adjusting-quality-goals.md). (PLUTO-520) +- To enhance your experience and bring clarity to your settings, we've split the **Quality settings** of your repository into two tabs, [**Gates**](../../../repositories-configure/adjusting-quality-gates.mdx) and [**Goals**](../../../repositories-configure/adjusting-quality-goals.mdx). (PLUTO-520) -- To ensure consistency across repositories, organization admins can now configure the [default settings that Codacy uses to integrate with the Git provider](../../../organizations/integrations/default-git-provider-integration-settings.md) when adding a new repository to Codacy. These default settings can also be applied to all repositories. (PLUTO-470, PLUTO-546) +- To ensure consistency across repositories, organization admins can now configure the [default settings that Codacy uses to integrate with the Git provider](../../../organizations/integrations/default-git-provider-integration-settings.mdx) when adding a new repository to Codacy. These default settings can also be applied to all repositories. (PLUTO-470, PLUTO-546) ![Organization-level settings for the Git provider integration](../../images/pluto-470.png) diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-06-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-06-cloud.md index a2c1d5c441..a6f1a35bb9 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-06-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-06-cloud.md @@ -45,11 +45,11 @@ These release notes are for the Codacy Cloud updates during June 2023. - [eslint-plugin-sort-destructure-keys](https://www.npmjs.com/package/eslint-plugin-sort-destructure-keys) (TS-448) - Improved the performance of the tool Stylelint by reviewing and refactoring the tool configurations and supported packages. (TS-438) - Updated and refactored the tool Ameba. [Thanks to Sija for the contribution!](https://github.com/codacy/codacy-ameba/pull/25) (TS-417) -- There's now an onboarding tutorial to guide you through the steps of [adding and setting up your first repository](../../../getting-started/codacy-quickstart.md#adding-your-first-repository). (DOCS-468) +- There's now an onboarding tutorial to guide you through the steps of [adding and setting up your first repository](../../../getting-started/codacy-quickstart.mdx#adding-your-first-repository). (DOCS-468) ## Bug fixes -- While [configuring code patterns](../../../repositories-configure/configuring-code-patterns.md), it's now possible to correctly configure rules using strings that include the character sequence `\\`, such as regular expressions. Before, Codacy stripped out one of the `\` characters. (IO-484) +- While [configuring code patterns](../../../repositories-configure/configuring-code-patterns.mdx), it's now possible to correctly configure rules using strings that include the character sequence `\\`, such as regular expressions. Before, Codacy stripped out one of the `\` characters. (IO-484) ## Tool versions diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-07-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-07-cloud.md index f893bcad4b..6a76a1dbd3 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-07-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-07-cloud.md @@ -20,11 +20,11 @@ These release notes are for the Codacy Cloud updates during July 2023. ![AI-generated context-aware comments and fix suggestions](../../images/cy-6855.png) -- You can now use [Security and risk management](../../../organizations/managing-security-and-risk.md) to detect security vulnerabilities across your Codacy repositories and Jira issues and assign the Security Manager role to any organization member. For more details, [see the announcement on our blog](https://blog.codacy.com/centralized-view-of-security-issues/). (HRZ-6, PUL-1924, HRZ-180) +- You can now use [Security and risk management](../../../organizations/managing-security-and-risk.mdx) to detect security vulnerabilities across your Codacy repositories and Jira issues and assign the Security Manager role to any organization member. For more details, [see the announcement on our blog](https://blog.codacy.com/centralized-view-of-security-issues/). (HRZ-6, PUL-1924, HRZ-180) ![Security and risk management item list](../../images/hrz-6.png) -- To ensure that Codacy uses the same quality gates across your repositories, organization admins can now apply [gate policies](../../../organizations/using-gate-policies.md) to multiple repositories. **Gate policies** are available under the new organization page **Policies**, where you can now also find your **Coding standards**. (PLUTO-484) +- To ensure that Codacy uses the same quality gates across your repositories, organization admins can now apply [gate policies](../../../organizations/using-gate-policies.mdx) to multiple repositories. **Gate policies** are available under the new organization page **Policies**, where you can now also find your **Coding standards**. (PLUTO-484) ![Organization-level gate policies](../../images/pluto-484.png) diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-08-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-08-cloud.md index 15f4bcfb33..0d1f24e008 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-08-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-08-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during August 2023. ## Product enhancements -- Added [support for Trivy](../../../getting-started/supported-languages-and-tools.md) to detect committed secrets, IaC misconfigurations, and other security risks. (TAROT-2290) +- Added [support for Trivy](../../../getting-started/supported-languages-and-tools.mdx) to detect committed secrets, IaC misconfigurations, and other security risks. (TAROT-2290) - The CSV file exported by Security and risk management now includes three new columns: file path, line number, and detected pattern. (TAROT-2203) - When developers commit from Bitbucket, now Codacy automatically associates all commit email addresses belonging to the same Bitbucket user with a single Codacy committer. This reduces the number of duplicate seats for Bitbucket organizations when developers don’t log in to Codacy. (PLUTO-652) - The [getRepositoryWithAnalysis API endpoint](https://api.codacy.com/api/api-docs#getrepositorywithanalysis) now includes data about coverable and covered lines for a given repository. (ALA-254) diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-09-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-09-cloud.md index 69c3485387..7e2ff98bfc 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-09-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-09-cloud.md @@ -16,11 +16,11 @@ These release notes are for the Codacy Cloud updates during September 2023. ## Product enhancements -- It's now possible to send notifications to a Slack channel of your choice whenever Codacy detects new critical Security issues in the default branch of any repository in your organization. See [how to install the Codacy Slack integration for Security issues](../../../organizations/integrations/slack-integration.md). (TAROT-2242) +- It's now possible to send notifications to a Slack channel of your choice whenever Codacy detects new critical Security issues in the default branch of any repository in your organization. See [how to install the Codacy Slack integration for Security issues](../../../organizations/integrations/slack-integration.mdx). (TAROT-2242) ![Slack integration for Security issues](../../images/tarot-2242.png) -- You can now use the new [Codacy Visual Studio Code extension](https://github.com/codacy/codacy-vscode-extension) to review and manage the issues found by Codacy for a pull request directly within Visual Studio Code. See [how to install and use the Codacy Visual Studio Code extension](../../../getting-started/integrating-codacy-with-visual-studio-code.md). (ALA-549) +- You can now use the new [Codacy Visual Studio Code extension](https://github.com/codacy/codacy-vscode-extension) to review and manage the issues found by Codacy for a pull request directly within Visual Studio Code. See [how to install and use the Codacy Visual Studio Code extension](../../../getting-started/integrating-codacy-with-visual-studio-code.mdx). (ALA-549) ![Visual Studio Code extension](../../images/ala-549.png) diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-10-13-cloud-bundler-audit-deprecation.md b/docusaurus/docs/release-notes/cloud/2023/2023-10-13-cloud-bundler-audit-deprecation.md index 9c7115139e..df939e6a91 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-10-13-cloud-bundler-audit-deprecation.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-10-13-cloud-bundler-audit-deprecation.md @@ -14,7 +14,7 @@ On January 1st, 2024 we'll be removing **bundler-audit** from Codacy. ## If you are using bundler-audit -To continue monitoring your repositories for vulnerable Ruby gems, enable the **Trivy** tool in your [organization coding standards](../../../organizations/using-coding-standards.md) (recommended) or on the [code patterns page](../../../repositories-configure/configuring-code-patterns.md) of each of the affected repositories. +To continue monitoring your repositories for vulnerable Ruby gems, enable the **Trivy** tool in your [organization coding standards](../../../organizations/using-coding-standards.mdx) (recommended) or on the [code patterns page](../../../repositories-configure/configuring-code-patterns.mdx) of each of the affected repositories. For new repositories, **Trivy** will be active by default. diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-10-25-cloud-csslint-jshint-fauxpas-tailor-tslint-deprecation.md b/docusaurus/docs/release-notes/cloud/2023/2023-10-25-cloud-csslint-jshint-fauxpas-tailor-tslint-deprecation.md index e54736c82f..fca2bcfb09 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-10-25-cloud-csslint-jshint-fauxpas-tailor-tslint-deprecation.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-10-25-cloud-csslint-jshint-fauxpas-tailor-tslint-deprecation.md @@ -20,7 +20,7 @@ The remaining deprecated tools (Faux Pas, JSHint, and Tailor) will be removed la ## If you are using one of these tools -To continue analyzing your repositories, enable the replacement tool for the corresponding deprecated tool listed below in your [organization coding standards](../../../organizations/using-coding-standards.md) (recommended) or on the [code patterns page](../../../repositories-configure/configuring-code-patterns.md) of each affected repository: +To continue analyzing your repositories, enable the replacement tool for the corresponding deprecated tool listed below in your [organization coding standards](../../../organizations/using-coding-standards.mdx) (recommended) or on the [code patterns page](../../../repositories-configure/configuring-code-patterns.mdx) of each affected repository: | Deprecated tool | Replacement tool | |-----------------|------------------| @@ -30,6 +30,6 @@ To continue analyzing your repositories, enable the replacement tool for the cor | Tailor | SwiftLint | | TSLint | ESLint | -The suggested replacement tools are enabled by default for new repositories, except for Clang Tidy, which is a [client-side tool](../../../repositories-configure/local-analysis/client-side-tools.md). +The suggested replacement tools are enabled by default for new repositories, except for Clang Tidy, which is a [client-side tool](../../../repositories-configure/local-analysis/client-side-tools.mdx). If you have any questions or need help, please contact [support@codacy.com](mailto:support@codacy.com). diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-10-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-10-cloud.md index cf2b0b4501..a23a92fbf9 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-10-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-10-cloud.md @@ -57,7 +57,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Checkov 2.3.187 - Checkstyle 10.12.3 - Clang-Tidy 10.0.1 -- **[CodeNarc 3.3.0](https://github.com/CodeNarc/CodeNarc/blob/master/CHANGELOG.md) (updated from 3.2.0)** +- **[CodeNarc 3.3.0](https://github.com/CodeNarc/CodeNarc/blob/master/CHANGELOG.mdx) (updated from 3.2.0)** - Cppcheck 2.12.0 - Credo 1.4.0 - CSSLint (deprecated) 1.0.5 diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx b/docusaurus/docs/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx index c2633bcdb4..53c1cb1867 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx +++ b/docusaurus/docs/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx @@ -45,7 +45,7 @@ Because of this transition, both old and new data will coexist during this perio ::: ## Git provider status checks from the new Coverage engine \{#status-checks\} -:::note[This section applies to the repositories for which you set Codacy to send pull request coverage status data to your Git provider (see how on [GitHub](../../../repositories-configure/integrations/github-integration.md#status-checks), [GitLab](../../../repositories-configure/integrations/gitlab-integration.md#pull-request-status), and [Bitbucket](../../../repositories-configure/integrations/bitbucket-integration.md#pull-request-status)).] +:::note[This section applies to the repositories for which you set Codacy to send pull request coverage status data to your Git provider (see how on [GitHub](../../../repositories-configure/integrations/github-integration.mdx#status-checks), [GitLab](../../../repositories-configure/integrations/gitlab-integration.mdx#pull-request-status), and [Bitbucket](../../../repositories-configure/integrations/bitbucket-integration.mdx#pull-request-status)).] ::: On June 5th 2024, Codacy stopped sending coverage checks from the old Coverage engine. As a consequence of this, you will only see the new checks from the new Coverage engine, **Codacy Diff Coverage** and **Codacy Coverage Variation**, and will no longer see the old **Codacy Coverage Report** check on your pull requests. @@ -114,7 +114,7 @@ If you are using the old status check to block merging pull requests on GitHub, ![New Coverage status checks GitHub](../../images/ala-695-update-status-checks-github.png) ## GitHub coverage summaries from the new Coverage engine \{#coverage-summaries\} -:::note[This section applies to the repositories for which you set Codacy to post [coverage summaries](../../../repositories-configure/integrations/github-integration.md#coverage-summaries) to your GitHub pull requests] +:::note[This section applies to the repositories for which you set Codacy to post [coverage summaries](../../../repositories-configure/integrations/github-integration.mdx#coverage-summaries) to your GitHub pull requests] ::: @@ -136,7 +136,7 @@ You may notice missing coverage data on the Coverage Pull requests page for olde ``` ### Differences in coverage metrics between the old and new Coverage engines \{#differences-in-coverage-metrics-between-the-old-and-new-coverage-engines\} -You may notice some differences in the coverage metrics reported by the old and new Coverage engines and may need to update your [coverage gate rules](../../../repositories-configure/adjusting-quality-gates.md) accordingly. This may happen because the new Coverage engine calculates coverage metrics considering all the files included in the coverage report, while the old Coverage engine ignores some files: +You may notice some differences in the coverage metrics reported by the old and new Coverage engines and may need to update your [coverage gate rules](../../../repositories-configure/adjusting-quality-gates.mdx) accordingly. This may happen because the new Coverage engine calculates coverage metrics considering all the files included in the coverage report, while the old Coverage engine ignores some files: - The old Coverage engine ignores any files on a coverage report that aren't present on the repository on that given commit. -- The old Coverage engine may ignore additional files since it shares [ignore rules](../../../repositories-configure/ignoring-files.md) with the Codacy analysis engine. +- The old Coverage engine may ignore additional files since it shares [ignore rules](../../../repositories-configure/ignoring-files.mdx) with the Codacy analysis engine. diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-11-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-11-cloud.md index 9cebac55bc..e8fddcfb42 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-11-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-11-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during November 2023. ## Product enhancements -- Added [support for Semgrep’s open-source engine](../../../getting-started/supported-languages-and-tools.md) to perform static application security testing (SAST), with the option to upgrade to Semgrep Pro. (TAROT-2347) +- Added [support for Semgrep’s open-source engine](../../../getting-started/supported-languages-and-tools.mdx) to perform static application security testing (SAST), with the option to upgrade to Semgrep Pro. (TAROT-2347) - You now get two additional coverage status reports from the new, faster Coverage engine on your Git provider, showing whether your diff coverage and coverage variation are up to standard or not as configured on the quality gate rules for your repository. (ALA-624) :::note diff --git a/docusaurus/docs/release-notes/cloud/2023/2023-12-cloud.md b/docusaurus/docs/release-notes/cloud/2023/2023-12-cloud.md index 1c43070e02..eda5de6b9d 100644 --- a/docusaurus/docs/release-notes/cloud/2023/2023-12-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2023/2023-12-cloud.md @@ -16,14 +16,14 @@ These release notes are for the Codacy Cloud updates during December 2023. ## Product enhancements -- The [Security and risk management feature](../../../organizations/managing-security-and-risk.md), previously only available to organization admins and security managers, is now open to all organization members and shows information related to the repositories that each member follows. (TAROT-2442) -- The [GitHub coverage summaries](/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks#coverage-summaries) and the Codacy app UI diff tabs now get data from the new Coverage engine. For more information, [see the rollout details of the new Coverage engine](/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks). (ALA-589, ALA-676) +- The [Security and risk management feature](../../../organizations/managing-security-and-risk.mdx), previously only available to organization admins and security managers, is now open to all organization members and shows information related to the repositories that each member follows. (TAROT-2442) +- The [GitHub coverage summaries](/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx#coverage-summaries) and the Codacy app UI diff tabs now get data from the new Coverage engine. For more information, [see the rollout details of the new Coverage engine](/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx). (ALA-589, ALA-676) :::caution These features require updated app permissions. Make sure an organization owner [approves the updated permissions for the Codacy GitHub App](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/reviewing-and-modifying-installed-github-apps#reviewing-permissions) on your GitHub organization. ::: -- When calculating coverage data, the [new coverage engine](/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks) now ignores files in the coverage report that aren't in the associated Git repository. (ALA-716) +- When calculating coverage data, the [new coverage engine](/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx) now ignores files in the coverage report that aren't in the associated Git repository. (ALA-716) ## Bug fixes diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-01-15-cloud-gh-repository-ssh-keys-discontinuation.md b/docusaurus/docs/release-notes/cloud/2024/2024-01-15-cloud-gh-repository-ssh-keys-discontinuation.md index ee018db91b..0b4107bea1 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-01-15-cloud-gh-repository-ssh-keys-discontinuation.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-01-15-cloud-gh-repository-ssh-keys-discontinuation.md @@ -79,4 +79,4 @@ To ensure the conditions to use installation access tokens on GitHub organizatio ## See also -- [Which permissions are required by Codacy GitHub App?](../../../getting-started/which-permissions-does-codacy-need-from-my-account.md#github-cloud) +- [Which permissions are required by Codacy GitHub App?](../../../getting-started/which-permissions-does-codacy-need-from-my-account.mdx#github-cloud) diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-01-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-01-cloud.md index 33a3606c5d..60706649d6 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-01-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-01-cloud.md @@ -17,7 +17,7 @@ These release notes are for the Codacy Cloud updates during January 2024. ## Product enhancements - Codacy now uses installation access tokens to integrate with your GitHub repositories instead of repository SSH keys, which are being discontinued. For more information, [see the discontinuation notice](/release-notes/cloud/cloud-2024-01-15-gh-repository-ssh-keys-discontinuation). (PLUTO-764) -- You can now filter the [security and risk items](../../../organizations/managing-security-and-risk.md) by security category. (TAROT-2444) +- You can now filter the [security and risk items](../../../organizations/managing-security-and-risk.mdx) by security category. (TAROT-2444) ## Bug fixes @@ -29,7 +29,7 @@ These release notes are for the Codacy Cloud updates during January 2024. ## Feature removal - We deleted the existing Slack, Jira, and Webhook repository integrations, and all related data, including authentication data. For more information, [see the deprecation notice](/release-notes/cloud/cloud-2023-11-13-jira-slack-webhooks-repo-integrations-removal). (CY-7202, CY-7203, CY-7204) -- The repository security monitor has been replaced by the [Security and risk management feature](../../../organizations/managing-security-and-risk.md), which shows the information related to the repositories that each member follows. (TAROT-2444) +- The repository security monitor has been replaced by the [Security and risk management feature](../../../organizations/managing-security-and-risk.mdx), which shows the information related to the repositories that each member follows. (TAROT-2444) ## Tool versions diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-02-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-02-cloud.md index 4f703ed751..31c0a080a0 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-02-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-02-cloud.md @@ -19,8 +19,8 @@ These release notes are for the Codacy Cloud updates during February 2024. - The Codacy GitHub App no longer requires **Read and write access to Administration** repository permission. For more information, see the [Discontinuation of SSH keys for GitHub repositories](/release-notes/cloud/cloud-2024-01-15-gh-repository-ssh-keys-discontinuation). (PLUTO-803) - The coverage data sent by the new Coverage engine to your Git provider moved from **beta** to stable. Thus, the coverage data sent by the old engine is now marked **deprecated**. For more information, [see the rollout details of the new Coverage engine](/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks). (ALA-766) - The Coverage Pull Requests page now gets data from the new Coverage engine. For more information, [see the rollout details of the new Coverage engine](/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks). (ALA-770) -- The [Organization overview](../../../organizations/organization-overview.md) is now available on all plans. (ALA-842) -- Improved the mechanism to refresh organizations from the Git provider. As a result, we removed the option to manually refresh the list of organizations when [adding new organizations to Codacy](../../../organizations/what-are-organizations.md#adding-an-organization). (ALA-862) +- The [Organization overview](../../../organizations/organization-overview.mdx) is now available on all plans. (ALA-842) +- Improved the mechanism to refresh organizations from the Git provider. As a result, we removed the option to manually refresh the list of organizations when [adding new organizations to Codacy](../../../organizations/what-are-organizations.mdx#adding-an-organization). (ALA-862) - For GitHub, if you have email privacy enabled on the provider, Codacy doesn't show your private email addresses when displaying your personal details on lists, search filters, or activity. (PLUTO-794) - Added support for the Checkstyle filters [SuppressionCommentFilter](https://checkstyle.sourceforge.io/filters/suppressioncommentfilter.html), [SuppressWarningsHolder](https://checkstyle.sourceforge.io/checks/annotation/suppresswarningsholder.html), and [SuppressWarningsFilter](https://checkstyle.sourceforge.io/filters/suppresswarningsfilter.html). (TCE-709) @@ -53,7 +53,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Cppcheck 2.12.0 - Credo 1.7.2 - CSSLint (deprecated) 1.0.5 -- **[dartanalyzer 3.3.0](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md) (updated from 2.17.0)** +- **[dartanalyzer 3.3.0](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx) (updated from 2.17.0)** - **[detekt 1.23.5](https://github.com/detekt/detekt/releases/tag/v1.23.5) (updated from 1.22.0)** - ESLint 8.56.0 - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-03-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-03-cloud.md index b7c32564d5..7b02ff4267 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-03-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-03-cloud.md @@ -16,9 +16,9 @@ These release notes are for the Codacy Cloud updates during March 2024. ## Product enhancements -- Streamlined new organization setup with a guided path for adding new organizations and a setup checklist on the [Organization overview](../../../organizations/organization-overview.md) page. (ALA-825) +- Streamlined new organization setup with a guided path for adding new organizations and a setup checklist on the [Organization overview](../../../organizations/organization-overview.mdx) page. (ALA-825) - It's now possible to display penetration testing results in the Codacy app. See how to [start pen testing with Codacy](https://go.codacy.com/pen-testing-product). (TAROT-2553) -- It's now possible to [unfollow a repository](../../../organizations/managing-repositories.md#follow-unfollow) through the Codacy app. (PLUTO-902) +- It's now possible to [unfollow a repository](../../../organizations/managing-repositories.mdx#follow-unfollow) through the Codacy app. (PLUTO-902) - In Enterprise plans where Codacy automatically manages seat usage for your organization, the billing period is now based only on the code analysis activity. Codacy app users who don’t contribute to your private repositories no longer occupy a seat. (PLUTO-867) ## Bug fixes @@ -30,7 +30,7 @@ These release notes are for the Codacy Cloud updates during March 2024. ## Feature removal -- We removed the option to bulk copy code patterns between repositories and to import code pattern configurations from another repository. If you want to share tool and code pattern configurations between repositories, the recommended approach is to use a [coding standard](../../../organizations/using-coding-standards.md). (ALA-826) +- We removed the option to bulk copy code patterns between repositories and to import code pattern configurations from another repository. If you want to share tool and code pattern configurations between repositories, the recommended approach is to use a [coding standard](../../../organizations/using-coding-standards.mdx). (ALA-826) ## Tool versions @@ -48,7 +48,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - **[Cppcheck 2.13.0](https://github.com/danmar/cppcheck/releases/tag/2.13.0) (updated from 2.12.0)** - Credo 1.7.2 - CSSLint (deprecated) 1.0.5 -- **[dartanalyzer 3.3.3](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md) (updated from 3.3.0)** +- **[dartanalyzer 3.3.3](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx) (updated from 3.3.0)** - detekt 1.23.5 - **[ESLint 8.57.0](https://github.com/eslint/eslint/releases/tag/v8.57.0) (updated from 8.56.0)** - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-04-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-04-cloud.md index cbe122466c..10681c8d8f 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-04-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-04-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during April 2024. ## Product enhancements -- Improved [Security and risk management](../../../organizations/managing-security-and-risk.md) with a redesigned overview page, offering comprehensive metrics and summary graphs for better visibility and tracking of security findings. An improved findings table now includes a streamlined view of security findings. (TAROT-2546) +- Improved [Security and risk management](../../../organizations/managing-security-and-risk.mdx) with a redesigned overview page, offering comprehensive metrics and summary graphs for better visibility and tracking of security findings. An improved findings table now includes a streamlined view of security findings. (TAROT-2546) :::note To align with the new features, all references to **security items** were updated to **security findings**. @@ -24,12 +24,12 @@ These release notes are for the Codacy Cloud updates during April 2024. ![Security and risk management](../../images/tarot-2546.png) -- Repository admins can now [bypass Codacy status check](../../../faq/code-analysis/can-i-bypass-codacy-status-check.md) to unblock the merge of a pull request. (IO-1036) +- Repository admins can now [bypass Codacy status check](../../../faq/code-analysis/can-i-bypass-codacy-status-check.mdx) to unblock the merge of a pull request. (IO-1036) - You can now manually trigger the reanalysis of the coverage of a pull request using the [`reanalyzeCoverage`](https://api.codacy.com/api/api-docs#reanalyzecoverage) API endpoint. (ALA-1003) ## Bug fixes -- The [Codacy configuration file](../../../repositories-configure/codacy-configuration-file.md) no longer overrides the [default ignored files](../../../repositories-configure/ignoring-files.md#default-ignored-files). Also, Codacy no longer ignores by default files matching the regular expression `.*docs?/.*`. (IO-1031) +- The [Codacy configuration file](../../../repositories-configure/codacy-configuration-file.mdx) no longer overrides the [default ignored files](../../../repositories-configure/ignoring-files.mdx#default-ignored-files). Also, Codacy no longer ignores by default files matching the regular expression `.*docs?/.*`. (IO-1031) - Fixed a parsing error causing detected issues of a commit to show on the analysis logs instead of listed on the commit's Issues tab. (IO-1054) - Improved the resilience of cloning repositories during analysis that would sporadically fail. (IO-1057) - Fixed an issue in the analysis retention mechanism causing some data to be incorrectly deleted without being eligible for retention. (IO-1059) diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-05-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-05-cloud.md index 09afa07510..cd5549bcd1 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-05-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-05-cloud.md @@ -16,14 +16,14 @@ These release notes are for the Codacy Cloud updates during May 2024. ## Product enhancements -- You can now [create a new coding standard](../../../organizations/using-coding-standards.md#creating) by adjusting the sensitivity of preset category groups. This option is also available when setting up a new organization to create a default coding standard. (ALA-824) +- You can now [create a new coding standard](../../../organizations/using-coding-standards.mdx#creating) by adjusting the sensitivity of preset category groups. This option is also available when setting up a new organization to create a default coding standard. (ALA-824) ![New coding standard presets](../../images/ala-824.png) - Improved repositories integration with the Git provider: - - Now the integration is always enabled. For [GitLab](../../../repositories-configure/integrations/gitlab-integration.md#refreshing) and [Bitbucket](../../../repositories-configure/integrations/bitbucket-integration.md#refreshing), repository admins are able to refresh the integration in case the user who added the repository to Codacy loses access to the repository. - - For consistency across the Codacy app, we renamed the [GitLab](../../../repositories-configure/integrations/gitlab-integration.md#configuring) and [Bitbucket](../../../repositories-configure/integrations/bitbucket-integration.md#configuring) integration options - **Pull Request Status** is now **Status checks**, **Pull Request Comment** is now **Issue annotations**, and **Pull Request Summary** is now **Issue summaries**. (CY-6612) + - Now the integration is always enabled. For [GitLab](../../../repositories-configure/integrations/gitlab-integration.mdx#refreshing) and [Bitbucket](../../../repositories-configure/integrations/bitbucket-integration.mdx#refreshing), repository admins are able to refresh the integration in case the user who added the repository to Codacy loses access to the repository. + - For consistency across the Codacy app, we renamed the [GitLab](../../../repositories-configure/integrations/gitlab-integration.mdx#configuring) and [Bitbucket](../../../repositories-configure/integrations/bitbucket-integration.mdx#configuring) integration options - **Pull Request Status** is now **Status checks**, **Pull Request Comment** is now **Issue annotations**, and **Pull Request Summary** is now **Issue summaries**. (CY-6612) ![Repository Git provider integration](../../images/cy-6612.png) @@ -37,8 +37,8 @@ These release notes are for the Codacy Cloud updates during May 2024. ## Bug fixes -- Fixed an issue that caused [Security and risk management](../../../organizations/managing-security-and-risk.md) to miscalculate the counts of open findings in aggregated data. (TAROT-2682) -- Fixed an issue preventing the analysis of a file that had previously been [ignored using the Codacy configuration file](../../../repositories-configure/codacy-configuration-file.md#ignore-files) and later removed from `exclude_path` setting. (TCE-924) +- Fixed an issue that caused [Security and risk management](../../../organizations/managing-security-and-risk.mdx) to miscalculate the counts of open findings in aggregated data. (TAROT-2682) +- Fixed an issue preventing the analysis of a file that had previously been [ignored using the Codacy configuration file](../../../repositories-configure/codacy-configuration-file.mdx#ignore-files) and later removed from `exclude_path` setting. (TCE-924) ## Tool versions @@ -56,7 +56,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Cppcheck 2.13.0 - Credo 1.7.2 - CSSLint (deprecated) 1.0.5 -- **[dartanalyzer 3.3.4](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md) (updated from 3.3.3)** +- **[dartanalyzer 3.3.4](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx) (updated from 3.3.3)** - detekt 1.23.5 - ESLint 8.57.0 - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-06-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-06-cloud.md index a68c6e11fd..8c8bbd8280 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-06-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-06-cloud.md @@ -16,9 +16,9 @@ These release notes are for the Codacy Cloud updates during June 2024. ## Product enhancements -- You can now [filter Security and Risk Management findings by scan type](../../../organizations/managing-security-and-risk.md#scan-types) to see results based on the detection method, including Code Scanning, Software Composition Analysis, Exposed Secrets, Infrastructure as Code, and Penetration Testing. (TCE-1028) -- For increased security, Codacy now sets [automatic expiration timeouts](../../../account/user-session-management.md) for every session. (PLUTO-879) -- The Codacy configuration file now supports a [new field `include_paths`](../../../repositories-configure/codacy-configuration-file.md#include-files) that lets you explicitly specify files or directories to include in the analysis. This is particularly useful for bypassing files or directories that are ignored by default or specified in `exclude_paths`. (TCE-977) +- You can now [filter Security and Risk Management findings by scan type](../../../organizations/managing-security-and-risk.mdx#scan-types) to see results based on the detection method, including Code Scanning, Software Composition Analysis, Exposed Secrets, Infrastructure as Code, and Penetration Testing. (TCE-1028) +- For increased security, Codacy now sets [automatic expiration timeouts](../../../account/user-session-management.mdx) for every session. (PLUTO-879) +- The Codacy configuration file now supports a [new field `include_paths`](../../../repositories-configure/codacy-configuration-file.mdx#include-files) that lets you explicitly specify files or directories to include in the analysis. This is particularly useful for bypassing files or directories that are ignored by default or specified in `exclude_paths`. (TCE-977) - Codacy can now detect duplicated code in the following languages: CoffeeScript, Elixir, Groovy, Objective C, Rust, Visual Basic (TCE-1021) ## Bug fixes @@ -29,7 +29,7 @@ These release notes are for the Codacy Cloud updates during June 2024. ## Deprecations -- On June 5th, Codacy [stopped sending status checks from the old Coverage engine](/release-notes/cloud/cloud-2023-11-23-new-coverage-engine-status-checks#deprecation-and-removal-calendar-for-the-old-coverage-engine-status-checks). (ALA-767) +- On June 5th, Codacy [stopped sending status checks from the old Coverage engine](/release-notes/cloud/2023/2023-11-23-cloud-new-coverage-engine-status-checks.mdx#deprecation-and-removal-calendar-for-the-old-coverage-engine-status-checks). (ALA-767) ## Tool versions @@ -47,7 +47,7 @@ Codacy Cloud now includes the tool versions below. The tools that were recently - Cppcheck 2.13.0 - Credo 1.7.2 - CSSLint (deprecated) 1.0.5 -- **[dartanalyzer 3.4.2](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md) (updated from 3.3.4)** +- **[dartanalyzer 3.4.2](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx) (updated from 3.3.4)** - detekt 1.23.5 - ESLint 8.57.0 - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/cloud/2024/2024-07-cloud.md b/docusaurus/docs/release-notes/cloud/2024/2024-07-cloud.md index 55141c3459..13c201c022 100644 --- a/docusaurus/docs/release-notes/cloud/2024/2024-07-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2024/2024-07-cloud.md @@ -16,7 +16,7 @@ These release notes are for the Codacy Cloud updates during July 2024. ## Product enhancements -- You can now [upload Dynamic Application Security Testing (DAST) findings](../../../codacy-api/examples/uploading-dast-results.md) which appear in the [Security and Risk Management dashboard](../../../organizations/managing-security-and-risk.md#dashboard). (TAROT-2657) +- You can now [upload Dynamic Application Security Testing (DAST) findings](../../../codacy-api/examples/uploading-dast-results.mdx) which appear in the [Security and Risk Management dashboard](../../../organizations/managing-security-and-risk.mdx#dashboard). (TAROT-2657) - The Quality Issues page now groups issues detected in a repository by code pattern and displays them as a list for quick filtering. (ALA-1147) ## Tool versions diff --git a/docusaurus/docs/release-notes/cloud/2025/2025-07-cloud.md b/docusaurus/docs/release-notes/cloud/2025/2025-07-cloud.md index 62a04c9b11..4501a44141 100644 --- a/docusaurus/docs/release-notes/cloud/2025/2025-07-cloud.md +++ b/docusaurus/docs/release-notes/cloud/2025/2025-07-cloud.md @@ -28,7 +28,7 @@ Use Codacy Segments to easily identify the relevant repositories for applying yo Users can now create account API tokens with expiration settings. Choose a predefined range (7–90 days), set a custom date, or opt for no expiration. (LK-1443) **Unfollow repositories:** -You can now [unfollow repositories](../../../organizations/managing-repositories.md#follow-unfollow) directly from the Codacy app. (LK-902) +You can now [unfollow repositories](../../../organizations/managing-repositories.mdx#follow-unfollow) directly from the Codacy app. (LK-902) **Static API authentication for DAST targets:** Business tier customers can now scan DAST API targets with or without authentication headers. (TAROT-2977) diff --git a/docusaurus/docs/release-notes/index.md b/docusaurus/docs/release-notes/index.md index 85bdfb04b3..2f279fbb51 100644 --- a/docusaurus/docs/release-notes/index.md +++ b/docusaurus/docs/release-notes/index.md @@ -18,192 +18,191 @@ Subscribe to this [let us know your feedback on both new and planned product updates! diff --git a/docusaurus/docs/release-notes/self-hosted/v4.4.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v4.4.0-self-hosted.md index 85429cbefb..2c0c40e304 100644 --- a/docusaurus/docs/release-notes/self-hosted/v4.4.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v4.4.0-self-hosted.md @@ -11,7 +11,7 @@ slug: /release-notes/self-hosted/self-hosted-v4.4.0 These release notes are for [Codacy Self-hosted v4.4.0](https://github.com/codacy/chart/releases/tag/4.4.0), released on October 12, 2021. -To upgrade Codacy, follow [these instructions](../../chart/maintenance/upgrade.md). +To upgrade Codacy, follow [these instructions](../../chart/maintenance/upgrade.mdx). 📢 [Visit the Codacy roadmap](https://roadmap.codacy.com) and let us know your feedback on both new and planned product updates! diff --git a/docusaurus/docs/release-notes/self-hosted/v5.0.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v5.0.0-self-hosted.md index 1e216715bd..126238fd1f 100644 --- a/docusaurus/docs/release-notes/self-hosted/v5.0.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v5.0.0-self-hosted.md @@ -23,7 +23,7 @@ Follow the steps below to upgrade to Codacy Self-hosted v5.0.0: **This version drops the support for legacy manual organizations.** Please be sure to [review the breaking changes](#breaking-changes) introduced in this version before upgrading. ::: -1. Follow the instructions to [upgrade your Codacy Self-hosted instance](../../chart/maintenance/upgrade.md). +1. Follow the instructions to [upgrade your Codacy Self-hosted instance](../../chart/maintenance/upgrade.mdx). 1. Update your Codacy command-line tools to the versions with the Git tag `self-hosted-5.0.0`: @@ -132,4 +132,4 @@ This version of Codacy Self-hosted includes the tool versions below. The tools t ## See also -- Announcement for the [end of support for legacy manual organizations on Codacy Cloud](../cloud/cloud-2021-11-02-legacy-organizations.md) +- Announcement for the [end of support for legacy manual organizations on Codacy Cloud](../cloud/2021/2021-11-02-cloud-legacy-organizations.md) diff --git a/docusaurus/docs/release-notes/self-hosted/v5.1.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v5.1.0-self-hosted.md index 63b383eb13..1acac1b425 100644 --- a/docusaurus/docs/release-notes/self-hosted/v5.1.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v5.1.0-self-hosted.md @@ -23,7 +23,7 @@ Follow the steps below to upgrade to Codacy Self-hosted v5.1.0: **Codacy Self-hosted v5.0.0 dropped the support for legacy manual organizations.** Please be sure to [review the breaking changes](/release-notes/self-hosted/self-hosted-v5.0.0#breaking-changes) introduced in that version before upgrading. ::: -1. Follow the instructions to [upgrade your Codacy Self-hosted instance](../../chart/maintenance/upgrade.md). +1. Follow the instructions to [upgrade your Codacy Self-hosted instance](../../chart/maintenance/upgrade.mdx). 1. Update your Codacy command-line tools to the versions with the Git tag `self-hosted-5.1.0`: diff --git a/docusaurus/docs/release-notes/self-hosted/v6.0.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v6.0.0-self-hosted.md index d9a8808706..0191e5973a 100644 --- a/docusaurus/docs/release-notes/self-hosted/v6.0.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v6.0.0-self-hosted.md @@ -38,7 +38,7 @@ This version of Codacy Self-hosted introduces the following breaking changes: - Removed the tool **PMD (Legacy)** - For more details, see the [announcement for Codacy Cloud](../cloud/cloud-2022-02-16-pmd-legacy-removal.md). + For more details, see the [announcement for Codacy Cloud](/release-notes/cloud/cloud-2022-02-16-pmd-legacy-removal). If you're currently using this tool to analyze your repositories and want to start using **PMD** instead, we recommend that you follow the next steps **before upgrading to this Codacy Self-hosted version**: diff --git a/docusaurus/docs/release-notes/self-hosted/v7.0.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v7.0.0-self-hosted.md index a0f68257fd..e35d74c0ef 100644 --- a/docusaurus/docs/release-notes/self-hosted/v7.0.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v7.0.0-self-hosted.md @@ -102,7 +102,7 @@ This version of Codacy Self-hosted includes the tool versions below. The tools t - Cppcheck 2.2 - Credo 1.4.0 - CSSLint 1.0.5 -- **[dartanalyzer 2.16.1](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#2161---2022-02-09) (updated from 2.15.1)** +- **[dartanalyzer 2.16.1](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx#2161---2022-02-09) (updated from 2.15.1)** - detekt 1.19.0 - **[ESLint 8.10.0](https://github.com/eslint/eslint/releases/tag/v8.10.0) (new)** - ESLint 7.32.0 (**deprecated**) diff --git a/docusaurus/docs/release-notes/self-hosted/v8.0.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v8.0.0-self-hosted.md index f06dd87df3..cc1b37e7a7 100644 --- a/docusaurus/docs/release-notes/self-hosted/v8.0.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v8.0.0-self-hosted.md @@ -32,7 +32,7 @@ ESLint 8 will be **enabled by default on new repositories** starting on this ver The previous Codacy Self-hosted version [already included ESLint 8 as a new supported tool and deprecated ESLint 7](/release-notes/self-hosted/self-hosted-v7.0.0#product-enhancements), and Codacy recommends that you migrate to the new version of the tool to benefit from the new features and fixes of ESLint. -See [how to migrate your configuration files to use ESLint 8](../cloud/cloud-2022-03-31-adding-eslint8.md#migrating-your-configuration-files-to-use-eslint-8). (CY-5848) +See [how to migrate your configuration files to use ESLint 8](../cloud/2022/2022-03-31-cloud-adding-eslint8.md#migrating-your-configuration-files-to-use-eslint-8). (CY-5848) ## Product enhancements @@ -64,7 +64,7 @@ This version of Codacy Self-hosted includes the tool versions below. The tools t - Cppcheck 2.2 - Credo 1.4.0 - CSSLint 1.0.5 -- **[dartanalyzer 2.16.2](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#2162---2022-03-24) (updated from 2.16.1)** +- **[dartanalyzer 2.16.2](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx#2162---2022-03-24) (updated from 2.16.1)** - detekt 1.19.0 - **[ESLint 8.14.0](https://github.com/eslint/eslint/releases/tag/v8.14.0) (updated from 8.10.0)** - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/self-hosted/v8.1.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v8.1.0-self-hosted.md index 93eca502e6..673946585a 100644 --- a/docusaurus/docs/release-notes/self-hosted/v8.1.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v8.1.0-self-hosted.md @@ -61,7 +61,7 @@ This version of Codacy Self-hosted includes the tool versions below. The tools t - Cppcheck 2.2 - Credo 1.4.0 - CSSLint 1.0.5 -- **[dartanalyzer 2.17.0](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#2170---2022-05-11) (updated from 2.16.2)** +- **[dartanalyzer 2.17.0](https://github.com/dart-lang/sdk/blob/main/CHANGELOG.mdx#2170---2022-05-11) (updated from 2.16.2)** - detekt 1.19.0 - **[ESLint 8.15.0](https://github.com/eslint/eslint/releases/tag/v8.15.0) (updated from 8.14.0)** - ESLint (deprecated) 7.32.0 diff --git a/docusaurus/docs/release-notes/self-hosted/v9.0.0-self-hosted.md b/docusaurus/docs/release-notes/self-hosted/v9.0.0-self-hosted.md index 6d3de05ba8..a5246986a0 100644 --- a/docusaurus/docs/release-notes/self-hosted/v9.0.0-self-hosted.md +++ b/docusaurus/docs/release-notes/self-hosted/v9.0.0-self-hosted.md @@ -133,7 +133,7 @@ This version of Codacy Self-hosted includes the tool versions below. The tools t - **[Revive 1.2.3](https://github.com/mgechev/revive/releases/tag/v1.2.3) (updated from 1.2.1)** - **[RuboCop 1.32.0](https://github.com/rubocop/rubocop/releases/tag/v1.32.0) (updated from 1.28.2)** - Scalastyle 1.5.0 -- **[ShellCheck 0.8.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.md#v080---2021-11-06) (updated from v0.7.2)** +- **[ShellCheck 0.8.0](https://github.com/koalaman/shellcheck/blob/master/CHANGELOG.mdx#v080---2021-11-06) (updated from v0.7.2)** - SonarC# 8.39 - SonarVB 8.15 - Spectral 1.2.7 diff --git a/docusaurus/docs/repositories-configure/adjusting-quality-gates.md b/docusaurus/docs/repositories-configure/adjusting-quality-gates.mdx similarity index 73% rename from docusaurus/docs/repositories-configure/adjusting-quality-gates.md rename to docusaurus/docs/repositories-configure/adjusting-quality-gates.mdx index 8296679dd5..37461c0202 100644 --- a/docusaurus/docs/repositories-configure/adjusting-quality-gates.md +++ b/docusaurus/docs/repositories-configure/adjusting-quality-gates.mdx @@ -5,16 +5,16 @@ title: Adjusting quality gates The **quality gates** of your repository configure when Codacy reports your pull requests and commits as not up to standards. -When you add your repository to Codacy, it automatically follows the [default gate policy for your organization](../organizations/using-gate-policies.md). If you want to set different quality gates for the repository, [create a new organization gate policy](../organizations/using-gate-policies.md#creating) to apply to the repository. +When you add your repository to Codacy, it automatically follows the [default gate policy for your organization](../organizations/using-gate-policies). If you want to set different quality gates for the repository, [create a new organization gate policy](../organizations/using-gate-policies.mdx#creating) to apply to the repository. :::note -Although you can define custom quality gate settings for specific repositories, we recommend that you always [use a gate policy](../organizations/using-gate-policies.md) defined by your organization to enforce consistent rules across multiple repositories. +Although you can define custom quality gate settings for specific repositories, we recommend that you always [use a gate policy](../organizations/using-gate-policies.mdx) defined by your organization to enforce consistent rules across multiple repositories. ::: Depending on the result of applying the quality gate rules, Codacy updates the color of the metrics on the [pull request or commit quality overview](../repositories/pull-requests.mdx#quality-overview) and reports the corresponding pull request status on your Git provider, if enabled. :::tip -[Integrate Codacy with your Git workflow](../getting-started/integrating-codacy-with-your-git-workflow.md) to report the pull request status to your Git provider and optionally block merging pull requests that aren't up to standards. +[Integrate Codacy with your Git workflow](../getting-started/integrating-codacy-with-your-git-workflow) to report the pull request status to your Git provider and optionally block merging pull requests that aren't up to standards. ::: To access the quality gates, open your repository **Settings**, tab **Gates**. @@ -28,15 +28,15 @@ To access the quality gates, open your repository **Settings**, tab **Gates**. - **Coverage variation is under:** Pull requests or commits are marked not up to standards if they introduce a variation to coverage lower than the set value. :::tip - **Set this gate to -0.10% or lower.** This will ensure that developers have a coverage drop margin so they aren't blocked [while performing some types of code refactors](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md#example-pull-request-coverage-variation-is-negative-but-no-files-have-coverage-variation) + **Set this gate to -0.10% or lower.** This will ensure that developers have a coverage drop margin so they aren't blocked [while performing some types of code refactors](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.mdx#example-pull-request-coverage-variation-is-negative-but-no-files-have-coverage-variation) To ensure that the changes in each pull request have a minimum level of coverage, use the gate **Diff coverage is under** instead. ::: -- **Diff coverage is under:** Pull requests are marked not up to standards if the diff coverage of the pull request is lower than the set value or `∅` ([not applicable](../faq/code-analysis/which-metrics-does-codacy-calculate.md#code-coverage)). This rule is only available for pull requests. +- **Diff coverage is under:** Pull requests are marked not up to standards if the diff coverage of the pull request is lower than the set value or `∅` ([not applicable](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#code-coverage)). This rule is only available for pull requests. ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md) -- [Integrating Codacy with your Git workflow](../getting-started/integrating-codacy-with-your-git-workflow.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) +- [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes) +- [Integrating Codacy with your Git workflow](../getting-started/integrating-codacy-with-your-git-workflow) diff --git a/docusaurus/docs/repositories-configure/adjusting-quality-goals.md b/docusaurus/docs/repositories-configure/adjusting-quality-goals.mdx similarity index 86% rename from docusaurus/docs/repositories-configure/adjusting-quality-goals.md rename to docusaurus/docs/repositories-configure/adjusting-quality-goals.mdx index 1f7eae4894..afb39495be 100644 --- a/docusaurus/docs/repositories-configure/adjusting-quality-goals.md +++ b/docusaurus/docs/repositories-configure/adjusting-quality-goals.mdx @@ -5,7 +5,7 @@ title: Adjusting quality goals Adjust the **quality goals** to help you monitor the progress of the code quality in your repository dashboard, and configure which files Codacy considers complex or duplicated. -Codacy displays the quality goals as dashed lines on the [quality evolution chart](../repositories/repository-dashboard.md#evolution-chart) to help you monitor the progress and overall quality status of your repository. +Codacy displays the quality goals as dashed lines on the [quality evolution chart](../repositories/repository-dashboard.mdx#evolution-chart) to help you monitor the progress and overall quality status of your repository. To access the quality goals, open your repository **Settings**, tab **Goals**. The following screenshot displays the default configuration values: @@ -20,4 +20,4 @@ To access the quality goals, open your repository **Settings**, tab **Goals**. T ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) diff --git a/docusaurus/docs/repositories-configure/codacy-configuration-file.mdx b/docusaurus/docs/repositories-configure/codacy-configuration-file.mdx index 252cf813ee..845db2774a 100644 --- a/docusaurus/docs/repositories-configure/codacy-configuration-file.mdx +++ b/docusaurus/docs/repositories-configure/codacy-configuration-file.mdx @@ -23,7 +23,7 @@ Codacy supports configuring certain advanced features through a configuration fi ## Using a Codacy configuration file :::caution -- If your repository has a Codacy configuration file, the [Ignored files settings](ignoring-files.md) defined on the Codacy UI don't apply and you must [ignore files using the configuration file](#syntax-for-ignoring-files) instead. +- If your repository has a Codacy configuration file, the [Ignored files settings](./ignoring-files.mdx) defined on the Codacy UI don't apply and you must [ignore files using the configuration file](#syntax-for-ignoring-files) instead. - Codacy always uses the configuration file **in the default branch**. New settings added to the Codacy configuration file by a pull request are also considered for the pull request analysis, but the existing configuration in the default branch takes precedence. For example, if a pull request removes an ignored path from the Codacy configuration file, any matching files will stay ignored until that pull request is merged into the default branch. @@ -38,7 +38,7 @@ To use a Codacy configuration file: 1. Add your settings to the configuration file based on the example template below. - If you defined any [Ignored files settings](ignoring-files.md) for the repository, make sure you [add those settings](#syntax-for-ignoring-files) to the Codacy configuration file. + If you defined any [Ignored files settings](./ignoring-files.mdx) for the repository, make sure you [add those settings](#syntax-for-ignoring-files) to the Codacy configuration file. ```yaml --- @@ -82,7 +82,7 @@ To use a Codacy configuration file: ``` ## Ignoring files using a Codacy configuration file \{#ignore-files\} -The Codacy configuration file gives you more flexibility in [ignoring or excluding files](ignoring-files.md) from the Codacy analysis. +The Codacy configuration file gives you more flexibility in [ignoring or excluding files](./ignoring-files.mdx) from the Codacy analysis. :::note @@ -130,7 +130,7 @@ engines: ::: ## Including specific files using a Codacy configuration file \{#include-files\} -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`. +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.mdx#default-ignored-files) or specified in `exclude_paths`. :::note If both `exclude_paths` and `include_paths` are defined, `include_paths` will specify exceptions to the exclusions defined in `exclude_paths`. @@ -155,7 +155,7 @@ In this example, while all directories matching `lib*` are excluded, `lib-a` is ## Adjusting tool configurations \{#tool-conf\} :::note -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). +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.mdx) by users with the [necessary permissions](../organizations/roles-and-permissions-for-organizations.mdx). ::: ### Which tools can be configured and which name should I use? @@ -170,7 +170,7 @@ The Codacy configuration file lets you [configure tools](#tool-specific-configur docs/repositories-configure/codacy-configuration-file.md (list of tool short names to use on the Codacy configuration file) -->*/} -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). +You can use the Codacy configuration file to configure all tools supported by Codacy except the [client-side tools](./local-analysis/client-side-tools.mdx). The following are the tool names that must be used in the Codacy configuration file: @@ -221,12 +221,12 @@ tsqllint The following names are **deprecated** and shouldn't be used, although they're still accepted in the Codacy configuration file: -- `bundleraudit` - The tool **bundler-audit** [is deprecated](../release-notes/cloud/cloud-2023-10-13-bundler-audit-deprecation.md). If you are using **Semprep** or **Trivy** instead, use the names `trivy` or `semgrep`. -- `csslint` - The tool **CSSLint** [is deprecated](../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation.md). If you are using **Stylelint** instead, use the name `stylelint`. +- `bundleraudit` - The tool **bundler-audit** [is deprecated](../release-notes/cloud/cloud-2023-10-13-bundler-audit-deprecation). If you are using **Semprep** or **Trivy** instead, use the names `trivy` or `semgrep`. +- `csslint` - The tool **CSSLint** [is deprecated](../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation). If you are using **Stylelint** instead, use the name `stylelint`. - `eslint` - Use the name `eslint-8` for **ESLint**. -- `jshint`, `tslint` - The tools **JSHint** and **TSLint** [are deprecated](../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation.md). If you are using **ESLint** instead, use the name `eslint-8`. +- `jshint`, `tslint` - The tools **JSHint** and **TSLint** [are deprecated](../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation). If you are using **ESLint** instead, use the name `eslint-8`. - `pylint` - Use the name `pylintpython3` for **Pylint**. -- `tailor` - The tool **Tailor** [is deprecated](../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation.md). If you are using **SwiftLint** instead, use the name `swiftlint`. +- `tailor` - The tool **Tailor** [is deprecated](../release-notes/cloud/cloud-2023-10-25-csslint-jshint-fauxpas-tailor-tslint-deprecation). If you are using **SwiftLint** instead, use the name `swiftlint`. ### Tool-specific configurations @@ -268,7 +268,7 @@ engines: ``` :::tip -If you're using Python 3.4.\* or later as your programming language, disable the tool **Pylint (legacy)** and enable the tool **Pylint** on your repository [Code patterns page](configuring-code-patterns.md) instead. For more information, see [What's New in Pylint 2.0](https://pylint.pycqa.org/en/latest/whatsnew/2/2.0/index.html). +If you're using Python 3.4.\* or later as your programming language, disable the tool **Pylint (legacy)** and enable the tool **Pylint** on your repository [Code patterns page](./configuring-code-patterns.mdx) instead. For more information, see [What's New in Pylint 2.0](https://pylint.pycqa.org/en/latest/whatsnew/2/2.0/index.html). ::: #### PMD CPD (Duplication) @@ -279,7 +279,7 @@ If you're using Python 3.4.\* or later as your programming language, disable the https://github.com/codacy/codacy-duplication-pmdcpd/blob/c799cb3a80d1f3b3a8eb9868f63abee13e3e81c4/src/main/scala/com/codacy/duplication/pmd/Cpd.scala#L128 -->*/} -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). +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.mdx). By default, Codacy only reports duplicate code blocks that have the following minimum token length, depending on the language: @@ -325,11 +325,11 @@ engines: You can use a Codacy configuration file to manage the languages that Codacy analyzes in your repository. :::note -Codacy applies the language settings from the Codacy configuration file as well as any settings defined [in the Codacy UI](languages.md). +Codacy applies the language settings from the Codacy configuration file as well as any settings defined [in the Codacy UI](./languages.mdx). ::: ### Adding custom file extensions \{#file-extensions\} -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..extensions`. Keep in mind that some tools might not work out of the box with those extensions. +To [add custom file extensions to languages](./languages.mdx#configuring-file-extensions) using a Codacy configuration file, you must define one or more extensions under `languages..extensions`. Keep in mind that some tools might not work out of the box with those extensions. For example: @@ -342,7 +342,7 @@ languages: ``` ### Disabling analysis of a language \{#disable-language\} -To [disable the analysis of a specific language](languages.md#disable-language) using a Codacy configuration file, set `languages..enabled` to `false`. The analysis is enabled by default for all languages. +To [disable the analysis of a specific language](./languages.mdx#disable-language) using a Codacy configuration file, set `languages..enabled` to `false`. The analysis is enabled by default for all languages. For example: diff --git a/docusaurus/docs/repositories-configure/configuring-code-patterns.mdx b/docusaurus/docs/repositories-configure/configuring-code-patterns.mdx index e15cbfa3a4..ef24c7bac8 100644 --- a/docusaurus/docs/repositories-configure/configuring-code-patterns.mdx +++ b/docusaurus/docs/repositories-configure/configuring-code-patterns.mdx @@ -21,13 +21,13 @@ To configure the tools and code patterns for a repository using the Codacy UI: 1. Open your repository **Code patterns** page. - ![Code patterns page](images/code-patterns.png) + ![Code patterns page](./images/code-patterns.png) 1. Enable or disable the tools that Codacy will use to analyze the repository. - ![Toggling tools](images/code-patterns-toggle-tools.png) + ![Toggling tools](./images/code-patterns-toggle-tools.png) -1. Select a tool to enable or disable its code patterns. To make it easier to find relevant patterns, use the filters above the pattern list. You can filter by [issue category](../faq/code-analysis/which-metrics-does-codacy-calculate.md#issues), status, severity level, or display only recommended code patterns. +1. Select a tool to enable or disable its code patterns. To make it easier to find relevant patterns, use the filters above the pattern list. You can filter by [issue category](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#issues), status, severity level, or display only recommended code patterns. To see an explanation of the issues that a pattern detects and how to fix them, click the respective dropdown arrow. @@ -37,9 +37,9 @@ To configure the tools and code patterns for a repository using the Codacy UI: - Codacy displays the tag **New** for one month next to the name of newly added code patterns. ::: - ![Configuring code patterns](images/code-patterns-configure.png) + ![Configuring code patterns](./images/code-patterns-configure.png) -1. Optionally, to take the changes into account immediately, [reanalyze the repository manually](../faq/repositories/how-do-i-reanalyze-my-repository.md). Otherwise, Codacy will use the updated configuration when analyzing new commits and pull requests. +1. Optionally, to take the changes into account immediately, [reanalyze the repository manually](../faq/repositories/how-do-i-reanalyze-my-repository.mdx). Otherwise, Codacy will use the updated configuration when analyzing new commits and pull requests. ## Discover code patterns across all tools \{#discover-code-patterns-across-all-tools\} To discover code patterns across all tools, click **Discover patterns** at the top of the **Tools** list. @@ -49,13 +49,13 @@ Use the input field to search for patterns by name or description. You can also You can also expand your search to include patterns from all tools, even if the tool is not enabled for the repository. ## Customizing applied coding standards \{#customizing-applied-coding-standards\} -To apply or edit a repository's [coding standards](../organizations/using-coding-standards.md), click **Customize** in the **Following ...** section at the top of the **Code patterns** page. +To apply or edit a repository's [coding standards](../organizations/using-coding-standards.mdx), click **Customize** in the **Following ...** section at the top of the **Code patterns** page. -![Customize applied coding standards](images/code-patterns-cs-customize.png) +![Customize applied coding standards](./images/code-patterns-cs-customize.png) Select the coding standards that you want to follow or stop following and click **Apply**. -![Customize applied coding standards](images/code-patterns-cs-customize-modal.png) +![Customize applied coding standards](./images/code-patterns-cs-customize-modal.png) ## Customizing patterns when following coding standards \{#customizing-patterns-following-standards\} @@ -74,9 +74,9 @@ You can add extra tools and patterns, if these are not enabled by any applied co -->*/} :::note -- After activating a configuration file for a tool, Codacy uses that configuration file even if you [exclude it from Codacy analysis](ignoring-files.md). +- After activating a configuration file for a tool, Codacy uses that configuration file even if you [exclude it from Codacy analysis](./ignoring-files.mdx). -- When [using a tool configuration file alongside a coding standard](../organizations/using-coding-standards.md#using-with-tool-configuration), the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled. +- When [using a tool configuration file alongside a coding standard](../organizations/using-coding-standards.mdx#using-with-tool-configuration), the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled. ::: @@ -84,7 +84,7 @@ Codacy supports configuration files for several static analysis tools to help yo To use a configuration file for a static analysis tool: -1. Push the configuration file to the root of the [default Codacy branch](managing-branches.mdx). +1. Push the configuration file to the root of the [default Codacy branch](./managing-branches.mdx). 1. Open the repository **Code patterns** page, select the tool of interest, and activate the toggle to use a configuration file. @@ -96,7 +96,7 @@ To use a configuration file for a static analysis tool: - For performance reasons, when you update pattern settings using a configuration file, Codacy may display outdated messages for issues identified previously by those patterns. ::: - ![Using a configuration file](images/code-patterns-config-file.png) + ![Using a configuration file](./images/code-patterns-config-file.png) The table below lists the configuration file names that Codacy detects and supports for each tool: @@ -324,5 +324,5 @@ Codacy doesn't support configuration files for the following tools: ## See also -- [Applying a coding standard across multiple repositories](../organizations/using-coding-standards.md) +- [Applying a coding standard across multiple repositories](../organizations/using-coding-standards.mdx) - [How to implement Google JavaScript style guide with Codacy](https://blog.codacy.com/implement-google-javascript-style-guide-with-codacy/) diff --git a/docusaurus/docs/repositories-configure/ignoring-files.mdx b/docusaurus/docs/repositories-configure/ignoring-files.mdx index de30f0af33..1d83445351 100644 --- a/docusaurus/docs/repositories-configure/ignoring-files.mdx +++ b/docusaurus/docs/repositories-configure/ignoring-files.mdx @@ -12,29 +12,29 @@ In some situations, you may want to ignore or exclude files from the Codacy anal To exclude files from your repository analysis open your repository **Settings**, tab **Ignored Files**, and select the files you want to ignore. This view only shows the files on your main branch. -![Ignored files](images/ignored-files.png) +![Ignored files](./images/ignored-files.png) :::note - See below the files that Codacy [ignores by default](#default-ignored-files). -- You can also ignore files using your own [tool configuration files](configuring-code-patterns.md#using-your-own-tool-configuration-files), although this depends on the option being supported by each tool. +- You can also ignore files using your own [tool configuration files](./configuring-code-patterns.mdx#using-your-own-tool-configuration-files), although this depends on the option being supported by each tool. - - When excluding files from **Duplication** analysis, you must state the **entire path** to the files. Unlike quality analysis, wildcards will not work, resulting in files not being excluded. ::: -If you need more flexibility in ignoring files, use a Codacy configuration file to [define a custom list of file paths to exclude](codacy-configuration-file.md#syntax-for-ignoring-files). +If you need more flexibility in ignoring files, use a Codacy configuration file to [define a custom list of file paths to exclude](./codacy-configuration-file.mdx#syntax-for-ignoring-files). :::caution -If your repository has a [Codacy configuration file](codacy-configuration-file.md), the **Ignored files** settings defined on the Codacy UI don't apply and you must [ignore files using the configuration file](codacy-configuration-file.md#ignore-files) instead. +If your repository has a [Codacy configuration file](./codacy-configuration-file.mdx), the **Ignored files** settings defined on the Codacy UI don't apply and you must [ignore files using the configuration file](./codacy-configuration-file.mdx#ignore-files) instead. ::: -![Ignored files](images/ignored-files-configuration-file.png) +![Ignored files](./images/ignored-files-configuration-file.png) ## Default ignored files -By default, Codacy ignores all the files that match the regular expressions below. If you need to analyze files that match these regular expressions, use a Codacy configuration file to [define a custom list of file paths to include](./codacy-configuration-file.md#include-files). +By default, Codacy ignores all the files that match the regular expressions below. If you need to analyze files that match these regular expressions, use a Codacy configuration file to [define a custom list of file paths to include](./codacy-configuration-file.mdx#include-files). ```text .*[\.-]min\.css diff --git a/docusaurus/docs/repositories-configure/integrations/bitbucket-integration.mdx b/docusaurus/docs/repositories-configure/integrations/bitbucket-integration.mdx index d812d8ebf2..61516f487e 100644 --- a/docusaurus/docs/repositories-configure/integrations/bitbucket-integration.mdx +++ b/docusaurus/docs/repositories-configure/integrations/bitbucket-integration.mdx @@ -10,7 +10,7 @@ import ServiceAccountIntegration from '../../_includes/ServiceAccountIntegration The Bitbucket integration incorporates Codacy on your existing Git provider workflows by reporting issues and the analysis status directly on your pull requests. -When you add a new repository, Codacy sets the Bitbucket integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings.md). You can then [customize the settings](#configuring) for the repository. +When you add a new repository, Codacy sets the Bitbucket integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings.mdx). You can then [customize the settings](#configuring) for the repository. ![Bitbucket integration](images/bitbucket-integration.png) @@ -26,7 +26,7 @@ Depending on the options that you enable, Codacy will automatically update pull ### Status checks \{#pull-request-status\} -Adds a report to your pull requests showing whether your pull requests and coverage are up to standards or not as configured on the [quality gate rules](../../repositories-configure/adjusting-quality-gates.md) for your repository. You can then optionally [block merging pull requests that aren't up to standards](../../getting-started/integrating-codacy-with-your-git-workflow.md#blocking-pull-requests). +Adds a report to your pull requests showing whether your pull requests and coverage are up to standards or not as configured on the [quality gate rules](../../repositories-configure/adjusting-quality-gates) for your repository. You can then optionally [block merging pull requests that aren't up to standards](../../getting-started/integrating-codacy-with-your-git-workflow.mdx#blocking-pull-requests). @@ -56,7 +56,7 @@ Adds AI-enhanced comments with insights to help you fix identified issues. ## Refreshing the Bitbucket integration \{#refreshing\} If the user who added the repository to Codacy loses access to the repository, which may happen when the user leaves the team or the organization, Codacy won't be able to create comments on pull requests. -In this situation, another user with [administrator access to the repository](../../organizations/roles-and-permissions-for-organizations.md#permissions-for-bitbucket) needs to refresh the Bitbucket integration: +In this situation, another user with [administrator access to the repository](../../organizations/roles-and-permissions-for-organizations.mdx#permissions-for-bitbucket) needs to refresh the Bitbucket integration: @@ -70,4 +70,4 @@ After refreshing the integration, Codacy will use the logged in Bitbucket user t ## See also -- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow.md) +- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow) diff --git a/docusaurus/docs/repositories-configure/integrations/github-integration.mdx b/docusaurus/docs/repositories-configure/integrations/github-integration.mdx index 477b6e71a2..d4b13eed58 100644 --- a/docusaurus/docs/repositories-configure/integrations/github-integration.mdx +++ b/docusaurus/docs/repositories-configure/integrations/github-integration.mdx @@ -10,7 +10,7 @@ import Paid from '../../_includes/Paid.mdx' The GitHub integration incorporates Codacy on your existing Git provider workflows by reporting issues and the analysis status directly on your pull requests. -When you add a new repository, Codacy sets the GitHub integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings.md). You can then [customize the settings](#configuring) for the repository. +When you add a new repository, Codacy sets the GitHub integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings). You can then [customize the settings](#configuring) for the repository. ![GitHub integration](images/github-integration.png) @@ -23,7 +23,7 @@ Depending on the options that you enable, Codacy will automatically update pull ### Status checks -Adds a report to your pull requests showing whether your pull requests and coverage are up to standards or not as configured on the [quality gate rules](../../repositories-configure/adjusting-quality-gates.md) for your repository. You can then optionally [block merging pull requests that aren't up to standards](../../getting-started/integrating-codacy-with-your-git-workflow.md#blocking-pull-requests). +Adds a report to your pull requests showing whether your pull requests and coverage are up to standards or not as configured on the [quality gate rules](../../repositories-configure/adjusting-quality-gates) for your repository. You can then optionally [block merging pull requests that aren't up to standards](../../getting-started/integrating-codacy-with-your-git-workflow.mdx#blocking-pull-requests). @@ -67,7 +67,7 @@ Adds a pull request comment showing an overall view of the coverage metrics for When there are new coverage results, Codacy updates the last coverage summary comment if it's included in the last 5 comments of the pull request. Otherwise, Codacy creates a new comment. :::caution -**To get coverage summaries** you must also [add coverage to your repository](../../coverage-reporter/index.md). +**To get coverage summaries** you must also [add coverage to your repository](../../coverage-reporter/). ::: ![Coverage summary on GitHub](images/github-integration-coverage-summary.png) @@ -97,4 +97,4 @@ Adds AI-enhanced comments, providing insights and ready-to-commit AI-generated f ## See also -- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow.md) +- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow) diff --git a/docusaurus/docs/repositories-configure/integrations/gitlab-integration.mdx b/docusaurus/docs/repositories-configure/integrations/gitlab-integration.mdx index acec4c5c7e..d10db8e0e1 100644 --- a/docusaurus/docs/repositories-configure/integrations/gitlab-integration.mdx +++ b/docusaurus/docs/repositories-configure/integrations/gitlab-integration.mdx @@ -10,7 +10,7 @@ import ServiceAccountIntegration from '../../_includes/ServiceAccountIntegration The GitLab integration incorporates Codacy on your existing Git provider workflows by reporting issues and the analysis status directly on your merge requests. -When you add a new repository, Codacy sets the GitLab integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings.md). You can then [customize the settings](#configuring) for the repository. +When you add a new repository, Codacy sets the GitLab integration using the [default settings for your organization](../../organizations/integrations/default-git-provider-integration-settings). You can then [customize the settings](#configuring) for the repository. ![GitLab integration](images/gitlab-integration.png) @@ -26,7 +26,7 @@ Depending on the options that you enable, Codacy will automatically update merge ### Status checks \{#pull-request-status\} -Adds a report to your merge requests showing whether your merge requests and coverage are up to standards or not as configured on the [quality gate rules](../../repositories-configure/adjusting-quality-gates.md) for your project. You can then optionally [block merging merge requests that aren't up to standards](../../getting-started/integrating-codacy-with-your-git-workflow.md#blocking-pull-requests). +Adds a report to your merge requests showing whether your merge requests and coverage are up to standards or not as configured on the [quality gate rules](../../repositories-configure/adjusting-quality-gates) for your project. You can then optionally [block merging merge requests that aren't up to standards](../../getting-started/integrating-codacy-with-your-git-workflow.mdx#blocking-pull-requests). @@ -47,7 +47,7 @@ Adds a pull request comment showing an overall view of the coverage metrics for When there are new coverage results, Codacy updates the last coverage summary comment if it's included in the last 5 comments of the pull request. Otherwise, Codacy creates a new comment. :::caution -**To get coverage summaries** you must also [add coverage to your repository](../../coverage-reporter/index.md). +**To get coverage summaries** you must also [add coverage to your repository](../../coverage-reporter/index.mdx). ::: ![Coverage summary on GitLab](images/gitlab-integration-coverage-summary.png) @@ -69,7 +69,7 @@ Adds AI-enhanced comments with insights to help you fix identified issues. ## Refreshing the GitLab integration \{#refreshing\} If the user who added the repository to Codacy loses access to the repository, which may happen when the user leaves the team or the organization, Codacy won't be able to create comments on merge requests. -In this situation, another user with [administrator access to the repository](../../organizations/roles-and-permissions-for-organizations.md#permissions-for-gitlab) needs to refresh the GitLab integration: +In this situation, another user with [administrator access to the repository](../../organizations/roles-and-permissions-for-organizations.mdx#permissions-for-gitlab) needs to refresh the GitLab integration: @@ -83,4 +83,4 @@ After refreshing the integration, Codacy will use the logged in GitLab user to c ## See also -- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow.md) +- [Integrating Codacy with your Git workflow](../../getting-started/integrating-codacy-with-your-git-workflow) diff --git a/docusaurus/docs/repositories-configure/integrations/post-commit-hooks.md b/docusaurus/docs/repositories-configure/integrations/post-commit-hooks.mdx similarity index 100% rename from docusaurus/docs/repositories-configure/integrations/post-commit-hooks.md rename to docusaurus/docs/repositories-configure/integrations/post-commit-hooks.mdx diff --git a/docusaurus/docs/repositories-configure/languages.mdx b/docusaurus/docs/repositories-configure/languages.mdx index 554c78e04e..4fb05261e1 100644 --- a/docusaurus/docs/repositories-configure/languages.mdx +++ b/docusaurus/docs/repositories-configure/languages.mdx @@ -15,7 +15,7 @@ By default, the analysis is enabled for all languages that Codacy detects in you - [Disable the analysis of specific languages](#disable-language) :::note -Codacy applies the language settings defined in the Codacy UI as well as any settings defined using a [Codacy configuration file](codacy-configuration-file.md#languages). +Codacy applies the language settings defined in the Codacy UI as well as any settings defined using a [Codacy configuration file](codacy-configuration-file.mdx#languages). ::: ## Configuring file extensions @@ -28,7 +28,7 @@ If your repository contains source files with extensions not supported by Codacy 1. Click **Save changes** to update your file extension settings. - ![Configuring file extensions](images/file-extensions.png) + ![Configuring file extensions](./images/file-extensions.png) @@ -45,6 +45,6 @@ By default, Codacy analyzes all languages detected in your repository. To disabl 1. Click **Save changes** to update your settings. - ![Disabling language](images/disable-language.png) + ![Disabling language](./images/disable-language.png) diff --git a/docusaurus/docs/repositories-configure/local-analysis/client-side-tools.md b/docusaurus/docs/repositories-configure/local-analysis/client-side-tools.mdx similarity index 96% rename from docusaurus/docs/repositories-configure/local-analysis/client-side-tools.md rename to docusaurus/docs/repositories-configure/local-analysis/client-side-tools.mdx index 0335834a37..e081f72f0b 100644 --- a/docusaurus/docs/repositories-configure/local-analysis/client-side-tools.md +++ b/docusaurus/docs/repositories-configure/local-analysis/client-side-tools.mdx @@ -15,7 +15,7 @@ Codacy supports client-side tools in two ways: The Codacy Analysis CLI automatically fetches the code pattern settings that you define on the Codacy UI and applies them when running the tools. -- **Standalone tools:** Codacy provides auxiliary converters that parse the output of third-party tools and convert to a format that you then upload to Codacy. You must download, configure, and run the third-party tools yourself. +- **Standalone tools:** Codacy provides auxiliary converters that parse the output of third-party tools and convert to a format that you then upload to Codacy. You must download, configure, and run the third-party tools yourself.{/* */} You can't configure these tools on the Codacy UI, since you manage their configuration locally. @@ -32,7 +32,7 @@ The table below describes the supported client-side tools and includes links to **If you're using GitHub** we recommend that you use the [Codacy Analysis CLI GitHub Action](https://github.com/codacy/codacy-analysis-cli-action#integration-with-codacy-for-client-side-tools) to run the **containerized** client-side tools and upload the results to Codacy. ::: - +-->*/} @@ -108,4 +108,4 @@ The table below describes the supported client-side tools and includes links to ## See also -- [Supported languages and tools](../../getting-started/supported-languages-and-tools.md) +- [Supported languages and tools](../../getting-started/supported-languages-and-tools) diff --git a/docusaurus/docs/repositories-configure/local-analysis/running-aligncheck.mdx b/docusaurus/docs/repositories-configure/local-analysis/running-aligncheck.mdx index f949929ee2..fc6dbdd4bc 100644 --- a/docusaurus/docs/repositories-configure/local-analysis/running-aligncheck.mdx +++ b/docusaurus/docs/repositories-configure/local-analysis/running-aligncheck.mdx @@ -7,7 +7,7 @@ tool_name: aligncheck import ClientSideToolAdvanced from '../../_includes/ClientSideToolAdvanced.mdx'; import ClientSideToolInstructionsItems from '../../_includes/ClientSideToolInstructionsItems.mdx'; -To run aligncheck as a [client-side tool](client-side-tools.md): +To run aligncheck as a [client-side tool](./client-side-tools.mdx):
    diff --git a/docusaurus/docs/repositories-configure/local-analysis/running-dartanalyzer.mdx b/docusaurus/docs/repositories-configure/local-analysis/running-dartanalyzer.mdx index 46405f35e7..eef7d0ba05 100644 --- a/docusaurus/docs/repositories-configure/local-analysis/running-dartanalyzer.mdx +++ b/docusaurus/docs/repositories-configure/local-analysis/running-dartanalyzer.mdx @@ -6,7 +6,7 @@ tool_name: Dart Analyzer import ClientSideToolInstructionsItems from '../../_includes/ClientSideToolInstructionsItems.mdx'; -To run Dart Analyzer as a [client-side tool](client-side-tools.md): +To run Dart Analyzer as a [client-side tool](./client-side-tools.mdx):
      diff --git a/docusaurus/docs/repositories-configure/local-analysis/running-deadcode.mdx b/docusaurus/docs/repositories-configure/local-analysis/running-deadcode.mdx index 75f9b3d32f..78c1e1bf3c 100644 --- a/docusaurus/docs/repositories-configure/local-analysis/running-deadcode.mdx +++ b/docusaurus/docs/repositories-configure/local-analysis/running-deadcode.mdx @@ -7,7 +7,7 @@ tool_name: deadcode import ClientSideToolAdvanced from '../../_includes/ClientSideToolAdvanced.mdx'; import ClientSideToolInstructionsItems from '../../_includes/ClientSideToolInstructionsItems.mdx'; -To run deadcode as a [client-side tool](client-side-tools.md): +To run deadcode as a [client-side tool](./client-side-tools.mdx):
        diff --git a/docusaurus/docs/repositories-configure/local-analysis/running-eslint.mdx b/docusaurus/docs/repositories-configure/local-analysis/running-eslint.mdx index 806697b395..e292f0dae7 100644 --- a/docusaurus/docs/repositories-configure/local-analysis/running-eslint.mdx +++ b/docusaurus/docs/repositories-configure/local-analysis/running-eslint.mdx @@ -6,7 +6,7 @@ tool_name: ESLint import ClientSideToolInstructionsItems from '../../_includes/ClientSideToolInstructionsItems.mdx'; -To run ESLint as a [client-side tool](client-side-tools.md): +To run ESLint as a [client-side tool](./client-side-tools.mdx):
          diff --git a/docusaurus/docs/repositories-configure/local-analysis/running-spotbugs.mdx b/docusaurus/docs/repositories-configure/local-analysis/running-spotbugs.mdx index 103fe4f06b..e9eb5efe2a 100644 --- a/docusaurus/docs/repositories-configure/local-analysis/running-spotbugs.mdx +++ b/docusaurus/docs/repositories-configure/local-analysis/running-spotbugs.mdx @@ -7,7 +7,7 @@ tool_name: SpotBugs import ClientSideToolAdvanced from '../../_includes/ClientSideToolAdvanced.mdx'; import ClientSideToolInstructionsItems from '../../_includes/ClientSideToolInstructionsItems.mdx'; -To run SpotBugs as a [client-side tool](client-side-tools.md): +To run SpotBugs as a [client-side tool](./client-side-tools.mdx):
            @@ -51,7 +51,7 @@ The Codacy Analysis CLI runs SpotBugs on the compiled classes of your repository The Codacy Analysis CLI tries to find the compiled classes and map results to the source files automatically. If you use Maven, Gradle, or sbt the Codacy Analysis CLI also detects the default layouts automatically. -If there is an issue with detection, you can configure these paths manually by adding a `.codacy.yml` [Codacy configuration file](../codacy-configuration-file.md) to the root of the repository: +If there is an issue with detection, you can configure these paths manually by adding a `.codacy.yml` [Codacy configuration file](../codacy-configuration-file.mdx) to the root of the repository: ```yml --- diff --git a/docusaurus/docs/repositories-configure/managing-branches.mdx b/docusaurus/docs/repositories-configure/managing-branches.mdx index 7bbff146a7..93a12691eb 100644 --- a/docusaurus/docs/repositories-configure/managing-branches.mdx +++ b/docusaurus/docs/repositories-configure/managing-branches.mdx @@ -18,7 +18,7 @@ To change the default branch of your repository or start analyzing other branche 1. Open your repository **Settings**, tab **Branches**. - ![Managing branches](images/managing-branches.png) + ![Managing branches](./images/managing-branches.png) 1. To enable analysis for a new branch, toggle the corresponding switch in the column **Analyze**. @@ -37,14 +37,14 @@ Codacy automatically triggers analysis on the main branch of your repository (ty To change the main branch of your repository or enable analysis on other branches, open your repository **Settings**, tab **Branches**. Enabling a new branch triggers an initial analysis of that branch and the analysis results and information for that branch will become available after the analysis is complete. -This page also displays the [code quality grade](../faq/code-analysis/which-metrics-does-codacy-calculate.md) for each enabled branch. +This page also displays the [code quality grade](../faq/code-analysis/which-metrics-does-codacy-calculate) for each enabled branch. -![Managing branches](images/managing-branches-sh.png) +![Managing branches](./images/managing-branches-sh.png) :::note **If you're using Codacy Self-hosted** you can also configure Codacy to automatically enable all new branches that are pushed to the repository. -![Auto-enable new branches](images/managing-branches-auto-enable.png) +![Auto-enable new branches](./images/managing-branches-auto-enable.png) ::: Codacy manages pull request branches and inactive branches as follows: diff --git a/docusaurus/docs/repositories-configure/removing-your-repository.md b/docusaurus/docs/repositories-configure/removing-your-repository.mdx similarity index 88% rename from docusaurus/docs/repositories-configure/removing-your-repository.md rename to docusaurus/docs/repositories-configure/removing-your-repository.mdx index 80f511c398..19eaf8830e 100644 --- a/docusaurus/docs/repositories-configure/removing-your-repository.md +++ b/docusaurus/docs/repositories-configure/removing-your-repository.mdx @@ -8,7 +8,7 @@ To stop Codacy from analyzing your repository, you must remove the repository fr Removing a repository from Codacy completely removes the configurations and all data related to your repository from Codacy. This operation doesn't make any changes on your Git provider. :::caution -To remove a repository from Codacy you must have [administrator permissions](../organizations/roles-and-permissions-for-organizations.md) for that repository on your Git provider. +To remove a repository from Codacy you must have [administrator permissions](../organizations/roles-and-permissions-for-organizations) for that repository on your Git provider. ::: To delete your repository from Codacy: @@ -17,7 +17,7 @@ To delete your repository from Codacy: 1. Click the button **Remove repository** and confirm that you want to remove the repository. - ![Removing your repository](images/repository-remove.png) + ![Removing your repository](./images/repository-remove.png) :::note For added security, after you remove the repository from Codacy you can delete from your Git provider the Codacy resources related to that repository to prevent their reuse: diff --git a/docusaurus/docs/repositories-configure/using-submodules.md b/docusaurus/docs/repositories-configure/using-submodules.mdx similarity index 93% rename from docusaurus/docs/repositories-configure/using-submodules.md rename to docusaurus/docs/repositories-configure/using-submodules.mdx index 082bfb014a..36ab3f4e2e 100644 --- a/docusaurus/docs/repositories-configure/using-submodules.md +++ b/docusaurus/docs/repositories-configure/using-submodules.mdx @@ -15,7 +15,7 @@ By default, Codacy does normal Git clones that **don't include submodules** to e 1. Contact us at [support@codacy.com](mailto:support@codacy.com) asking to enable submodules on Codacy. -1. **If you're using Codacy Self-hosted**, [update your license](../chart/maintenance/license.md). +1. **If you're using Codacy Self-hosted**, [update your license](../chart/maintenance/license). 1. Make sure that your **Git URL** uses the correct protocol: - **GitHub:** HTTPS protocol @@ -33,7 +33,7 @@ When using submodules, you must do the following for all your existing and new r If your tool doesn't detect the configuration files in the submodule directories, you must include a configuration file directly in the root of your repositories referencing the configuration files in the submodule directories. -## Updating the public SSH key to access the repository {#update-key} +## Updating the public SSH key to access the repository \{#update-key\} :::note[This section applies only to GitLab and Bitbucket] ::: @@ -52,7 +52,7 @@ To update your GitLab or Bitbucket public SSH key that Codacy uses to access you 1. Click the link **Add new user key**. This takes you to the Git provider page where you can manage your user account SSH keys. 1. Add a new SSH key to your Git provider account. - ![Generate new user key](images/using-submodules-generate-new-user-key.png) + ![Generate new user key](./images/using-submodules-generate-new-user-key.png) ## Automating user keys for new repositories @@ -65,7 +65,7 @@ You can set Codacy to automatically add the new SSH key to your Git provider acc **If you're using Bitbucket Cloud** this setting must be turned off since automatically adding the user keys isn't supported. ::: -![Add project key to the user by default](images/using-submodules-default-add-user-key.png) +![Add project key to the user by default](./images/using-submodules-default-add-user-key.png) ## See also diff --git a/docusaurus/docs/repositories/commits.mdx b/docusaurus/docs/repositories/commits.mdx index 2ece82b864..76027936cf 100644 --- a/docusaurus/docs/repositories/commits.mdx +++ b/docusaurus/docs/repositories/commits.mdx @@ -4,59 +4,59 @@ page_name: "commit" file_name: "commits" --- -import IssueDetails from '../_includes/IssueDetails.mdx'; +import IssueDetails from './../_includes/IssueDetails.mdx'; The **Commits page** displays an overview of the commits in your repository, such as the analysis status and the code quality metrics for each commit. This allows you to monitor the evolution of the code quality per commit in your repository. -By default, the page lists the commits on the main branch of your repository, but if you have [more than one branch enabled](../repositories-configure/managing-branches.mdx) you can use the drop-down list at the top of the page to display commits on other branches. +By default, the page lists the commits on the main branch of your repository, but if you have [more than one branch enabled](../repositories-configure/managing-branches) you can use the drop-down list at the top of the page to display commits on other branches. -![Commits page](images/commits.png) +![Commits page](./images/commits.png) Click a specific commit to see detailed information about the code quality changes introduced by that commit. -![Commit detail](images/commits-detail.png) +![Commit detail](./images/commits-detail.png) The next sections describe each area of the commit detail page. -## Commit status {#status} -![Commit status](images/commits-detail-status.png) +## Commit status \{#status\} +![Commit status](./images/commits-detail-status.png) This area displays the information that identifies the commit (commit message, committer, SHA hash, and last updated date), as well as: - A link to the commit on your Git provider -- A [link to reanalyze the commit](../faq/repositories/how-do-i-reanalyze-my-repository.md), present when the committer [is part of your organization](../organizations/managing-people.md) +- A [link to reanalyze the commit](../faq/repositories/how-do-i-reanalyze-my-repository), present when the committer [is part of your organization](../organizations/managing-people) - A link to [view analysis logs](#viewing-analysis-logs) - -## Commit quality overview {#quality-overview} - -![Commit quality overview](images/commits-detail-quality-overview.png) - +{/**/} +## Commit quality overview \{#quality-overview\} +{/**/} +![Commit quality overview](./images/commits-detail-quality-overview.png) +{/**/} -This area displays the quality gate status for the commit and the code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates.md): +This area displays the quality gate status for the commit and the code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates): -- The quality gate status is either **Up to quality standards** or **Not up to quality standards** depending on the [quality gate rules](../repositories-configure/adjusting-quality-gates.md) for your repository. +- The quality gate status is either **Up to quality standards** or **Not up to quality standards** depending on the [quality gate rules](../repositories-configure/adjusting-quality-gates) for your repository. If there are no gate rules enabled for commits, the status is always **Up to quality standards**. -- The variation introduced by the commit is displayed either as a **positive or negative variation**, or **no variation** (represented by `=`) for code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates.md): +- The variation introduced by the commit is displayed either as a **positive or negative variation**, or **no variation** (represented by `=`) for code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates): - **Issues:** Number of new issues - **Duplication:** Changes in the number of duplicated code blocks - **Complexity:** Changes in code complexity - **Coverage variation:** Changes in code coverage percentage compared with the parent commit - Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter/index.md), some metrics **may not be calculated** (represented by `-`). + Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter), some metrics **may not be calculated** (represented by `-`). :::note Learn how Codacy calculates the code quality metrics in more detail: - - [Which code quality metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) - - [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md) + - [Which code quality metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) + - [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes) ::: -- The **colors** depend on the [quality gate rules](../repositories-configure/adjusting-quality-gates.md) for your repository: +- The **colors** depend on the [quality gate rules](../repositories-configure/adjusting-quality-gates) for your repository: - **Green:** The metric passes the quality gate - **Red:** The metric fails the quality gate @@ -65,32 +65,31 @@ This area displays the quality gate status for the commit and the code quality m :::note If you change the quality gate rules you must reanalyze the commit to update the metrics and optionally re-upload the Coverage report if you also changed the coverage gate rules. ::: - +{/**/} - -## Issues tab {#issues-tabs} +{/**/} +## Issues tab \{#issues-tabs\} The **Issues** tab displays the lists of issues that the commit creates or fixes. Use the sidebar filters to filter the list by new issues (including issues of specific severity or category), issues within a specific file, fixed issues, [potential new issues, or potential fixed issues](#possible-issues). -To [ignore or manage an issue](issues.md#ignoring-and-managing-issues), click the associated options in the menu. +To [ignore or manage an issue](./issues.mdx#ignoring-and-managing-issues), click the associated options in the menu. -![Issues tab](images/commits-tab-issues.png) +![Issues tab](./images/commits-tab-issues.png) -### Potential issues {#possible-issues} +### Potential issues \{#possible-issues\} Codacy may label some issues as **potential**, which means that the code analysis detected these issues in lines of code that weren't changed by the analyzed commit. This highlights potential consequences in other parts of your codebase. The following are example situations that can lead to potential issues: - The issue was either created or fixed in the current commit, but the static code analysis tools reported the issue on a line that didn't change in the commit. For example, if you remove the line containing the declaration of a variable you may get an "undeclared variable" issue in other lines that use that variable. -- If a file had [more than 50 issues reported by the same tool](../faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md) and you push a new commit that fixes some of these issues, Codacy will report more issues until the limit of 50 issues. These issues will be potential issues if they're outside the lines of code changed in the new commit. +- If a file had [more than 50 issues reported by the same tool](../faq/code-analysis/does-codacy-place-limits-on-the-code-analysis) and you push a new commit that fixes some of these issues, Codacy will report more issues until the limit of 50 issues. These issues will be potential issues if they're outside the lines of code changed in the new commit. :::note -**If you're using GitHub** you may see [annotations](../repositories-configure/integrations/github-integration.md#issue-annotations) for potential issues reported under **Unchanged files with check annotations** on the **Files changed** tab of your pull requests. +**If you're using GitHub** you may see [annotations](../repositories-configure/integrations/github-integration.mdx#issue-annotations) for potential issues reported under **Unchanged files with check annotations** on the **Files changed** tab of your pull requests. This happens when Codacy reports potential issues in files that weren't changed in your pull request. [Read more about this GitHub feature](https://developer.github.com/changes/2019-09-06-more-check-annotations-shown-in-files-changed-tab/). - ::: ### False positive issues @@ -101,20 +100,20 @@ The False Positive detection is a business tier feature. If you are a Codacy Pro If your commit includes issues detected as false positives, an **Ignore all false positives** option will appear above the first issue in the list. This allows you to bulk ignore all detected false positives at once. -For more details on managing false positives, see [Managing system-detected false positives](issues.md#managing-system-detected-false-positives). +For more details on managing false positives, see [Managing system-detected false positives](./issues.mdx#managing-system-detected-false-positives). -![Detected false positives](images/pull-requests-false-positives.png) +![Detected false positives](./images/pull-requests-false-positives.png) During a pull request analysis, if Codacy identifies issues that appear to be false positives, it will automatically add a comment listing all the detected false positives. -![Detected false positives comment](images/pull-requests-false-positives-comment.png) +![Detected false positives comment](./images/pull-requests-false-positives-comment.png) :::note Pull Request comments for False Positives are currently supported on GitHub only. ::: -## Duplication tab {#duplication-tabs} +## Duplication tab \{#duplication-tabs\} The **Duplication** tab displays the lists of clones (duplicated code blocks) that the commit adds or fixes. You can click a clone to expand it and inspect the code. ![Duplication tabs](./images/commits-tab-duplication.png) @@ -124,7 +123,7 @@ The **Duplication** tab displays the lists of clones (duplicated code blocks) th The **Complexity** tab displays the complexity changes introduced by the commit. Use the sidebar filters to filter the list by high increase (4 or more), low increase (1 to 3), or improvement (less than 0). :::note -For more information, see [how Codacy calculates cyclomatic complexity](../faq/code-analysis/which-metrics-does-codacy-calculate.md#complexity). +For more information, see [how Codacy calculates cyclomatic complexity](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#complexity). ::: ![Complexity tab](./images/commits-tab-complexity.png) @@ -142,25 +141,25 @@ The **Diff** tab displays the code changes and issues introduced by the commit. Lines with issues are highlighted according to issue severity and include a pill label with the issue type and count. Hover over the pill label to view more details or navigate to the issues. - -![Diff tab](images/commits-tab-diff.png) - +{/**/} +![Diff tab](./images/commits-tab-diff.png) +{/**/} ## Files tab -The **Files** tab displays the variation of the following [code quality metrics](../faq/code-analysis/which-metrics-does-codacy-calculate.md) that the commit introduces to the files in your repository, displayed either as a **positive or negative variation**, or **no variation** (represented by `=`): +The **Files** tab displays the variation of the following [code quality metrics](../faq/code-analysis/which-metrics-does-codacy-calculate) that the commit introduces to the files in your repository, displayed either as a **positive or negative variation**, or **no variation** (represented by `=`): - **New issues:** Number of new issues - **Duplication:** Changes in the number of duplicated code blocks - **Complexity:** Changes in code complexity - **Coverage variation:** Changes in code coverage percentage compared with the parent commit -Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter/index.md), some metrics **may not be calculated** (represented by `-`). +Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter), some metrics **may not be calculated** (represented by `-`). - -![Files tab](images/commits-tab-files.png) - - +{/**/} +![Files tab](./images/commits-tab-files.png) +{/**/} +{/**/} ## Viewing analysis logs @@ -168,8 +167,8 @@ Analysis logs can help you identify the duration of each analysis phase and any To access the analysis logs, click the **View logs** link in the [commit status](#status) area. This opens a modal displaying execution times and outcomes for the tools used to analyze the commit. -![View logs modal](images/commits-view-logs-modal.png) +![View logs modal](./images/commits-view-logs-modal.png) ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) diff --git a/docusaurus/docs/repositories/coverage.md b/docusaurus/docs/repositories/coverage.mdx similarity index 78% rename from docusaurus/docs/repositories/coverage.md rename to docusaurus/docs/repositories/coverage.mdx index 7bc6e543cc..ac8a76268d 100644 --- a/docusaurus/docs/repositories/coverage.md +++ b/docusaurus/docs/repositories/coverage.mdx @@ -2,16 +2,15 @@ title: Coverage page --- +The **Coverage page** displays the current code coverage information in your [enabled repository branches](../repositories-configure/managing-branches). -The **Coverage page** displays the current code coverage information in your [enabled repository branches](../repositories-configure/managing-branches.mdx). +If your repository doesn't have coverage set up, you can learn more on how to [add coverage to your repository](../coverage-reporter/index.mdx). -If your repository doesn't have coverage set up, you can learn more on how to [add coverage to your repository](../coverage-reporter/index.md). - -By default, the page displays the coverage information on the main branch of your repository. However, if you have [more than one branch enabled](../repositories-configure/managing-branches.mdx), you can select other branches using the drop-down list at the top of the page. +By default, the page displays the coverage information on the main branch of your repository. However, if you have [more than one branch enabled](../repositories-configure/managing-branches), you can select other branches using the drop-down list at the top of the page. ## Code coverage metrics -Codacy displays the following [code coverage metrics](../faq/code-analysis/which-metrics-does-codacy-calculate.md#code-coverage), if available: +Codacy displays the following [code coverage metrics](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#code-coverage), if available: - **Coverage percentage:** Percentage of code covered - **Covered / Coverable lines:** Number of covered and coverable lines @@ -21,32 +20,32 @@ Codacy displays the following [code coverage metrics](../faq/code-analysis/which If the repository doesn't have a coverage goal set, the code coverage metrics won't show values for Files above and below coverage goals. :::note -You can set a Coverage goal for the repository [inside repository settings, on the Goals tab](../repositories-configure/adjusting-quality-goals.md). +You can set a Coverage goal for the repository [inside repository settings, on the Goals tab](../repositories-configure/adjusting-quality-goals). ::: -![Code coverage metrics](images/coverage-metrics.png) +![Code coverage metrics](./images/coverage-metrics.png) ## Open pull requests The **Open pull requests** area displays the last updated pull requests and the split between the status of all open pull requests in your repository: - **Up to standards:** Pull requests that meet the minimum quality levels -- **Not up to standards:** Pull requests that failed to meet at least one of the [quality gate rules defined for the repository](../repositories-configure/adjusting-quality-gates.md) +- **Not up to standards:** Pull requests that failed to meet at least one of the [quality gate rules defined for the repository](../repositories-configure/adjusting-quality-gates) - **Analyzing:** Pull requests currently being analyzed by Codacy Click a bar segment to display only pull requests with the corresponding status. -To see the details of pull requests, click a pull request from the list or click **See all pull requests** to open the [list of pull requests](pull-requests.mdx) in the repository. +To see the details of pull requests, click a pull request from the list or click **See all pull requests** to open the [list of pull requests](./pull-requests) in the repository. -![Open pull requests](images/open-pull-requests-widget.png) +![Open pull requests](./images/open-pull-requests-widget.png) ## Files with low coverage, issues and/or high complexity For a better understanding of how repository files are performing in terms of issues, high complexity and coverage simultaneously, Codacy displays two files tables where it's possible to check which files contain a low coverage percentage, along with a high number of issues and/or a high complexity rate. -![Low covered files with issues and high complexity](images/low-covered-files-tables.png) +![Low covered files with issues and high complexity](./images/low-covered-files-tables.png) ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) +- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files) diff --git a/docusaurus/docs/repositories/files.md b/docusaurus/docs/repositories/files.mdx similarity index 69% rename from docusaurus/docs/repositories/files.md rename to docusaurus/docs/repositories/files.mdx index 1bf2a2ef6e..f600359967 100644 --- a/docusaurus/docs/repositories/files.md +++ b/docusaurus/docs/repositories/files.mdx @@ -3,11 +3,11 @@ title: Files page --- -The **Files page** displays the current code quality information for each analyzed file in your [enabled repository branches](../repositories-configure/managing-branches.mdx). +The **Files page** displays the current code quality information for each analyzed file in your [enabled repository branches](../repositories-configure/managing-branches). -By default, the page lists the files on the main branch of your repository. However, if you have [more than one branch enabled](../repositories-configure/managing-branches.mdx), you can select other branches using the drop-down list at the top of the page. +By default, the page lists the files on the main branch of your repository. However, if you have [more than one branch enabled](../repositories-configure/managing-branches), you can select other branches using the drop-down list at the top of the page. -Codacy displays the following [code quality metrics](../faq/code-analysis/which-metrics-does-codacy-calculate.md) for each file, if available: +Codacy displays the following [code quality metrics](../faq/code-analysis/which-metrics-does-codacy-calculate) for each file, if available: - **Grade:** Overall grade of the file - **Issues:** Number of issues in the file @@ -18,14 +18,14 @@ Codacy displays the following [code quality metrics](../faq/code-analysis/which- Codacy displays the files in alphabetical order by default, but you can sort the list by each column to help you identify which files you should improve or refactor next. :::note -You can [use the Codacy API to generate reports or obtain code quality metrics](../codacy-api/examples/obtaining-code-quality-metrics-for-files.md) for the files in your repositories in a more flexible way. +You can [use the Codacy API to generate reports or obtain code quality metrics](../codacy-api/examples/obtaining-code-quality-metrics-for-files) for the files in your repositories in a more flexible way. ::: -![Files list](images/files.png) +![Files list](./images/files.png) Use the search box to filter the list and find specific files: -![Finding specific files](images/files-search.png) +![Finding specific files](./images/files-search.png) ## File details @@ -33,26 +33,26 @@ Click a specific file to see more detailed analysis information for that file. The header of the file detail page displays the same code quality metrics as the Files page, as well as: -- An **Ignore file** link to [ignore the selected file](../repositories-configure/ignoring-files.md) on future Codacy analysis +- An **Ignore file** link to [ignore the selected file](../repositories-configure/ignoring-files) on future Codacy analysis - A link to view the file on your Git provider -![File detail](images/files-details.png) +![File detail](./images/files-details.png) Depending on the available analysis information for the file, Codacy displays one or more of the following tabs: -- **Issues:** Shows the annotated source code on the left-hand side and the matching list of issues and issue distribution by severity on the right-hand side. Each listed issue includes the same information and options available on the [Issues page](issues.md). +- **Issues:** Shows the annotated source code on the left-hand side and the matching list of issues and issue distribution by severity on the right-hand side. Each listed issue includes the same information and options available on the [Issues page](./issues). - ![Issues for a file](images/files-issues.png) + ![Issues for a file](./images/files-issues.png) - **Duplication:** Shows the annotated source code on the left-hand side and the matching list of duplicated code blocks and counts on the right-hand side. Each listed duplicate includes the number of clones and their locations. - ![Duplicated blocks for a file](images/files-duplication.png) + ![Duplicated blocks for a file](./images/files-duplication.png) -- **Coverage:** Shows which lines of code are covered by tests (green background labeled with test hit count) or not covered (red background), along with the counts of coverable and covered lines and the file status with respect to the [coverage goal](../repositories-configure/adjusting-quality-goals.md). +- **Coverage:** Shows which lines of code are covered by tests (green background labeled with test hit count) or not covered (red background), along with the counts of coverable and covered lines and the file status with respect to the [coverage goal](../repositories-configure/adjusting-quality-goals.mdx). - ![Coverage information for a file](images/files-coverage.png) + ![Coverage information for a file](./images/files-coverage.png) -## Why are some files missing? {#missing-files} +## Why are some files missing? \{#missing-files\} The Files page only displays files in your repository that were analyzed by Codacy. This means that some of your files may be missing from the list, for example: - **You're viewing the incorrect branch** @@ -61,17 +61,17 @@ The Files page only displays files in your repository that were analyzed by Coda - **The file might be ignored** - The Files page doesn't display [ignored files](../repositories-configure/ignoring-files.md) that aren't meant to be analyzed, including the [files that Codacy ignores by default](../repositories-configure/ignoring-files.md#default-ignored-files). + The Files page doesn't display [ignored files](../repositories-configure/ignoring-files) that aren't meant to be analyzed, including the [files that Codacy ignores by default](../repositories-configure/ignoring-files.mdx#default-ignored-files). - **The file has an extension that is not on the list of supported extensions** - Codacy supports a [list of file extensions](../repositories-configure/languages.md#configuring-file-extensions) associated with each language. Codacy doesn't analyze or display files with extensions that aren't associated with a language. + Codacy supports a [list of file extensions](../repositories-configure/languages.mdx#configuring-file-extensions) associated with each language. Codacy doesn't analyze or display files with extensions that aren't associated with a language. - **The file might be too big** - Codacy doesn't analyze or display files that are over a certain size. [Read more details](../faq/troubleshooting/why-is-my-file-over-150-kb-missing.md) for information on how to overcome this limit. + Codacy doesn't analyze or display files that are over a certain size. [Read more details](../faq/troubleshooting/why-is-my-file-over-150-kb-missing) for information on how to overcome this limit. ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) +- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files) diff --git a/docusaurus/docs/repositories/issues.mdx b/docusaurus/docs/repositories/issues.mdx index bccd9354f6..8fcedc387a 100644 --- a/docusaurus/docs/repositories/issues.mdx +++ b/docusaurus/docs/repositories/issues.mdx @@ -7,25 +7,25 @@ import IssueDetails from './../_includes/IssueDetails.mdx' The **Issues page** lists all the issues that Codacy detected in your repository, including the severity level and category of each issue. -By default, the page lists the issues on the main branch of your repository but if you have [more than one branch enabled](../repositories-configure/managing-branches.mdx) you can use the drop-down list at the top of the page to display issues on other branches. +By default, the page lists the issues on the main branch of your repository but if you have [more than one branch enabled](../repositories-configure/managing-branches) you can use the drop-down list at the top of the page to display issues on other branches. :::note -[You can use the Codacy API](../codacy-api/examples/obtaining-current-issues-in-repositories.md) to generate reports or obtain information about the current issues in your repositories in a more flexible way. +[You can use the Codacy API](../codacy-api/examples/obtaining-current-issues-in-repositories) to generate reports or obtain information about the current issues in your repositories in a more flexible way. ::: -![Issues page](images/issues.png) +![Issues page](./images/issues.png) -![Issue details](images/issues-detail.png) +![Issue details](./images/issues-detail.png) ## Filtering issues Filter the list of issues to find specific issues, such as the issues with the highest severity or security issues. -The list of code patterns with issues is always visible on the left side of the page. Click a [code pattern](../repositories-configure/configuring-code-patterns.md) to filter the list of issues by that pattern. +The list of code patterns with issues is always visible on the left side of the page. Click a [code pattern](../repositories-configure/configuring-code-patterns.mdx) to filter the list of issues by that pattern. -![Filtering issues](images/issues-filter.png) +![Filtering issues](./images/issues-filter.png) You can moreover define one or more of the following filters: @@ -44,7 +44,7 @@ You can moreover define one or more of the following filters: - **Performance:** Code that can have performance problems - **Compatibility:** Mainly for frontend code, compatibility problems across different browser versions - **Unused code:** Unused variables and methods, code that can't be reached - - **Security:** Potential security vulnerabilities, including hard-coded passwords and keys (secret scanning), vulnerable dependencies (software composition analysis or SCA), and insecure code patterns (static application security testing or SAST). For more information, see the complete [list of security issue categories](../organizations/managing-security-and-risk.md#supported-security-categories) + - **Security:** Potential security vulnerabilities, including hard-coded passwords and keys (secret scanning), vulnerable dependencies (software composition analysis or SCA), and insecure code patterns (static application security testing or SAST). For more information, see the complete [list of security issue categories](../organizations/managing-security-and-risk.mdx#supported-security-categories) - **Documentation:** Methods and classes that don't have the correct comment annotations - **Best practice:** Code that doesn't follow the recommended coding standards and best practices - **Comprehensibility:** Code that can be difficult to understand and modify @@ -74,23 +74,23 @@ Use the options in the menu of each issue to: See [how to restore ignored issues](#restoring-ignored-issues). :::tip - Organization admins can [configure who is allowed to ignore issues](../organizations/roles-and-permissions-for-organizations.md#change-analysis-configuration). + Organization admins can [configure who is allowed to ignore issues](../organizations/roles-and-permissions-for-organizations.mdx#change-analysis-configuration). ::: - **Disable the code pattern** that detected the issue. - Codacy will stop using that pattern after the next analysis of your repository, so be sure that you're no longer interested in identifying similar issues. To re-enable patterns use the [Code patterns page](../repositories-configure/configuring-code-patterns.md). + Codacy will stop using that pattern after the next analysis of your repository, so be sure that you're no longer interested in identifying similar issues. To re-enable patterns use the [Code patterns page](../repositories-configure/configuring-code-patterns). :::note - - If you're using a [custom configuration file](../repositories-configure/configuring-code-patterns.md#using-your-own-tool-configuration-files), you must manage patterns manually on your configuration file. - - If your repository is following an [organization coding standard](../organizations/using-coding-standards.md), disabling the code pattern causes the repository to stop following the coding standard. In this case, Codacy asks for your confirmation before accepting the changes and then copies the coding standard configurations to your repository, so you can customize them. + - If you're using a [custom configuration file](../repositories-configure/configuring-code-patterns.mdx#using-your-own-tool-configuration-files), you must manage patterns manually on your configuration file. + - If your repository is following an [organization coding standard](../organizations/using-coding-standards), disabling the code pattern causes the repository to stop following the coding standard. In this case, Codacy asks for your confirmation before accepting the changes and then copies the coding standard configurations to your repository, so you can customize them. ::: - **View the file** where the issue was detected. - **Ignore the file** where the issue was detected. - Codacy will no longer analyze that file on your repository, so be sure that you're no longer interested in identifying any type of issues on that file. To remove an ignored file use the [Ignored Files tab](../repositories-configure/ignoring-files.md) in your repository settings. + Codacy will no longer analyze that file on your repository, so be sure that you're no longer interested in identifying any type of issues on that file. To remove an ignored file use the [Ignored Files tab](../repositories-configure/ignoring-files) in your repository settings.
@@ -154,5 +154,5 @@ In this case, Codacy generates a patch that enables you to solve all resolvable ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Using the Codacy API to obtain current issues in repositories](../codacy-api/examples/obtaining-current-issues-in-repositories.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate) +- [Using the Codacy API to obtain current issues in repositories](../codacy-api/examples/obtaining-current-issues-in-repositories) diff --git a/docusaurus/docs/repositories/pull-requests.mdx b/docusaurus/docs/repositories/pull-requests.mdx index 57e8870b07..7a26698ea0 100644 --- a/docusaurus/docs/repositories/pull-requests.mdx +++ b/docusaurus/docs/repositories/pull-requests.mdx @@ -11,35 +11,35 @@ The **Pull Requests page** displays an overview of the pull requests in your rep By default, the page lists open pull requests, but you can click the **Closed** tab at the top of the list to display the closed pull requests. -![Pull Requests page](images/pull-requests.png) +![Pull Requests page](./images/pull-requests.png) Click a specific pull request to see detailed information about the code quality changes introduced by that pull request. -![Pull request detail](images/pull-requests-detail.png) +![Pull request detail](./images/pull-requests-detail.png) The next sections describe each area of the pull request detail page. -## Pull request status {#status} +## Pull request status \{#status\} This area displays the information that identifies the pull request (name, author, head and base branches, and last updated date), as well as: - A link to the pull request on your Git provider -- A [link to reanalyze the latest pull request commit](../faq/repositories/how-do-i-reanalyze-my-repository.md), present when the committer [is part of your organization](../organizations/managing-people.md) +- A [link to reanalyze the latest pull request commit](../faq/repositories/how-do-i-reanalyze-my-repository.mdx), present when the committer [is part of your organization](../organizations/managing-people.mdx) - A link to [view analysis logs](#viewing-analysis-logs) ![Pull request status](images/pull-requests-detail-status.png) -## Pull request quality overview {#quality-overview} - +## Pull request quality overview \{#quality-overview\} +{/**/} ![Pull request quality overview](images/pull-requests-detail-quality-overview.png) - +{/**/} -This area displays the quality gate status for the pull request and the code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates.md): +This area displays the quality gate status for the pull request and the code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates.mdx): -- The quality gate status is either **Up to quality standards** or **Not up to quality standards** depending on the [quality gate rules](../repositories-configure/adjusting-quality-gates.md) for your repository. +- The quality gate status is either **Up to quality standards** or **Not up to quality standards** depending on the [quality gate rules](../repositories-configure/adjusting-quality-gates.mdx) for your repository. If there are no gate rules enabled for pull requests, the status is always **Up to quality standards**. -- The variation introduced by the pull request is displayed either as a **positive or negative variation**, **no variation** (represented by `=`), **not applicable** (represented by `∅`), for code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates.md): +- The variation introduced by the pull request is displayed either as a **positive or negative variation**, **no variation** (represented by `=`), **not applicable** (represented by `∅`), for code quality metrics [with a gate set up](../repositories-configure/adjusting-quality-gates.mdx): - **Issues:** Number of new issues - **Duplication:** Changes in the number of duplicated code blocks @@ -47,16 +47,16 @@ This area displays the quality gate status for the pull request and the code qua - **Diff coverage:** Code coverage of the coverable lines affected by the pull request, or `∅` (not applicable) if there are no coverable lines - **Coverage variation:** Changes in code coverage percentage compared with the target branch - Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter/index.md), some metrics **may not be calculated** (represented by `-`). + Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter/index.mdx), some metrics **may not be calculated** (represented by `-`). :::note Learn how Codacy calculates the code quality metrics in more detail: - - [Which code quality metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) - - [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.md) + - [Which code quality metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx) + - [Why does Codacy show unexpected coverage changes?](../faq/code-analysis/why-does-codacy-show-unexpected-coverage-changes.mdx) ::: -- The **colors** depend on the [quality gate rules](../repositories-configure/adjusting-quality-gates.md) for your repository: +- The **colors** depend on the [quality gate rules](../repositories-configure/adjusting-quality-gates.mdx) for your repository: - **Green:** The metric passes the quality gate - **Red:** The metric fails the quality gate @@ -66,23 +66,23 @@ This area displays the quality gate status for the pull request and the code qua If you change the quality gate rules you must reanalyze the pull request to update the metrics and optionally re-upload the Coverage report if you also changed the coverage gate rules. ::: -## Issues tab {#issues-tabs} +## Issues tab \{#issues-tabs\} The **Issues** tab displays the lists of issues that the pull request creates or fixes. Use the sidebar filters to filter the list by new issues (including issues of specific severity or category), issues within a specific file, fixed issues, [potential new issues, or potential fixed issues](#possible-issues). -To [ignore or manage an issue](issues.md#ignoring-and-managing-issues), click the associated options in the menu. +To [ignore or manage an issue](issues.mdx#ignoring-and-managing-issues), click the associated options in the menu. -![Issues tab](images/pull-requests-tab-issues.png) +![Issues tab](./images/pull-requests-tab-issues.png) -### Potential issues {#possible-issues} +### Potential issues \{#possible-issues\} Codacy may label some issues as **potential**, which means that the code analysis detected these issues in lines of code that weren't changed by the analyzed pull request. This highlights potential consequences in other parts of your codebase. The following are example situations that can lead to potential issues: - The issue was either created or fixed in the current pull request, but the static code analysis tools reported the issue on a line that didn't change in the pull request. For example, if you remove the line containing the declaration of a variable you may get an "undeclared variable" issue in other lines that use that variable. -- If a file had [more than 50 issues reported by the same tool](../faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.md) and you push a new commit that fixes some of these issues, Codacy will report more issues until the limit of 50 issues. These issues will be potential issues if they're outside the lines of code changed in the new commit. +- If a file had [more than 50 issues reported by the same tool](../faq/code-analysis/does-codacy-place-limits-on-the-code-analysis.mdx) and you push a new commit that fixes some of these issues, Codacy will report more issues until the limit of 50 issues. These issues will be potential issues if they're outside the lines of code changed in the new commit. :::note **If you're using GitHub** you may see [annotations](../repositories-configure/integrations/github-integration.mdx#issue-annotations) for potential issues reported under **Unchanged files with check annotations** on the **Files changed** tab of your pull requests. @@ -91,7 +91,7 @@ This happens when Codacy reports potential issues in files that weren't changed ::: -## Duplication tab {#duplication-tabs} +## Duplication tab \{#duplication-tabs\} The **Duplication** tab displays the lists of clones (duplicated code blocks) that the pull request adds or fixes. You can click a clone to expand it and inspect the code. ![Duplication tabs](./images/pull-requests-tab-duplication.png) @@ -101,7 +101,7 @@ The **Duplication** tab displays the lists of clones (duplicated code blocks) th The **Complexity** tab displays the complexity changes introduced by the pull request. Use the sidebar filters to filter the list by high increase (4 or more), low increase (1 to 3), or improvement (less than 0). :::note -For more information, see [how Codacy calculates cyclomatic complexity](../faq/code-analysis/which-metrics-does-codacy-calculate.md#complexity). +For more information, see [how Codacy calculates cyclomatic complexity](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#complexity). ::: ![Complexity tab](./images/pull-requests-tab-complexity.png) @@ -119,24 +119,24 @@ The **Diff** tab displays the code changes and issues introduced by the pull req Lines with issues are highlighted according to issue severity and include a pill label with the issue type and count. Hover over the pill label to view more details or navigate to the issues. - +{/**/} ![Diff tab](images/pull-requests-tab-diff.png) - +{/**/} ## Files tab -The **Files** tab displays the variation of the following [code quality metrics](../faq/code-analysis/which-metrics-does-codacy-calculate.md) that the pull request introduces to the files in your repository, displayed either as a **positive or negative variation**, or **no variation** (represented by `=`): +The **Files** tab displays the variation of the following [code quality metrics](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx) that the pull request introduces to the files in your repository, displayed either as a **positive or negative variation**, or **no variation** (represented by `=`): - **New issues:** Number of new issues - **Duplication:** Changes in the number of duplicated code blocks - **Complexity:** Changes in code complexity - **Coverage variation:** Changes in code coverage percentage compared with the target branch -Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter/index.md), some metrics **may not be calculated** (represented by `-`). +Depending on the languages being analyzed or if you haven't [set up coverage for your repository](../coverage-reporter/index.mdx), some metrics **may not be calculated** (represented by `-`). - +{/**/} ![Files tab](images/pull-requests-tab-files.png) - +{/**/} ## Commits tab @@ -184,4 +184,4 @@ In this case, Codacy generates a patch that enables you to solve all resolvable ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx) diff --git a/docusaurus/docs/repositories/repository-dashboard.mdx b/docusaurus/docs/repositories/repository-dashboard.mdx index a755e503af..696fe1b1d0 100644 --- a/docusaurus/docs/repositories/repository-dashboard.mdx +++ b/docusaurus/docs/repositories/repository-dashboard.mdx @@ -6,7 +6,7 @@ import DashboardApiReportNote from './../_includes/DashboardApiReportNote.mdx' The **Repository Dashboard** provides an overview of the repository code quality and items that require your attention. -To access your Repository Dashboard, select a repository from the [Repositories list](../organizations/managing-repositories.md) and select **Dashboard** on the left navigation sidebar. +To access your Repository Dashboard, select a repository from the [Repositories list](../organizations/managing-repositories.mdx) and select **Dashboard** on the left navigation sidebar. :::tip You can share the URL of the Repository Dashboard for your **public repositories** to allow other people to see your repository code quality metrics, even if they aren't registered on Codacy. @@ -16,7 +16,7 @@ You can share the URL of the Repository Dashboard for your **public repositories The top of the Repository Dashboard displays: -- The name and [code quality grade](../faq/code-analysis/which-metrics-does-codacy-calculate.md#grade) of the repository +- The name and [code quality grade](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#grade) of the repository - A drop-down list that selects which branch of your repository to display on the dashboard On the Repository Dashboard you have the following areas to help you monitor your repository: @@ -32,7 +32,7 @@ The following sections provide a detailed overview of each dashboard area. ## Evolution chart -The **Evolution** chart displays the evolution of the repository code quality regarding [issues](../faq/code-analysis/which-metrics-does-codacy-calculate.md#issues), [complex files](../faq/code-analysis/which-metrics-does-codacy-calculate.md#complexity), [duplication](../faq/code-analysis/which-metrics-does-codacy-calculate.md#duplication), and [code coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.md#code-coverage). Click on **Last 3 months**, **Last 31 days**, or **Last 7 days** to select the time interval of the historical data to display on the chart. +The **Evolution** chart displays the evolution of the repository code quality regarding [issues](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#issues), [complex files](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#complexity), [duplication](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#duplication), and [code coverage](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx#code-coverage). Click on **Last 3 months**, **Last 31 days**, or **Last 7 days** to select the time interval of the historical data to display on the chart. Each tab displays the following information for the corresponding metric: @@ -44,7 +44,7 @@ Each tab displays the following information for the corresponding metric: The coverage tab only displays a value if Codacy received coverage data for the most recent commit. This is because one commit can easily change the size or number of files on the repository, or even remove some files that had coverage information. ::: -The chart also displays the **trendline** based on the past behavior and the [quality goals](../repositories-configure/adjusting-quality-goals.md) defined for the repository. +The chart also displays the **trendline** based on the past behavior and the [quality goals](../repositories-configure/adjusting-quality-goals.mdx) defined for the repository. ![Evolution chart](images/repository-dashboard-quality-evolution.png) @@ -52,24 +52,24 @@ The chart also displays the **trendline** based on the past behavior and the [qu The **Issues breakdown** area displays the total number of issues found on the selected branch, as well as the distribution of issues across each code quality issue category. -Click **See all issues** to see the full [list of issues](issues.md) found, or click a category to see the issues in that category. +Click **See all issues** to see the full [list of issues](./issues.mdx) found, or click a category to see the issues in that category. -If Codacy detects code patterns that have suggested fixes, a **Fix issues** button appears below the total issue count. Click this button to open a modal with a patch that addresses all resolvable issues, and follow the [same procedure outlined on the Issues page](./issues.md#fixing-issues-automatically). +If Codacy detects code patterns that have suggested fixes, a **Fix issues** button appears below the total issue count. Click this button to open a modal with a patch that addresses all resolvable issues, and follow the [same procedure outlined on the Issues page](./issues.mdx#fixing-issues-automatically). ![Issues breakdown](images/repository-dashboard-issues-breakdown.png) ## Coverage -The **Coverage** area displays the percentage of lines of code on the selected branch that are covered by tests versus the [coverage goal](../repositories-configure/adjusting-quality-goals.md) defined in the quality settings of the repository, as well as the number of files: +The **Coverage** area displays the percentage of lines of code on the selected branch that are covered by tests versus the [coverage goal](../repositories-configure/adjusting-quality-goals.mdx) defined in the quality settings of the repository, as well as the number of files: - Without coverage - With coverage not up to standards (based on the coverage goal) - With coverage up to standards (based on the coverage goal) -Click **See all files** to open the [list of files](files.md) in the repository. +Click **See all files** to open the [list of files](./files.mdx) in the repository. :::tip -If you don't have coverage set up for your repository yet, the Coverage area provides you with instructions on [how to add coverage for your repository](../coverage-reporter/index.md). +If you don't have coverage set up for your repository yet, the Coverage area provides you with instructions on [how to add coverage for your repository](../coverage-reporter/index.mdx). ::: ![Coverage](images/repository-dashboard-coverage.png) @@ -79,17 +79,17 @@ If you don't have coverage set up for your repository yet, the Coverage area pro The **Open pull requests** area displays the last updated pull requests and the split between the status of all open pull requests in your repository: - **Up to standards:** Pull requests that meet the minimum quality levels -- **Not up to standards:** Pull requests that failed to meet at least one of the [quality gate rules defined for the repository](../repositories-configure/adjusting-quality-gates.md) +- **Not up to standards:** Pull requests that failed to meet at least one of the [quality gate rules defined for the repository](../repositories-configure/adjusting-quality-gates.mdx) - **Analyzing:** Pull requests currently being analyzed by Codacy Click a bar segment to display only pull requests with the corresponding status. -To see the details of pull requests, click a pull request from the list or click **See all pull requests** to open the [list of pull requests](pull-requests.mdx) in the repository. +To see the details of pull requests, click a pull request from the list or click **See all pull requests** to open the [list of pull requests](./pull-requests.mdx) in the repository. ![Open pull requests](images/repository-dashboard-open-pull-requests.png) ## See also -- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.md) -- [Using the Codacy API to obtain current issues in repositories](../codacy-api/examples/obtaining-current-issues-in-repositories.md) -- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files.md) +- [Which metrics does Codacy calculate?](../faq/code-analysis/which-metrics-does-codacy-calculate.mdx) +- [Using the Codacy API to obtain current issues in repositories](../codacy-api/examples/obtaining-current-issues-in-repositories.mdx) +- [Using the Codacy API to obtain code quality metrics for files](../codacy-api/examples/obtaining-code-quality-metrics-for-files.mdx) diff --git a/docusaurus/docs/special-thanks.md b/docusaurus/docs/special-thanks.mdx similarity index 100% rename from docusaurus/docs/special-thanks.md rename to docusaurus/docs/special-thanks.mdx diff --git a/docusaurus/docusaurus.config.ts b/docusaurus/docusaurus.config.ts index 09b53b727d..3bafd55f08 100644 --- a/docusaurus/docusaurus.config.ts +++ b/docusaurus/docusaurus.config.ts @@ -9,6 +9,7 @@ const config: Config = { title: 'Codacy Docs', tagline: 'Documentation for the Codacy automated code review tool.', favicon: 'img/codacy-favicon.ico', + // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future future: { @@ -29,6 +30,8 @@ const config: Config = { projectName: 'docs-docusaurus', // Usually your repo name. onBrokenLinks: 'warn', + onBrokenAnchors: 'warn', + onDuplicateRoutes: 'warn', markdown: { hooks: { onBrokenMarkdownLinks: 'warn', @@ -59,7 +62,7 @@ const config: Config = { 'classic', { docs: { - routeBasePath: '/docs', + routeBasePath: '/', sidebarPath: './sidebars.ts', breadcrumbs: false, }, @@ -131,8 +134,8 @@ const config: Config = { { title: 'Docs', items: [ - {label: 'Documentation', to: '/docs/'}, - {label: 'Release notes', to: '/docs/release-notes/'}, + {label: 'Documentation', to: '/'}, + {label: 'Release notes', to: '/release-notes/'}, ], }, { diff --git a/docusaurus/sidebars.ts b/docusaurus/sidebars.ts index 41a550ecd0..935dc519e2 100644 --- a/docusaurus/sidebars.ts +++ b/docusaurus/sidebars.ts @@ -3,8 +3,8 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; import {gettingStartedOrder} from './docs/getting-started/_order'; import {accountOrder} from './docs/account/_order'; import {codacyApiOrder} from './docs/codacy-api/_order'; +import {chartOrder} from './docs/chart/_order'; import {codacyGuardrailsOrder} from './docs/codacy-guardrails/_order'; -import {coverageReporterOrder} from './docs/coverage-reporter/_order'; import {faqOrder} from './docs/faq/_order'; import {organizationsOrder} from './docs/organizations/_order'; import {repositoriesOrder} from './docs/repositories/_order'; @@ -72,12 +72,12 @@ const sidebars: SidebarsConfig = { }, { type: 'category', - label: 'Coverage reporter', - items: coverageReporterOrder, + label: 'Managing Self-Hosted', + items: chartOrder, }, { type: 'category', - label: 'FAQ', + label: 'Troubleshooting & FAQs', items: faqOrder, }, 'special-thanks', diff --git a/docusaurus/src/css/custom.css b/docusaurus/src/css/custom.css index 8c736f92ea..00e467c30c 100644 --- a/docusaurus/src/css/custom.css +++ b/docusaurus/src/css/custom.css @@ -25,4 +25,24 @@ background-repeat: no-repeat; } +.languages-table table { + width: 100%; + table-layout: fixed; + display: table; +} + +.languages-table table th, +.languages-table table td { + overflow-wrap: anywhere; +} + +.languages-table table td { + font-size: 0.85rem +} + +.languages-table table th { + text-align: left; +} + + diff --git a/docusaurus/src/pages/index.tsx b/docusaurus/src/pages/index.tsx index 685d069647..d72330ae1d 100644 --- a/docusaurus/src/pages/index.tsx +++ b/docusaurus/src/pages/index.tsx @@ -16,10 +16,13 @@ export default function Home(): React.JSX.Element { Practical guides, API references, and release notes for Codacy.

- + Explore docs - + Release notes
@@ -30,17 +33,19 @@ export default function Home(): React.JSX.Element {

Get started

Install, configure, and ship with confidence.

- Start here + Start here

API guides

Automate workflows with Codacy APIs.

- Browse API docs + Browse API docs

Integrations

Connect Codacy with your CI and SCM tools.

- See integrations + + See integrations +
diff --git a/docusaurus/static/feed_rss_created.xml b/docusaurus/static/feed_rss_created.xml new file mode 100644 index 0000000000..8266c253e6 --- /dev/null +++ b/docusaurus/static/feed_rss_created.xml @@ -0,0 +1,8 @@ + + + + Codacy Release Notes + https://www.codacy.com/ + Release notes feed placeholder. + +