[feature request] VCS friendly custom tokens
See original GitHub issueI’m sharing most of my .idea
files on git, so if anyone runs the same IDE he has everything set up once he clones and opens IDEs (mostly I’ve added that to share complex run configurations).
I’ve noticed that file conventionalCommit.xml
always uses full path to the file, so this won’t work on another computer, where user stores his project in a different directory.
I’ve tried to change the XML manually with
<option name="customFilePath" value="$PROJECT_DIR$/cc_defaults.json"/>
…which seems to work, plugin settings view gets the correct path (which is full path, c:.…, event after IDE restart), but after a while I notice that (I guess plugin) updates this XML back with the full path instead of using $PROJECT_DIR$
. I’ve also tried by just entering cc_defaults.json
and $PROJECT_DIR$/cc_defaults.json
but the plugin doesn’t recognize this syntax.
Would be really nice if this could be solved. I guess the simplest solution would just be to check if full path contains $PROJECT_DIR$
's value, if so, that part of the full path should be replaced with string “$PROJECT_DIR$”, so that the output is the same as in XML code snippet above. Or I guess IDE fw for plugins may already have a helper for this?
EDIT: After going back to my IDE and committing these files to my repo, I was thinking, maybe it would make more sense to store cc_defaults.json
content in conventionalCommit.xml
since it’s both plugin configuration kind of (maybe this wouldn’t work in case one would want to store this outside the project or in another project folder, so I guess current solution is the most flexible one).
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
Top GitHub Comments
You are right, unchecking
Custom default tokens
and renaming the file toconventionalcommit.json
solves it.But you don’t need to set a custom file like that if it’s in project root and it’s called conventionalcommit.json
Thanks!
Il ven 21 feb 2020, 18:19 tad3j notifications@github.com ha scritto: