From 2be35ca657ec1e7da973522716b9875169e046ce Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Mon, 21 Mar 2016 11:21:30 -0300 Subject: [PATCH] See #713. Delete options that do not have a supported beautifier --- src/beautifiers/index.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/beautifiers/index.coffee b/src/beautifiers/index.coffee index bd9f841..6dc958b 100644 --- a/src/beautifiers/index.coffee +++ b/src/beautifiers/index.coffee @@ -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)