Skip to content

Files

Latest commit

bf9e094 · Dec 6, 2015

History

History
94 lines (54 loc) · 3.66 KB

CONTRIBUTING.md

File metadata and controls

94 lines (54 loc) · 3.66 KB

Getting started

Clone

git clone --recursive https://github.com/intellij-rust/intellij-rust.git
cd intellij-rust

Building

To build the plugin just navigate to the directory you've previously checked it out and type ./gradlew build. That's it.

Running

To launch the plugin from console just type ./gradlew runIdea.

Development

For development you could use any editor/IDE of your choice. There is no peculiar dependency on IDEA, though we're particularly stuck to it, therefore providing instructions how to nail it from that side.

If you're using any other particular stack feel free to contribute to that list.

IDEA

For development you'd need IDEA with Kotlin plugin (which is shipped by default starting from 14.1)

You can get the latest Intellij IDEA Community Edition here. You can also get the version from EAP channel here.

To import the project just: Ctrl + Shift + A, Import project or File, New, Project from existing sources, and select build.gradle from the root directory of the plugin.

Contributing

To contribute to the code of the project check out the the latest version and follow instructions on how to build & run it.

If you feel yourself new to the field or don't know what you should start coping with check out issue-tracker for the up-for-grab tasks as these may be greatest entry points to the project source code.

If you want to contribute to the project in any of the numerous other ways, first of all consider joining our Gitter therefore being on par with the current development efforts.

NOTA BENE

Please, make sure that all tests pass and Travis reports build as green prior to making a pull request.

Code style

Please, consider our code-style prior to submitting the pull request. We love PRs, but much more than just PRs we love PRs that are 'on style'.

For the Java sources we're stuck to the Google's one.

Plugin overview

We use Kotlin language for the plugin. If you can program in Java or Rust, you should be able to read/write Kotlin right away. Learn more about Kotlin.

See the IDEA platform documentation. Of a particular interest are the following sections:

It's also very inspirational to browse existing plugins. Check out Erlang and Go plugins.

Testing

It is much easier to understand code changes if they are accompanied with tests. Test classes are placed in the src/test/kotlin directory, src/test/resources holds rust files which are used as fixtures. We also include CTRS as a submodule and use it to test the parser.

The test suite can be run by launching:

./gradlew test

To execute tests from within IDE edit default run configuration for JUnit. In the befor launch section remove make and add gradle task assemble testClasses. Now you can select any test function, class or folder and use Ctlr + Shift + f10 to launch specific tests.