-
Notifications
You must be signed in to change notification settings - Fork 22
Add new setting vrdev.buildTools.extraVroGroups #164
Description
Description
We enjoy the usage of the lint rule ToolchainVersionRule in our monorepo, as it also informs colleagues on the team what the recommended BTVA version is for a package.
But for some projects in our monorepo we have a custom pom (which has the actual vmware.pscoe pom as parent) to override some behavior to fit our workflow.
When doing this, we lose the lint rules as they are mapped to specific parent artifactId:groupIds
| static readonly ParentGroupByArtifact = { | |
| "base-package": "com.vmware.pscoe.o11n", | |
| "actions-package": "com.vmware.pscoe.o11n", | |
| "xml-package": "com.vmware.pscoe.o11n", | |
| "typescript-project": "com.vmware.pscoe.o11n", | |
| "typescript-project-all": "com.vmware.pscoe.o11n", | |
| "vra-package": "com.vmware.pscoe.vra", | |
| "vra-ng-package": "com.vmware.pscoe.vra-ng", | |
| "polyglot-project": "com.vmware.pscoe.polyglot" | |
| } |
Would it be possible to add a new extension setting, e.g. vrdev.buildTools.extraVroGroups? Here we could provide an object of key/values, similar to the already existing PomFile.ParentGroupByArtifact.
And then add something like:
static readonly ParentGroupByArtifact = {
"base-package": "com.vmware.pscoe.o11n",
"actions-package": "com.vmware.pscoe.o11n",
"xml-package": "com.vmware.pscoe.o11n",
"typescript-project": "com.vmware.pscoe.o11n",
"typescript-project-all": "com.vmware.pscoe.o11n",
"vra-package": "com.vmware.pscoe.vra",
"vra-ng-package": "com.vmware.pscoe.vra-ng",
"polyglot-project": "com.vmware.pscoe.polyglot",
+ ...vscode.workspace.getConfiguration().get<VrealizeSettings>("vrdev").buildTools.extraVroGroups || {}
}So the usage would be:
// .vscode/settings.json
{
"vrdev.buildTools.defaultVersion": "4.6.0",
"vrdev.buildTools.extraVroGroups": {
"custom-package": "com.example.custom-vro"
}
}Alternatives
Creating custom lint rules for the XML files. But we'd like to keep it to this extension and ESLint.
Additional Context
I am willing to make a PR for this, but would like the input of the maintainers before starting.