original_docstring: This function checks settings for sanity.
docstring: This function checks settings for sanity.
docstring_tokens: This function checks settings for sanity .
code: def plugin_loaded():
      """This function checks settings for sanity."""
      plugin_settings = sublime.load_settings("Reexec.sublime-settings")
      if not plugin_settings.get('ssh_path', 'ssh'):
          raise ValueError('reexec: ssh_path must not be empty. Please check the settings.')
      if not plugin_settings.get('rsync_path', 'rsync'):
          raise ValueError('reexec: rsync_path must not be empty. Please check the settings.')
      servers = plugin_settings.get("servers", [])
      unique_names = set()
      required_parameters = ['name', 'root_directory', 'host']
      nonempty_parameters = ['name', 'root_directory', 'host']
      for s in servers:
          for param in required_parameters:
              if param not in s:
                  raise ValueError('reexec: "{0}" parameter is required. Please check the settings.'.format(param))
          for param in nonempty_parameters:
              if param in s and len(s[param])==0:
                  raise ValueError('reexec: "{0}" parameter must not be empty. Please check the settings.'.format(param))
          if s['name'] in unique_names:
              raise ValueError('reexec: duplicate "{0}" servers'.format(s['name']))
          unique_names.add(s['name'])
code_tokens: def plugin_loaded ( ) : plugin_settings = sublime . load_settings ( "Reexec.sublime-settings" ) if not plugin_settings . get ( 'ssh_path' , 'ssh' ) : raise ValueError ( 'reexec: ssh_path must not be empty. Please check the settings.' ) if not plugin_settings . get ( 'rsync_path' , 'rsync' ) : raise ValueError ( 'reexec: rsync_path must not be empty. Please check the settings.' ) servers = plugin_settings . get ( "servers" , [ ] ) unique_names = set ( ) required_parameters = [ 'name' , 'root_directory' , 'host' ] nonempty_parameters = [ 'name' , 'root_directory' , 'host' ] for s in servers : for param in required_parameters : if param not in s : raise ValueError ( 'reexec: "{0}" parameter is required. Please check the settings.' . format ( param ) ) for param in nonempty_parameters : if param in s and len ( s [ param ] ) == 0 : raise ValueError ( 'reexec: "{0}" parameter must not be empty. Please check the settings.' . format ( param ) ) if s [ 'name' ] in unique_names : raise ValueError ( 'reexec: duplicate "{0}" servers' . format ( s [ 'name' ] ) ) unique_names . add ( s [ 'name' ] )
short_docstring: This function checks settings for sanity.
short_docstring_tokens: This function checks settings for sanity .
comment: """This function checks settings for sanity."""