Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 116 additions & 2 deletions docs/codacy-guardrails/codacy-guardrails-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<iframe width="560" height="315" src="https://www.youtube.com/embed/uVyRWnnJu-0?si=Pnbk65EvpvvJRXX4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>


# VSCode

## Prerequisites

- git
Expand All @@ -23,6 +25,7 @@

!!! important
**For Windows users: Windows WSL** (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows.
We currently only support VSCode, Cursor, and Windsurf on Windows.


### Supported IDEs
Expand All @@ -33,6 +36,7 @@

!!! note
For Visual Studio Code, the Insiders version is recommended for its faster performance and compatibility with Codacy Guardrails. However, since it's a beta version, you may encounter occasional issues.
For Jetbrains IDEs, IntelliJ is not the only supported editor, but it's the one being extensively tested. If you use other editors such as PyCharm and run into any issues feel free to open an issue in our extension's [repository](https://github.com/codacy/codacy-intellij-extension)

Check failure on line 39 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'isn't' instead of 'is not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'isn't' instead of 'is not'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 39, "column": 34}}}, "severity": "ERROR"}

Check failure on line 39 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Jetbrains'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Jetbrains'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 39, "column": 9}}}, "severity": "ERROR"}

Check failure on line 39 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'isn't' instead of 'is not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'isn't' instead of 'is not'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 39, "column": 34}}}, "severity": "ERROR"}

Check failure on line 39 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Jetbrains'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Jetbrains'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 39, "column": 9}}}, "severity": "ERROR"}

### Built-in Scanners

Expand All @@ -52,9 +56,10 @@

### 1. Download the extension

- [Visual Studio Code](https://tinyurl.com/codacy-vscode)
- [Visual Studio Code](https://tinyurl.com/codacy-vscode-extension)
- [Cursor](http://tinyurl.com/codacy-cursor)
- [Windsurf](http://tinyurl.com/codacy-windsurf)
- [IntelliJ IDEA](https://tinyurl.com/codacy-jetbrains-extension)

This will open the Codacy Extension in your IDE Marketplace. Click **Install**

Expand Down Expand Up @@ -219,4 +224,113 @@

c. Open the Copilot chat and switch the mode to `Agent`. You can check that the MCP server was enabled correctly by clicking on the `Select tools` icon, which should list all the available Codacy tools.

![Copilot Agent with Codacy tools](images/copilot_agent.png)
![Copilot Agent with Codacy tools](images/copilot_agent.png)


# Jetbrains IDEs

Check failure on line 230 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Jetbrains'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Jetbrains'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 230, "column": 3}}}, "severity": "ERROR"}

Check failure on line 230 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Jetbrains'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Jetbrains'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 230, "column": 3}}}, "severity": "ERROR"}


### Supported Operating Systems

- macOS
- Linux
- Windows (via WSL)

!!! important
**For Windows users: Windows WSL** (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows. **Only local analysis** is supported for Windows, as MCP support for JetBrains IDEs is still not completely done.


### Supported IDEs

- IntelliJ IDEA
- PyCharm
- PhpStorm
- Others in the suite

!!! note
For JetBrains IDEs, IntelliJ is not the only supported editor, but it's the one being extensively tested. If you use other editors such as PyCharm and run into any issues, feel free to open an issue in our extension's [repository](https://github.com/codacy/codacy-intellij-extension). Check the [extension page](https://tinyurl.com/codacy-jetbrains-extension) on the marketplace to see the full list of supported IDEs.

Check failure on line 251 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'isn't' instead of 'is not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'isn't' instead of 'is not'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 251, "column": 34}}}, "severity": "ERROR"}

Check failure on line 251 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'isn't' instead of 'is not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'isn't' instead of 'is not'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 251, "column": 34}}}, "severity": "ERROR"}

### Built-in Scanners

- Trivy
- Semgrep
- ESLint
- Pylint
- PMD
- dartanalyzer
- [Lizard](https://docs.codacy.com/release-notes/cloud/cloud-2025-02-adding-ruff-lizard/#lizard)
- Revive

## How to install - Jetbrains Quick Guide {: id="how-to-install-quick-guide-jetbrains"}

Check failure on line 264 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Jetbrains'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Jetbrains'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 264, "column": 21}}}, "severity": "ERROR"}

Check failure on line 264 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Jetbrains'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Jetbrains'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 264, "column": 21}}}, "severity": "ERROR"}

#### Note for Windows users:
To take full advantage of Codacy Guardrails on Windows, you need to set up WSL first; [check the steps here.](#how-to-install-wsl)

### 1. Install the extension


You can either install the dependency from the [JetBrains marketplace](https://tinyurl.com/codacy-jetbrains-extension) or search for it directly in your IDE's plugin settings.

Check failure on line 272 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'IDE's'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'IDE's'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 272, "column": 154}}}, "severity": "ERROR"}

Check failure on line 272 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'IDE's'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'IDE's'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 272, "column": 154}}}, "severity": "ERROR"}


![Install Extension](images/install-codacy-extension-jetbrains.png)


### 2. Install and activate the Codacy CLI for local analysis

Click on the Codacy button on the lower right part of your IDE, and click **Install CLI**

![Install CLI](images/codacy-extension-activate-cli-jetbrains.png)

It will create a folder in your local repository called **.codacy** with all needed configuration:

- The configuration from all built-in scanners
- Codacy CLI script to run analysis locally

!!! note
If you don't want this folder to be part of your repository in future commits but continue working with it locally, please add **.codacy** to your .gitignore file

!!! note
The IDE extension will ignore any CLI version already installed (e.g., through brew or other package manager) on the machine.

Check failure on line 293 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Foreign] Use 'for example' instead of 'e.g.,'. Raw Output: {"message": "[Microsoft.Foreign] Use 'for example' instead of 'e.g.,'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 293, "column": 70}}}, "severity": "ERROR"}

Check failure on line 293 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Foreign] Use 'for example' instead of 'e.g.,'. Raw Output: {"message": "[Microsoft.Foreign] Use 'for example' instead of 'e.g.,'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 293, "column": 70}}}, "severity": "ERROR"}


### 3. Install MCP Server

#### a. Add the Codacy MCP Server

After clicking on the codacy icon on the lower right of the editor, click on **Install AiAgent MCP**

Check failure on line 300 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Codacy' instead of 'codacy'. Raw Output: {"message": "[Vale.Terms] Use 'Codacy' instead of 'codacy'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 300, "column": 23}}}, "severity": "ERROR"}

Check failure on line 300 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Codacy' instead of 'codacy'. Raw Output: {"message": "[Vale.Terms] Use 'Codacy' instead of 'codacy'.", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 300, "column": 23}}}, "severity": "ERROR"}

![Add Codacy MCP Server](images/codacy-extension-activate-cli-jetbrains.png)

#### b. Check if the Codacy MCP Server is enabled

In your IntelliJ settings, search the settings for the agent of your choice (Junie or Copilot) and confirm that Codacy is listed on the MCP settings tab.

Check failure on line 306 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Junie'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Junie'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 306, "column": 78}}}, "severity": "ERROR"}

Check failure on line 306 in docs/codacy-guardrails/codacy-guardrails-getting-started.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Junie'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Junie'?", "location": {"path": "docs/codacy-guardrails/codacy-guardrails-getting-started.md", "range": {"start": {"line": 306, "column": 78}}}, "severity": "ERROR"}

![Codacy MCP Server is enabled](images/mcp-settings-extension-jetbrains.png)

!!! note
You need to install the plugin for your desired agent. Make sure to install JetBrains Junie or GitHub Copilot if you want to integrate the Codacy MCP.

#### c. Confirm the settings of your Codacy extension

In your IntelliJ settings, search the settings for the Codacy extension and confirm that you're using the correct version of the CLI, as well as your preferred AI agent.

If you want Codacy to generate the AI agent guidelines (which will instruct the agent to run the Codacy local analysis on changes, for example) for you, you should also enable this option in the editor settings.

![Codacy MCP Server is enabled](images/extension-settings-jetbrains.png)

#### d. Generate AI guidelines
Install the guidelines by clicking on **Install AiAgent MCP** on the Codacy icon on the lower right part of your IDE.

![Install Agent Guidelines](images/codacy-extension-activate-cli-jetbrains.png)

!!! note
You need to install the plugin for your desired agent. Make sure to install JetBrains Junie or GitHub Copilot if you want to integrate the Codacy MCP.

### 4. Restart your IDE to apply changes

### 5. After everything is set up, you should now be able to interact with Codacy via AI chat.
* Remember that for you to be able to interact with the Codacy MCP server, you must be on the `Agent` mode of the chat (`Code` on Junie), not `Ask` mode.

### 6. Start using your Agent and Codacy will be there with you!

![Codacy Guardrails running in Jetbrains](images/codacy-guardrails-junie.png)
2 changes: 1 addition & 1 deletion docs/codacy-guardrails/codacy-guardrails-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Limitations with Windows

Windows WSL (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows.
Windows WSL (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows. Additionally, at this point we're only supporting VSCode and VSCode-based IDEs on Windows.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@

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---jetbrains-quick-guide--idhow-to-install-quick-guide-jetbrains).

Check warning on line 85 in docs/getting-started/integrating-codacy-with-intellij-ides.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Consider removing 'quickly'. Raw Output: {"message": "[Microsoft.Adverbs] Consider removing 'quickly'.", "location": {"path": "docs/getting-started/integrating-codacy-with-intellij-ides.md", "range": {"start": {"line": 85, "column": 171}}}, "severity": "WARNING"}

Check warning on line 85 in docs/getting-started/integrating-codacy-with-intellij-ides.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Consider removing 'quickly'. Raw Output: {"message": "[Microsoft.Adverbs] Consider removing 'quickly'.", "location": {"path": "docs/getting-started/integrating-codacy-with-intellij-ides.md", "range": {"start": {"line": 85, "column": 171}}}, "severity": "WARNING"}

## See also

- [Troubleshooting the Codacy IntelliJ plugin](https://github.com/codacy/codacy-intellij-extension?tab=readme-ov-file#troubleshooting)
Loading