We welcome contributions, but please read first! To ensure a smooth process and that your valuable work aligns with our roadmap, please keep the following in mind to help manage expectations:
Before undertaking any changes or new features, please discuss your plans with us. This helps align on scope, design, technical approach, and priority.
Even bug fixes can have unforeseen impacts or alternative solutions better suited for the codebase, so please ask first, we will be happy to discuss.
Please raise a request with support. (Snyk employees, use #ask-ide)
Consider whether your proposed change should be implemented within the IDE extension(s) or in the shared Language Server and related stack.
If your change is applicable to other Snyk IDE plugins as well, we may expect you to submit similar PRs for the other relevant IDE repositories after your initial PR has been reviewed and approved, as they will usually need to be merged all at once or not at all.
All changes must be thoroughly manually tested by you.
For visual changes the PR template asks for screenshots, so this is a good opportunity to snap them.
Any user-facing changes will require documentation changes, which you will need to prepare. If you do not have access to our content management system (you are not a Snyk employee), please add the documentation changes required (including new wording and screenshots) to the PR description.
We can instruct you on what to add to the CHANGELOG.md, so please ask.
- install a JDK into the path specified in
.snyk.env.darwin. Else the snyk scan may fail
Code is formatted with ktfmt (Google Style) via Spotless. Use the same style locally to avoid noisy diffs:
- IntelliJ: Install the ktfmt plugin and set the code style to Google Style in the plugin settings.
- Apply formatting: Run
./gradlew spotlessApplybefore committing. CI runs./gradlew spotlessCheckand./gradlew ktlintCheck; fix any reported issues locally.
Build process happens through Gradle (as well as all dependency's connection). Managed in build.gradle.kts root file, parametrised by gradle.properties file.
Should be mostly done trough IntelliJ Platform Testing Framework and placed into integTest source root except simple independent Unit tests (test source root).
Mocks are not recommended by Jetbrains, but we heavily (and successfully) use Mockk framework. Just be careful not to mock whole world and make sure you're testing real functionality and not mocked one.
- From the toolbar click
Run->Run - Click
Edit Configuration->Add new configuration - Select
Gradlefrom the configuration list - Type
runIdein theRuntextbox to select therunIderun command - Click
ApplyandRunto run the extension`
If you want to run the plugin in other IDE distribution (e.g. Rider), you should pass set IDE Contents directory as a localIdeDirectory property in gradle.properties.
Here's an example for local Rider installation:
localIdeDirectory=/Users/michel/Library/Application Support/JetBrains/Toolbox/apps/Rider/ch-0/221.5787.36/Rider.app/Contents
You can copy the full path from IDE Settings in the JetBrains Toolbox.
- IntelliJ Platform Plugin SDK - that's your "Holy book" :)
- Gradle IntelliJ Plugin - needed for plugin development. See it's usage documentations
- IntelliJ Platform Explorer - here you can find examples of any(?) Extension Point usage. Imho better look into IntelliJ Idea sources for implementation.
- Forum/FAQ for IntelliJ IDEA Open API and Plugin Development
- Slack channel for Plugin development for IntelliJ Platform
- IntelliJ Platform UI Guidelines
- Icons search in IntelliJ platform built-in list