Gets information about the plugins installed on server (filename, checksum)
971941
private InstalledPlugin[] listInstalledPlugins() {
    Profiler profiler = Profiler.create(LOG).startInfo("Load plugins index");
    GetRequest getRequest = new GetRequest(PLUGINS_WS_URL);
    InstalledPlugins installedPlugins;
    try (Reader reader = wsClient.call(getRequest).contentReader()) {
      installedPlugins = new Gson().fromJson(reader, InstalledPlugins.class);
    } catch (Exception e) {
      throw new IllegalStateException("Fail to parse response of " + PLUGINS_WS_URL, e);
    }

    profiler.stopInfo();
    return installedPlugins.plugins;
  }
1226345
def list_local_plugins(plugin_type, plugins_path, plugin_details):
    """"""
    installed_plugins = list()
    for plugin in next(os.walk(plugins_path))[1]:
        s = plugin_details(plugin)
        installed_plugins.append(plugin)
        click.secho(s)

    if not installed_plugins:
        click.secho("[*] You do not have any {0}s installed, "
                    "try installing one with `honeycomb {0} install`".format(plugin_type))

    return installed_plugins
153453
def get_plugin_folders():
    """"""
    folders = []
    defaultfolder = normpath("~/.linkchecker/plugins")
    if not os.path.exists(defaultfolder) and not Portable:
        try:
            make_userdir(defaultfolder)
        except Exception as errmsg:
            msg = _("could not create plugin directory %(dirname)r: %(errmsg)r")
            args = dict(dirname=defaultfolder, errmsg=errmsg)
            log.warn(LOG_CHECK, msg % args)
    if os.path.exists(defaultfolder):
        folders.append(defaultfolder)
    return folders
944646
public function list_plugins()
    {
        $plugins    = array();
        $plugin_dir = INSTALL_PATH . 'plugins/';

        foreach (glob($plugin_dir . '*') as $path) {
            if (!is_dir($path)) {
                continue;
            }

            if (is_readable($path . '/composer.json')) {
                $file_json   = json_decode(file_get_contents($path . '/composer.json'));
                $plugin_desc = $file_json->description ?: 'N/A';
            }
            else {
                $plugin_desc = 'N/A';
            }

            $name      = substr($path, strlen($plugin_dir));
            $plugins[] = array(
                'name'    => $name,
                'desc'    => $plugin_desc,
                'enabled' => in_array($name, (array) $this->config['plugins'])
            );
        }

        return $plugins;
    }
263074
function findDefaultPlugins() {
  const globPath = path.join(__dirname, BUILT_IN_DEFAULT_PLUGIN_FOLDER_NAME);
  if (!fs.existsSync(globPath)) {
    return [];
  }
  return walkSync(globPath, {
    directories: false,
    globs: [`${MARKBIND_PLUGIN_PREFIX}*.js`],
  }).map(file => path.parse(file).name);
}
795258
def find_plugins():
     
    plugin_dir = os.path.dirname(os.path.realpath(__file__))
    plugin_dir = os.path.join(plugin_dir, "plugins")
    plugin_files = [x[:-3] for x in os.listdir(plugin_dir) if x.endswith(".py")]
    sys.path.insert(0, plugin_dir)
    for plugin in plugin_files:
        __import__(plugin)
639273
def _GetPluginData(self):
    
    return_dict = {}

    return_dict['Versions'] = [
        ('plaso engine', plaso.__version__),
        ('python', sys.version)]

    hashers_information = hashers_manager.HashersManager.GetHashersInformation()
    parsers_information = parsers_manager.ParsersManager.GetParsersInformation()
    plugins_information = (
        parsers_manager.ParsersManager.GetParserPluginsInformation())
    presets_information = parsers_manager.ParsersManager.GetPresetsInformation()

    return_dict['Hashers'] = hashers_information
    return_dict['Parsers'] = parsers_information
    return_dict['Parser Plugins'] = plugins_information
    return_dict['Parser Presets'] = presets_information

    return return_dict
119796
function getModulesList(config, installESLint) {
    const modules = {};

    // Create a list of modules which should be installed based on config
    if (config.plugins) {
        for (const plugin of config.plugins) {
            modules[`eslint-plugin-${plugin}`] = "latest";
        }
    }
    if (config.extends && config.extends.indexOf("eslint:") === -1) {
        const moduleName = `eslint-config-${config.extends}`;

        modules[moduleName] = "latest";
        Object.assign(
            modules,
            getPeerDependencies(`${moduleName}@latest`)
        );
    }

    if (installESLint === false) {
        delete modules.eslint;
    } else {
        const installStatus = npmUtils.checkDevDeps(["eslint"]);

        // Mark to show messages if it's new installation of eslint.
        if (installStatus.eslint === false) {
            log.info("Local ESLint installation not found.");
            modules.eslint = modules.eslint || "latest";
            config.installedESLint = true;
        }
    }

    return Object.keys(modules).map(name => `${name}@${modules[name]}`);
}
707364
function info($plugin_name)
	{
		if(isset($this->plugins[$plugin_name])) return $this->plugins[$plugin_name];
		return false;
	}
1087418
def get_plugin_info(plugin):
    
    url = 'https://pypi.python.org/pypi/{}/json'.format(plugin)

    try:
        resp = request.urlopen(url)
    except HTTPError as e:
        if e.code == 404:
            raise NameError("Plugin {} could not be found.".format(plugin))
        else:
            raise ValueError(
                "Checking plugin status on {} returned HTTP code {}".format(
                    url, resp.getcode()
                )
            )

    try:
        json_resp = json.loads(resp.read().decode())
    # Catch ValueError instead of JSONDecodeError which is only available in
    # Python 3.5+
    except ValueError:
        raise ValueError(
            "Could not decode JSON info for plugin at {}".format(url)
        )

    return json_resp['info']
380728
def _get_nits(self, filename):
    
    try:
      python_file = PythonFile.parse(filename, root=self._root_dir)
    except CheckSyntaxError as e:
      yield e.as_nit()
      return

    if noqa_file_filter(python_file):
      return

    if self._excluder:
      # Filter out any suppressed plugins
      check_plugins = [(plugin_name, plugin_factory)
                       for plugin_name, plugin_factory in self._plugin_factories.items()
                       if self._excluder.should_include(filename, plugin_name)]
    else:
      check_plugins = self._plugin_factories.items()

    for plugin_name, plugin_factory in check_plugins:
      for i, nit in enumerate(plugin_factory(python_file)):
        if i == 0:
          # NB: Add debug log header for nits from each plugin, but only if there are nits from it.
          self.log.debug('Nits from plugin {} for {}'.format(plugin_name, filename))

        if not nit.has_lines_to_display:
          yield nit
          continue

        if all(not line_contains_noqa(line) for line in nit.lines):
          yield nit
1196738
def get_installed_plugins():
    
    return {
        # Strip the first five characters from the plugin name since all
        # plugins are expected to start with `taxi-`
        backend.dist.project_name[5:]: backend.dist.version
        for backend in backends_registry._entry_points.values()
        if backend.dist.project_name != 'taxi'
    }
1102192
function checkHostmask (hostmask, admin) {
            return names.every(function (name) {
                const result = admin[name].test(hostmask[name]);

                client.debug("PluginAdmin", format("%s: %s, %s (%s)",
                    name, hostmask[name], admin[name], result));

                return result;
            });
        }
135979
function check(content, deps, path) {
  if (
    // Pattern: import plugins from 'gulp-load-plugins', $ = plugins(), $.jshint()
    importDetector(path.node)[0] === 'gulp-load-plugins'
    && path.isImportDeclaration()
    && path.get('specifiers')[0]
    && path.get('specifiers')[0].isImportDefaultSpecifier()
    && path.get('specifiers')[0].get('local').isIdentifier()
  ) {
    const importVariableName = path.get('specifiers')[0].get('local').node.name;
    const identifierReferences = getIdentifierReferences(path, importVariableName);
    const packageNames = identifierReferences.map(r => getPackageName(content, deps, r));
    return packageNames;
  }
  if (

    // Pattern: plugins = require('gulp-load-plugins'), $ = plugins(), $.jshint()
    requireDetector(path.node)[0] === 'gulp-load-plugins'
    && path.isCallExpression()
    && path.parentPath.isVariableDeclarator()
    && path.parentPath.get('id').isIdentifier()
  ) {
    const requireVariableName = path.parentPath.get('id').node.name;
    const identifierReferences = getIdentifierReferences(path, requireVariableName);
    const packageNames = identifierReferences.map(r => getPackageName(content, deps, r));
    return packageNames;
  }
  if (

    // Pattern: $ = require('gulp-load-plugins')(), $.jshint()
    requireDetector(path.node)[0] === 'gulp-load-plugins'
    && path.isCallExpression()
    && path.parentPath.isCallExpression()
    && path.parentPath.parentPath.isVariableDeclarator()
    && path.parentPath.parentPath.get('id').isIdentifier()
  ) {
    const requireVariableName = path.parentPath.parentPath.get('id').node.name;
    const identifierReferences = getReferences(path, requireVariableName);
    const packageNames = identifierReferences.map(r => getPackageName(content, deps, r));
    return packageNames;
  }
  if (

    // Pattern: require('gulp-load-plugins')().thisPlugin()
    requireDetector(path.node)[0] === 'gulp-load-plugins'
    && path.isCallExpression()
    && path.parentPath.isCallExpression()
    && path.parentPath.parentPath.isMemberExpression()
  ) {
    const packageName = getPackageName(content, deps, path.parentPath);
    return [packageName];
  }

  return [];
}
1140518
def is_plugin_installed(name):
    
    for directory in plugin_paths:
        if isdir(join(directory, name)):
            return True
    return False
529076
def inspect_plugin(self, name):
        
        url = self._url('/plugins/{0}/json', name)
        return self._result(self._get(url), True)
1350964
def get_plugins_from_dir(dir_path, classbase):
    """"""

    if dir_path == "sys":
        dir_path = os.path.abspath(
            os.path.join(os.path.dirname(__file__), 'plugins'))
        dir_plugins = get_plugins(dir_path)
        return {"dir": dir_path, "plugins": dir_plugins, "class": classbase}

    if dir_path == ".":
        dir_path = os.path.expanduser(
            os.path.expandvars(os.path.join(os.getcwd(), 'plugins')))
        dir_plugins = get_plugins(dir_path)
        return {"dir": dir_path, "plugins": dir_plugins, "class": classbase}
    else:

        dir_path = os.path.expanduser(os.path.expandvars(dir_path))
        prefix = "{0}/{1}".format(dir_path, classbase)

        user_path = "{0}/plugins".format(prefix)

        create_dir(user_path)
        create_file("{0}/__init__.py".format(prefix))
        create_file("{0}/plugins/__init__.py".format(prefix))
        sys.path.append(os.path.expanduser(dir_path))
        dir_plugins = get_plugins(user_path)
        # pprint({"dir": dir_path, "plugins": dir_plugins, "class": classbase})
        return {"dir": dir_path, "plugins": dir_plugins, "class": classbase}