Skip to content

Commit fd271c8

Browse files
feat: Add Intellij Guardrails documentation
1 parent c9b5dd7 commit fd271c8

8 files changed

Lines changed: 120 additions & 3 deletions

docs/codacy-guardrails/codacy-guardrails-getting-started.md

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
99
<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>
1010

1111

12+
# VSCode
13+
1214
## Prerequisites
1315

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

2426
!!! important
2527
**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.
28+
We currently only support VSCode, Cursor, and Windsurf on Windows.
2629

2730

2831
### Supported IDEs
@@ -33,6 +36,7 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
3336

3437
!!! note
3538
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.
39+
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)
3640

3741
### Built-in Scanners
3842

@@ -52,9 +56,10 @@ To take full advantage of Codacy Guardrails on Windows, you might need to setup
5256

5357
### 1. Download the extension
5458

55-
- [Visual Studio Code](https://tinyurl.com/codacy-vscode)
59+
- [Visual Studio Code](https://tinyurl.com/codacy-vscode-extension)
5660
- [Cursor](http://tinyurl.com/codacy-cursor)
5761
- [Windsurf](http://tinyurl.com/codacy-windsurf)
62+
- [IntelliJ IDEA](https://tinyurl.com/codacy-jetbrains-extension)
5863

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

@@ -219,4 +224,113 @@ b. Make sure you have Agent mode enabled: [vscode://settings/chat.agent.enabled]
219224

220225
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.
221226

222-
![Copilot Agent with Codacy tools](images/copilot_agent.png)
227+
![Copilot Agent with Codacy tools](images/copilot_agent.png)
228+
229+
230+
# Jetbrains IDEs
231+
232+
233+
### Supported Operating Systems
234+
235+
- macOS
236+
- Linux
237+
- Windows (via WSL)
238+
239+
!!! important
240+
**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.
241+
242+
243+
### Supported IDEs
244+
245+
- IntelliJ IDEA
246+
- PyCharm
247+
- PhpStorm
248+
- Others in the suite
249+
250+
!!! note
251+
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.
252+
253+
### Built-in Scanners
254+
255+
- Trivy
256+
- Semgrep
257+
- ESLint
258+
- Pylint
259+
- PMD
260+
- dartanalyzer
261+
- [Lizard](https://docs.codacy.com/release-notes/cloud/cloud-2025-02-adding-ruff-lizard/#lizard)
262+
- Revive
263+
264+
## How to install - Jetbrains Quick Guide {: id="how-to-install-quick-guide-jetbrains"}
265+
266+
#### Note for Windows users:
267+
To take full advantage of Codacy Guardrails on Windows, you need to set up WSL first; [check the steps here.](#how-to-install-wsl)
268+
269+
### 1. Install the extension
270+
271+
272+
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.
273+
274+
275+
![Install Extension](images/install-codacy-extension-jetbrains.png)
276+
277+
278+
### 2. Install and activate the Codacy CLI for local analysis
279+
280+
Click on the Codacy button on the lower right part of your IDE, and click **Install CLI**
281+
282+
![Install CLI](images/codacy-extension-activate-cli-jetbrains.png)
283+
284+
It will create a folder in your local repository called **.codacy** with all needed configuration:
285+
286+
- The configuration from all built-in scanners
287+
- Codacy CLI script to run analysis locally
288+
289+
!!! note
290+
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
291+
292+
!!! note
293+
The IDE extension will ignore any CLI version already installed (e.g., through brew or other package manager) on the machine.
294+
295+
296+
### 3. Install MCP Server
297+
298+
#### a. Add the Codacy MCP Server
299+
300+
After clicking on the codacy icon on the lower right of the editor, click on **Install AiAgent MCP**
301+
302+
![Add Codacy MCP Server](images/codacy-extension-activate-cli-jetbrains.png)
303+
304+
#### b. Check if the Codacy MCP Server is enabled
305+
306+
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.
307+
308+
![Codacy MCP Server is enabled](images/mcp-settings-extension-jetbrains.png)
309+
310+
!!! note
311+
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.
312+
313+
#### c. Confirm the settings of your Codacy extension
314+
315+
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.
316+
317+
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.
318+
319+
![Codacy MCP Server is enabled](images/extension-settings-jetbrains.png)
320+
321+
#### d. Generate AI guidelines
322+
Install the guidelines by clicking on **Install AiAgent MCP** on the Codacy icon on the lower right part of your IDE.
323+
324+
![Install Agent Guidelines](images/codacy-extension-activate-cli-jetbrains.png)
325+
326+
!!! note
327+
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.
328+
329+
### 4. Restart your IDE to apply changes
330+
331+
### 5. After everything is set up, you should now be able to interact with Codacy via AI chat.
332+
* 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.
333+
334+
### 6. Start using your Agent and Codacy will be there with you!
335+
336+
![Codacy Guardrails running in Jetbrains](images/codacy-guardrails-junie.png)

docs/codacy-guardrails/codacy-guardrails-limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Limitations with Windows
44

5-
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.
5+
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.
31.8 KB
Loading
566 KB
Loading
113 KB
Loading
78.1 KB
Loading
102 KB
Loading

docs/getting-started/integrating-codacy-with-intellij-ides.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ To review issues:
8181

8282
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.
8383

84+
## Running Codacy Guardrails
85+
As of version [0.0.8](https://plugins.jetbrains.com/plugin/23924-codacy/versions/stable/840439), the IntelliJ plugin now supports Codacy Guardrails.
86+
8487
## See also
8588

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

0 commit comments

Comments
 (0)