db2a9d3a62e36db12066c980d180377fffb31fcc,deploy/rule_generator/rule_generator.py,,run,#Any#Any#,38

Before Change


    config_path (str): Path to the deployment config yaml file.
    output_dir (str): Path to the output directory.
  
  project_configs, global_config = load_all_project_configs(config_path)

  for generator in SCANNER_RULE_GENERATORS:
    rules = generator.generate_rules(project_configs, global_config)

After Change



  if output_path.startswith("gs://"):
    // output path is a GCS bucket
    with tempfile.TemporaryDirectory() as tmp_dir:
      _write_rules(deployment_config, tmp_dir)
      logging.info("Copying rules files to %s", output_path)
      runner.run_command([
          "gsutil", "cp",
          os.path.join(tmp_dir, "*.yaml"),
          posixpath.join(output_path, "rules"),
      ])
  else:
    // output path is a local directory
    _write_rules(deployment_config, output_path)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: GoogleCloudPlatform/healthcare
Commit Name: db2a9d3a62e36db12066c980d180377fffb31fcc
Time: 2018-11-29
Author: noreply@google.com
File Name: deploy/rule_generator/rule_generator.py
Class Name:
Method Name: run


Project Name: nipy/dipy
Commit Name: 7d93ebdcbac673beb7fd9a229dc68115f0e93557
Time: 2015-10-07
Author: arokem@gmail.com
File Name: dipy/data/tests/test_fetcher.py
Class Name:
Method Name: test_make_fetcher


Project Name: matplotlib/matplotlib
Commit Name: faeb7af99797e67e469b5f61b4970437417cd859
Time: 2018-04-18
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/tests/test_backend_pgf.py
Class Name:
Method Name: check_for