Home

Awesome

<img align="left" width="85" height="85" src="https://raw.githubusercontent.com/lppedd/idea-conventional-commit/master/images/cc_logo.png" alt="Plugin logo">

Conventional Commit

Available @ JetBrains Plugins Repository

Looking for the latest plugin binaries? Get them here as .zip
<small>Supported IDE versions from 0.23.0: 223.4884 to 243.* (both inclusive)</small>
<small>Supported IDE versions from 0.19.0: 202.6397 to 233.* (both inclusive)</small>
<small>Supported IDE versions upto 0.18.0: 193.**** to 212.* (both inclusive)</small>

<strong>Additional Providers</strong> are available by installing other lightweight plugins.

Context & GitHubPlugins RepositoryTypeScopeSubjectBodyFooter typeFooter value
Angular (2+):heavy_check_mark: Install (Deprecated):heavy_check_mark:
Commitlint:heavy_check_mark: Install (Deprecated):heavy_check_mark::heavy_check_mark:
GitHubComing soon...
VCS (extended)Coming soon...

The aim of this plugin is to provide completion for conventional commits, also named semantic commits, inside the VCS Commit dialog. The plugin must provide:


Writing quality commit messages is important to keep an understandable and searchable history of your project. Conventional commits are a perfect example of that.
However, as an example, it can happen choosing the correct type or scope isn't that immediate. We might have forgotten about when a specific type should be used or what are the available scopes, or we simply need a way to quickly complete the subject.

The plugin helps with the above, while also respecting the aforementioned requirements, so that each user is able to customize the experience based on its preferences.

Completion modes

The plugin offers two completion modes.

Inspections

Inspections are bundled too, and they're extensible, which means a Provider may contribute with additional ones.
The standard inspection warns you if you're not following the Conventional Commit standard. In case, just press ctrl + alt + l (on Windows) and the commit message will be formatted for you.

<img src="https://raw.githubusercontent.com/lppedd/idea-conventional-commit/master/images/cc_inspections.gif" alt="Inspections">

You may enable/disable inspections via Settings > Version Control > Commit

Documentation

Each commit token is able to hold documentation. This is important in case you forgot their meaning, or if you want to share additional pieces of information with users.

<img src="https://raw.githubusercontent.com/lppedd/idea-conventional-commit/master/images/cc_docs.gif" alt="Documentation">

Documentation for tokens which might hold long text, spawning multiple lines, is rendered a bit differently.

<img width="840" height="281" src="https://raw.githubusercontent.com/lppedd/idea-conventional-commit/master/images/cc_long_doc.png" alt="Long documentation">

Custom default types and scopes

Default commit types and scopes can be totally customized and shared with your team by creating and populating a JSON file named

conventionalcommit.json

The plugin uses an internal version of that file, which you can export via Export built-in defaults to path.
You may then customize it per your needs.

<img width="840" height="572" src="https://raw.githubusercontent.com/lppedd/idea-conventional-commit/master/images/cc_custom_defaults.png" alt="Custom defaults">

You're allowed to provide custom commit's types, scopes and footer types, given the JSON file respects a Schema.
An example is shown below:

{
  "types": {
    "customType": {
      "description": "My custom type description"
    },
    "anotherCustomType": {},
    "yetAnotherCustomType": {
      "description": "This is my description",
      "scopes": {
        "first": {
          "description": "My first description"
        },
        "second": {
          "description": "My second description"
        }
      }
    }
  },
  "commonScopes": {
    "one": {
      "description": "My first common scope"
    },
    "two": {}
  },
  "footerTypes": [
    {
      "name": "My-custom-footer",
      "description": "My footer description"
    }
  ]
}

If the file is located in the project's root directory, the plugin will pick it up automatically, making it easy to version it, and avoiding to explicitly set a Custom default tokens path.

Providers

In a fresh installation you'll only be offered the most common tokens (e.g. fix, feat, build, BREAKING CHANGE, etc.), but the plugin exposes an API to enhance completion items, per each token. Type, scope and subject each have a specific entry point, and the implementation is called Provider. Each Provider is listed in a table, based on its context.

<img width="845" height="552" src="https://raw.githubusercontent.com/lppedd/idea-conventional-commit/master/images/cc_providers.png" alt="Providers">

You're allowed to re-order Providers per your necessities, knowing that possible duplicates are going to be automatically filtered by the core engine.

<b>More on this later on...</b>


Author and contributors