binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Allow `enumDescriptions` in `Settings` to be an object as well as an array

Open clubby789 opened this issue 1 year ago • 0 comments

What is the feature you'd like to have? Currently, enumDescriptions must have a corresponding entry for each enum type. Sometimes, it would be useful to only provide descriptions for some options, e.g.

"enum": [
    "1.2",
    "1.16",
    "1.18",
    "1.20",
    "autodetect"
],
"enumDescriptions": {
	"autodetect": "Automatically detect Go version"
},

Is your feature request related to a problem? https://github.com/clubby789/golang_pclntab_parser/blob/444172465a99b022cc4e31512cc143ade07971b0/init.py#L42-L47 I would like to provide a description for only the 'autodetect' options, as descriptions for the other options would be redundant.

Are any alternative solutions acceptable?

Another option could be folding enumDescriptions into enum, i.e.

"enum" {
  "1.2": null,
  // ...
  "autodetect": "Automatically detect Go version"
}

clubby789 avatar Aug 21 '24 21:08 clubby789