Check that the configuration parameter are setted correctly.

@param {object} config - plugin configurations.

@returns {boolean} return true if the parameters are set correctly.
7145
function isConfigurationParametersDefinedCorrectly(config) {
		if (!config) {
			gutil.log('license-check', gutil.colors.red('Config must be defined to run the plugin'));
			return false;
		}

		if (!config.path) {
			gutil.log('license-check', gutil.colors.red('License header property {path} must be defined to run the plugin'));
			return false;
		}

		return true;
	}
243625
function initUserConfig ( config ) {

    var parsedConfig = {};

    if ( !config ) {
        return;
    }

    config = config.split( ";" );

    $.each( config, function ( index, item ) {

        item = item.split( ":" );
        parsedConfig[ item[ 0 ] ] = item[ 1 ];

    } );

    setUserConfig( parsedConfig );

}
811442
function getConfig(config) {
  require('./test.karma.conf')(config);
  config.set({
    autoWatch: true,
    singleRun: false
  });
}
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
1300701
function validate (config) {

	/** Make sure the config object was passed. */
	if (!config) {
		throw new TypeError('Missing configuration object.');
	}

	/** Make sure the panic url is provided. */
	if (typeof config.panic !== 'string') {
		throw new TypeError('Panic server URL "config.panic" not provided.');
	}

	/** Make sure config.clients is an array. */
	if (isArray(config.clients) === false) {
		throw new TypeError('"config.clients" is not an array.');
	}

	var str = JSON.stringify;

	/** Validate the client objects. */
	config.clients.forEach(function (client) {
		if (!client) {
			throw new Error('Client "' + client + '" is not an object.');
		}

		if (!client.type) {
			throw new Error('Missing client.type attribute: ' + str(client));
		}
	});
}
1141981
function formatConfig (config) {
  _.defaults(config, {debug: false, plugins: []})

  config.debugOptions = config.debugOptions || {}
  config.connectedTeams = new Set()

  if (!Array.isArray(config.plugins)) {
    config.plugins = [config.plugins]
  }

  config.scopes = _.chain(config.plugins)
    .map('scopes')
    .flatten()
    .concat(_.isArray(config.scopes) ? config.scopes : [])
    .uniq()
    .remove(_.isString.bind(_))
    .value()

  config.isSlackApp = !config.slackToken

  if (!config.slackToken && !(config.clientId && config.clientSecret && config.port)) {
    logger.error(`Missing configuration. Config must include either slackToken AND/OR clientId, clientSecret, and port`)
    process.exit(1)
  }
}
1105439
function(config) {
			if (initialized) {
				error(new Error('Cannot set global configuration after application initialization'));
				return;
			}

			for (var prop in config) {
				if (config.hasOwnProperty(prop)) {
					globalConfig[prop] = config[prop];
				}
			}
		}
569898
function validateConfig(config) {
    var timer = joi.object().keys({
        seconds: joi.number().integer().positive().default(60 * 5),
        handler: joi.alternatives().try(joi.func().arity(0), joi.string()).required()
    });

    var schema = joi.object().keys({
        debug:           joi.boolean().default(false),
        server:          joi.string().trim().uri().default(constants.TWITCH_IRC_SERVER),
        port:            joi.number().integer().positive().default(constants.TWITCH_IRC_PORT),
        secure:          joi.boolean().default(true),
        name:            joi.string().trim().required().lowercase(),
        password:        joi.string().trim().required(),
        channel:         joi.string().trim().required().regex(constants.CHANNEL_REGEX),
        commandPrefix:   joi.string().trim().default(constants.COMMAND_PREFIX),
        joinMessage:     joi.alternatives().try(joi.string().trim(), joi.boolean()).default(false),
        partMessage:     joi.alternatives().try(joi.string().trim(), joi.boolean()).default(false),
        commands:        joi.object().default({}),
        timers:          joi.array().items(timer).default([]),
        filterSpam:      joi.boolean().default(false),
        maxOffenses:     joi.number().integer().positive().default(constants.MAX_OFFENSES),
        autoExit:        joi.boolean().default(true),
        discordToken:    joi.alternatives().try(joi.string().trim(), joi.boolean()).default(false),
        discordChannels: joi.array().items(joi.string().trim()).default([]),
        log:             joi.alternatives().try(joi.string().trim(), joi.boolean()).default('chat_logs')
    });

    var validation = joi.validate(config, schema);

    if (validation.error) {
        var error = 'Your twitchcmd configuration is invalid.\n' +
            'Please consult the README.md for more information.\n' +
            validation.error.message;

        throw new Error(error);
    }

    return validation.value;
}
846179
public boolean isValid() {
        if (PluggableTaskConfigStore.store().preferenceFor(pluginConfiguration.getId()) == null) {
            addError(TYPE, String.format("Could not find plugin for given pluggable id:[%s].", pluginConfiguration.getId()));
        }

        configuration.validateTree();

        return (errors.isEmpty() && !configuration.hasErrors());
    }
1145228
function Config (config, defaultConfig) {
  validateConfig(config);
  deepAssign(this, defaultConfig || Config.defaults);

  if (config) {
    deepAssign(this, config);
  }
}
171011
def apply_check_config(self, config):
        
        self.query = config.get("query")
        self.expected_response = config.get("response")
1312702
function (key) {
    
            key = key.toLowerCase();
        
            var property = this.config[key];
    
            if (property && property.event) {
    
                if (this.initialConfig[key] && 
                    !Lang.isUndefined(this.initialConfig[key])) {
    
                    this.setProperty(key, this.initialConfig[key]);

                    return true;
    
                }
    
            } else {
    
                return false;
            }
    
        }
42434
function validateConfig(config, parentPath) {
    if (parentPath === void 0) { parentPath = ''; }
    // forEach doesn't iterate undefined values
    for (var /** @type {?} */ i = 0; i < config.length; i++) {
        var /** @type {?} */ route = config[i];
        var /** @type {?} */ fullPath = getFullPath(parentPath, route);
        validateNode(route, fullPath);
    }
}
1010106
function (config) {
    config = config || {};

    // Calling base constructor
    LifeCycle.call(this);

    /**
     * Appender config
     */
    this.name = config.name;

    /**
     * Underlying layout
     */
    this.layout = config.layout;

    /**
     * Appender filter
     */
    this.filter = config.filter;

    /**
     * Trace level
     */
    this.level = config.level || 'all';

    /**
     * Function used to determine whether a level is below the
     * trace level of the Appender
     */
    this.isBelow = config.isLogLevelBelow || function () {
      return true;
    };
  }
1108170
function verifyInput(config) {
    if ('object' !== typeof config) {
        return 'config must be object.';
    }
    if ('string' !== typeof config.group) {
        return 'config.group must be string.';
    }
    if ('string' !== typeof config.name) {
        return 'config.name must be string.';
    }
    if (config.clients && !(config.clients instanceof PlayerList)) {
        return 'config.clients must be PlayerList or undefined.';
    }
    if (config.logicPath && 'string' !== typeof config.logicPath) {
        return 'config.logicPath must be string or undefined.';
    }
    if ('object' !== typeof config.channel) {
        return 'config.channel must be object.';
    }
    if (config.runtimeConf && 'object' !== typeof config.runtimeConf) {
        return 'config.channel must be object.';
    }
    return;
}
777411
function getPluginConfig(config, pluginName) {
    var pluginsConfig = config.getValues().get('pluginsConfig');
    if (pluginsConfig === undefined) {
        return {};
    }
    var pluginConf = pluginsConfig.get(pluginName);
    if (pluginConf === undefined) {
        return {};
    } else {
        return pluginConf.toJS();
    }
}
158624
function defaultConfig(config) {
	config.urls = config.urls || [];
	config.defaults = config.defaults || {};
	config.defaults.log = config.defaults.log || console;
	// 	Setting to undefined rather than 0 allows for a fallback to the default
	config.defaults.wrapWidth = process.stdout.columns || undefined;
	if (program.json) {
		delete config.defaults.log;
	}
	return config;
}