Skip to content

Latest commit

 

History

History
85 lines (55 loc) · 4.3 KB

CONTRIBUTING.md

File metadata and controls

85 lines (55 loc) · 4.3 KB

Developer Documentation

Technology stack

This project builds on the IntelliJ Platform Plugin Template that uses Gradle as its build system, GitHub Actions for the CI/CD pipeline, and Java 17.

Environment setup

JDK

Install Java JDK 17 and configure the project to use that JDK if not automatically configured.

Setup Mockitools

To start development, just clone this repository to your machine, import the project, let it build, and you should be good to go.

There are predefined run configurations coming from the platform plugin template you can use to build, test and run the plugin.

Suggested plugins for development

the following plugins are recommended to help with the plugin development:

Base classes

There are a few base classes that can be used to implement the different plugin features:

Mockito DSL types

Functionality is organized into DSL specific classes:

Message bundle

Most messages that appear on the UI, in settings, in inspection messages, are stored in a message bundle called MockitoolsBundle.properties. Some messages, like inspection titles are not yet included, and simply are in the plugin.xml.

Since-version

The following markers are placed on extension point implementations and more important types, to help identify certain aspects of the code:

  • @since <version number> in javadocs
  • @HasSonarLintAlternative annotation if an inspection has an alternative in SonarLint

CI/CD

For CI/CD, GitHub Actions is integrated, and workflows are available in the .github/workflows folder.

Functional tests

Functional tests build mostly on JUnit3-based platform test classes. For assertions, either the IntelliJ platform's underlying logic is used, or AssertJ where applicable.

Mockitools base test classes:

Other resources: IntelliJ Platform Plugin SDK - Testing Overview

Load 3rd-party libs

JDK

Java file based tests require either a mock or a real JDK to be available. This project is configured to always use a real JDK, so that modification of the idea.home.path system property is not necessary for running tests locally. And, using the JAVA_HOME based JDK also works on GitHub Actions.

testData

The src/test/testData folder is used to store test data. They can be configured as project roots when setting the test data path in functional tests.

JetBrains resources