Closed ymind closed 4 years ago
Hi! Thanks for the issue 😄
Btw, have you considered a code-level approach using the Provider API? See under https://github.com/lppedd/idea-conventional-commit/tree/master/src/main/kotlin/com/github/lppedd/cc/api
Altough I haven't polished it, so the public interface might change in the future.
@ymind The new JSON Schema would be:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Commit types and scopes",
"type": "object",
"additionalProperties": false,
"required": [
"types"
],
"properties": {
"types": {
"$ref": "#/definitions/types"
},
"commonScopes": {
"$ref": "#/definitions/scopes"
}
},
"definitions": {
"types": {
"additionalProperties": true,
"patternProperties": {
"^([a-zA-Z0-9-]+)$": {
"$ref": "#/definitions/commitType"
}
}
},
"scopes": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^([a-zA-Z0-9-:]+)$": {
"$ref": "#/definitions/commitScope"
}
}
},
"commitType": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"scopes": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^([a-zA-Z0-9-:]+)$": {
"$ref": "#/definitions/commitScope"
}
}
}
}
},
"commitScope": {
"type": "object",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
}
}
}
}
}
Hi! Thanks for the issue 😄
- Sure, we can solve that by updating the JSON file schema. I'll do that.
- I had considered it, but since projects layout can vary a lot, I preferred the absolute path approach. Still the file can be versioned with the project. Do you consider it a usability problem?
I just want to share the settings in my team so that we can follow the same rules in the same project.
If I place setting file somewhere else, I might need another way to distribute it to other teammates. That's why I got this idea.
@ymind The new JSON Schema would be:
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Commit types and scopes", ....
it's great!
@ymind
I just want to share the settings in my team so that we can follow the same rules in the same project.
Ok, so I'll see what I can do to make this behavior better. Need to study the IDEA project model a little more.
@ymind almost done. What I have done
json.org
dependencyorg.everit.json.schema
dependency for schema validationFixed with commits 93890558c19387f1a77571fbd2131260a255af6d de58522f0ac7197ebc1830a1b7553b4dfefe9f37
I'll create another issue soon for automatic loading of a file in base project directory.
Thank you for your good job first ! This plugin is exactly what I need, It effectively improved my work.
I have some problems at work:
cc_defaults.json
define some public scopes.cc_defaults.json
in the project root directory and taking effect by default ? I expect it to work like.editorconfig
.For the first question, my current config is:
This is not convenient, I want to define some public scopes, like: