See #713. Delete options that do not have a supported beautifier
This commit is contained in:
parent
bc8c2a835b
commit
2be35ca657
|
@ -216,12 +216,18 @@ module.exports = class Beautifiers extends EventEmitter
|
||||||
logger.warn("Unsupported option:", beautifierName, languageName, field, op, langOptions)
|
logger.warn("Unsupported option:", beautifierName, languageName, field, op, langOptions)
|
||||||
|
|
||||||
# Improve descriptions to each language option
|
# Improve descriptions to each language option
|
||||||
|
unsupportedOptions = []
|
||||||
for g,group of langOptions
|
for g,group of langOptions
|
||||||
for o,optionDef of group.properties
|
for o,optionDef of group.properties
|
||||||
if optionDef.beautifiers.length > 0
|
if optionDef.beautifiers.length > 0
|
||||||
optionDef.description = "#{optionDef.description} (Supported by #{optionDef.beautifiers.join(', ')})"
|
optionDef.description = "#{optionDef.description} (Supported by #{optionDef.beautifiers.join(', ')})"
|
||||||
else
|
else
|
||||||
optionDef.description = "#{optionDef.description} (Not supported by any beautifiers)"
|
# optionDef.description = "#{optionDef.description} (Not supported by any beautifiers)"
|
||||||
|
logger.warn("#{g}'s option '#{optionDef.title} not supported by any beautifiers!")
|
||||||
|
unsupportedOptions.push("#{g}.properties.#{o}")
|
||||||
|
# Delete unsupported options
|
||||||
|
for p in unsupportedOptions
|
||||||
|
_.unset(langOptions, p)
|
||||||
|
|
||||||
# Generate Language configurations
|
# Generate Language configurations
|
||||||
# logger.verbose('languages', languages)
|
# logger.verbose('languages', languages)
|
||||||
|
|
Loading…
Reference in New Issue