Skip to content

Commit 3f99dd9

Browse files
feat: Add Intellij Guardrails documentation (#2459)
* feat: Add Intellij Guardrails documentation * add unsaved file * fix typo * fix broken link * vale * Address PR comments * Add note about missing MCP support for windows * clean: Add Junie to vale's ignore list + Order the entries --------- Co-authored-by: Nuno Fernandes <[email protected]>
1 parent 0a66eca commit 3f99dd9

File tree

9 files changed

+130
-11
lines changed

9 files changed

+130
-11
lines changed

.github/styles/config/vocabularies/Codacy/accept.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
aligncheck
2-
autofix
3-
autoremediate
42
allowlist
3+
Ameba
54
Atlassian
5+
autofix
6+
autoremediate
67
autovacuum
7-
Ameba
88
Bandit
99
Bitbucket
1010
Bitnami
@@ -13,8 +13,8 @@ bundler-audit
1313
Checkov
1414
Checkstyle
1515
Clang-Tidy
16-
CloudFormation
1716
cloc
17+
CloudFormation
1818
Cobertura
1919
Codacy
2020
CodeNarc
@@ -51,6 +51,7 @@ jq
5151
jscpd
5252
JSHint
5353
JSP
54+
Junie
5455
markdownlint
5556
monorepo
5657
namespace
@@ -60,8 +61,8 @@ PHP_CodeSniffer
6061
PHPUnit
6162
plaintext
6263
PMD
63-
Prospector
6464
Promtail
65+
Prospector
6566
PSScriptAnalyser
6667
PVC
6768
Pylint
@@ -86,14 +87,14 @@ Staticcheck
8687
Stylelint
8788
SwiftLint
8889
Tailor
89-
Trivy
9090
tooltip
91+
Trivy
9192
TSLint
9293
TSQLLint
9394
unassigns
9495
unfollow
9596
vacuumdb
9697
Visualforce
9798
VSCode
98-
Xcode
9999
webserver
100+
Xcode

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

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

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

5356
### 1. Download the extension
5457

55-
- [Visual Studio Code](https://tinyurl.com/codacy-vscode)
58+
- [Visual Studio Code](https://tinyurl.com/codacy-vscode-extension)
5659
- [Cursor](http://tinyurl.com/codacy-cursor)
5760
- [Windsurf](http://tinyurl.com/codacy-windsurf)
61+
- [IntelliJ IDEA](https://tinyurl.com/codacy-jetbrains-extension)
5862

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

@@ -219,4 +223,115 @@ b. Make sure you have Agent mode enabled: [vscode://settings/chat.agent.enabled]
219223

220224
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.
221225

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