Skip to content
Merged
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
15 changes: 8 additions & 7 deletions .github/styles/config/vocabularies/Codacy/accept.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
aligncheck
autofix
autoremediate
allowlist
Ameba
Atlassian
autofix
autoremediate
autovacuum
Ameba
Bandit
Bitbucket
Bitnami
Expand All @@ -13,8 +13,8 @@ bundler-audit
Checkov
Checkstyle
Clang-Tidy
CloudFormation
cloc
CloudFormation
Cobertura
Codacy
CodeNarc
Expand Down Expand Up @@ -51,6 +51,7 @@ jq
jscpd
JSHint
JSP
Junie
markdownlint
monorepo
namespace
Expand All @@ -60,8 +61,8 @@ PHP_CodeSniffer
PHPUnit
plaintext
PMD
Prospector
Promtail
Prospector
PSScriptAnalyser
PVC
Pylint
Expand All @@ -86,14 +87,14 @@ Staticcheck
Stylelint
SwiftLint
Tailor
Trivy
tooltip
Trivy
TSLint
TSQLLint
unassigns
unfollow
vacuumdb
Visualforce
VSCode
Xcode
webserver
Xcode
121 changes: 118 additions & 3 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 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
<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-based IDEs

## Prerequisites

- git
Expand All @@ -23,6 +25,7 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co

!!! 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 @@ -48,13 +51,14 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
## How to install - Quick Guide {: id="how-to-install-quick-guide"}

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

### 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 +223,115 @@ b. Make sure you have Agent mode enabled: [vscode://settings/chat.agent.enabled]

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


### 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** are 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 isn't the only supported editor, but is our primary focus. 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.

### 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"}

#### 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.

### 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 Codacy plugin's settings.

!!! note
If you don’t see the Codacy plugin icon on the left taskbar after installing it, go to View > Tool Windows > Codacy

![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 (for example, through brew or other package manager) on the machine.


### 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**

![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.

![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 Guidelines** 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` nor `Edit` 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-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"}

## See also

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