See #713. Delete options that do not have a supported beautifier

This commit is contained in:
Glavin Wiechert 2016-03-21 11:21:30 -03:00
parent bc8c2a835b
commit 2be35ca657
1 changed files with 7 additions and 1 deletions

View File

@ -216,12 +216,18 @@ module.exports = class Beautifiers extends EventEmitter
logger.warn("Unsupported option:", beautifierName, languageName, field, op, langOptions)
# Improve descriptions to each language option
unsupportedOptions = []
for g,group of langOptions
for o,optionDef of group.properties
if optionDef.beautifiers.length > 0
optionDef.description = "#{optionDef.description} (Supported by #{optionDef.beautifiers.join(', ')})"
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
# logger.verbose('languages', languages)