(validators, settings, stderr)
Validates that the settings are valid for MSBuild or MSVS.

  We currently only validate the names of the settings, not their values.

  Args:
      validators: A dictionary of tools and their validators.
      settings: A dictionary.  The key is the tool name.  The values are
          themselves dictionaries of settings and their values.
      stderr: The stream receiving the error messages.
Validates that the settings are valid for MSBuild or MSVS.
Validates that the settings are valid for MSBuild or MSVS .
def _ValidateSettings(validators, settings, stderr):
  """Validates that the settings are valid for MSBuild or MSVS.

  We currently only validate the names of the settings, not their values.

  Args:
      validators: A dictionary of tools and their validators.
      settings: A dictionary.  The key is the tool name.  The values are
          themselves dictionaries of settings and their values.
      stderr: The stream receiving the error messages.
  """
  for tool_name in settings:
    if tool_name in validators:
      tool_validators = validators[tool_name]
      for setting, value in settings[tool_name].iteritems():
        if setting in tool_validators:
          try:
            tool_validators[setting](value)
          except ValueError, e:
            print >> stderr, ('Warning: for %s/%s, %s' %
                              (tool_name, setting, e))
        else:
          _ValidateExclusionSetting(setting,
                                    tool_validators,
                                    ('Warning: unrecognized setting %s/%s' %
                                     (tool_name, setting)),
                                    stderr)

    else:
      print >> stderr, ('Warning: unrecognized tool %s' % tool_name)
def _ValidateSettings ( validators , settings , stderr ) : for tool_name in settings : if tool_name in validators : tool_validators = validators [ tool_name ] for setting , value in settings [ tool_name ] . iteritems ( ) : if setting in tool_validators : try : tool_validators [ setting ] ( value ) except ValueError , e : print >> stderr , ( 'Warning: for %s/%s, %s' % ( tool_name , setting , e ) ) else : _ValidateExclusionSetting ( setting , tool_validators , ( 'Warning: unrecognized setting %s/%s' % ( tool_name , setting ) ) , stderr ) else : print >> stderr , ( 'Warning: unrecognized tool %s' % tool_name )