codecov-cli 0.7.6__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. {codecov-cli-0.7.6/codecov_cli.egg-info → codecov-cli-0.8.0}/PKG-INFO +1 -1
  2. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/upload.py +30 -0
  3. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/upload_process.py +43 -33
  4. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/plugins/__init__.py +20 -6
  5. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/plugins/gcov.py +13 -11
  6. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/plugins/xcode.py +5 -4
  7. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload/__init__.py +22 -2
  8. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload/upload_collector.py +2 -0
  9. {codecov-cli-0.7.6 → codecov-cli-0.8.0/codecov_cli.egg-info}/PKG-INFO +1 -1
  10. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/setup.py +1 -1
  11. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/LICENSE +0 -0
  12. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/MANIFEST.in +0 -0
  13. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/README.md +0 -0
  14. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/__init__.py +0 -0
  15. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/__init__.py +0 -0
  16. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/base_picking.py +0 -0
  17. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/commit.py +0 -0
  18. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/create_report_result.py +0 -0
  19. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/empty_upload.py +0 -0
  20. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/get_report_results.py +0 -0
  21. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/labelanalysis.py +0 -0
  22. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/process_test_results.py +0 -0
  23. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/report.py +0 -0
  24. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/send_notifications.py +0 -0
  25. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/commands/staticanalysis.py +0 -0
  26. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/fallbacks.py +0 -0
  27. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/__init__.py +0 -0
  28. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/args.py +0 -0
  29. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/__init__.py +0 -0
  30. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/appveyor_ci.py +0 -0
  31. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/azure_pipelines.py +0 -0
  32. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/base.py +0 -0
  33. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/bitbucket_ci.py +0 -0
  34. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/bitrise_ci.py +0 -0
  35. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/buildkite.py +0 -0
  36. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/circleci.py +0 -0
  37. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/cirrus_ci.py +0 -0
  38. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/cloudbuild.py +0 -0
  39. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/codebuild.py +0 -0
  40. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/droneci.py +0 -0
  41. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/github_actions.py +0 -0
  42. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/gitlab_ci.py +0 -0
  43. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/heroku.py +0 -0
  44. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/jenkins.py +0 -0
  45. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/local.py +0 -0
  46. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/teamcity.py +0 -0
  47. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/travis_ci.py +0 -0
  48. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/ci_adapters/woodpeckerci.py +0 -0
  49. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/config.py +0 -0
  50. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/encoder.py +0 -0
  51. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/folder_searcher.py +0 -0
  52. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/git.py +0 -0
  53. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/git_services/__init__.py +0 -0
  54. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/git_services/github.py +0 -0
  55. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/logging_utils.py +0 -0
  56. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/options.py +0 -0
  57. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/request.py +0 -0
  58. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/validators.py +0 -0
  59. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/helpers/versioning_systems.py +0 -0
  60. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/main.py +0 -0
  61. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/plugins/compress_pycoverage_contexts.py +0 -0
  62. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/plugins/pycoverage.py +0 -0
  63. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/plugins/types.py +0 -0
  64. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/runners/__init__.py +0 -0
  65. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/runners/dan_runner.py +0 -0
  66. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/runners/pytest_standard_runner.py +0 -0
  67. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/runners/types.py +0 -0
  68. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/__init__.py +0 -0
  69. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/commit/__init__.py +0 -0
  70. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/commit/base_picking.py +0 -0
  71. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/empty_upload/__init__.py +0 -0
  72. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/report/__init__.py +0 -0
  73. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/__init__.py +0 -0
  74. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/analyzers/__init__.py +0 -0
  75. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/analyzers/general.py +0 -0
  76. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/analyzers/javascript_es6/__init__.py +0 -0
  77. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/analyzers/javascript_es6/node_wrappers.py +0 -0
  78. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/analyzers/python/__init__.py +0 -0
  79. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/analyzers/python/node_wrappers.py +0 -0
  80. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/exceptions.py +0 -0
  81. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/finders.py +0 -0
  82. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/staticanalysis/types.py +0 -0
  83. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload/file_finder.py +0 -0
  84. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload/legacy_upload_sender.py +0 -0
  85. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload/network_finder.py +0 -0
  86. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload/upload_sender.py +0 -0
  87. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/services/upload_completion/__init__.py +0 -0
  88. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli/types.py +0 -0
  89. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli.egg-info/SOURCES.txt +0 -0
  90. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli.egg-info/dependency_links.txt +0 -0
  91. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli.egg-info/entry_points.txt +0 -0
  92. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli.egg-info/requires.txt +0 -0
  93. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/codecov_cli.egg-info/top_level.txt +0 -0
  94. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/languages.c +0 -0
  95. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/treesitterjavascript/src/parser.c +0 -0
  96. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/treesitterjavascript/src/scanner.c +0 -0
  97. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/treesitterjavascript/src/tree_sitter/parser.h +0 -0
  98. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/treesitterpython/src/parser.c +0 -0
  99. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/treesitterpython/src/scanner.cc +0 -0
  100. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/languages/treesitterpython/src/tree_sitter/parser.h +0 -0
  101. {codecov-cli-0.7.6 → codecov-cli-0.8.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codecov-cli
3
- Version: 0.7.6
3
+ Version: 0.8.0
4
4
  Summary: Codecov Command Line Interface
5
5
  Author: Codecov
6
6
  Author-email: support@codecov.io
@@ -178,6 +178,26 @@ _global_upload_options = [
178
178
  "--network-prefix",
179
179
  help="Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing",
180
180
  ),
181
+ click.option(
182
+ "--gcov-args",
183
+ help="Extra arguments to pass to gcov",
184
+ ),
185
+ click.option(
186
+ "--gcov-ignore",
187
+ help="Paths to ignore during gcov gathering",
188
+ ),
189
+ click.option(
190
+ "--gcov-include",
191
+ help="Paths to include during gcov gathering",
192
+ ),
193
+ click.option(
194
+ "--gcov-executable",
195
+ help="gcov executable to run. Defaults to 'gcov'",
196
+ ),
197
+ click.option(
198
+ "--swift-project",
199
+ help="Specify the swift project",
200
+ ),
181
201
  ]
182
202
 
183
203
 
@@ -207,6 +227,10 @@ def do_upload(
207
227
  files_search_explicitly_listed_files: typing.List[pathlib.Path],
208
228
  files_search_root_folder: pathlib.Path,
209
229
  flags: typing.List[str],
230
+ gcov_args: typing.Optional[str],
231
+ gcov_executable: typing.Optional[str],
232
+ gcov_ignore: typing.Optional[str],
233
+ gcov_include: typing.Optional[str],
210
234
  git_service: typing.Optional[str],
211
235
  handle_no_reports_found: bool,
212
236
  job_code: typing.Optional[str],
@@ -218,6 +242,7 @@ def do_upload(
218
242
  pull_request_number: typing.Optional[str],
219
243
  report_type: str,
220
244
  slug: typing.Optional[str],
245
+ swift_project: typing.Optional[str],
221
246
  token: typing.Optional[str],
222
247
  use_legacy_uploader: bool,
223
248
  ):
@@ -251,6 +276,10 @@ def do_upload(
251
276
  files_search_explicitly_listed_files=list(files_search_explicitly_listed_files),
252
277
  files_search_root_folder=files_search_root_folder,
253
278
  flags=flags,
279
+ gcov_args=gcov_args,
280
+ gcov_executable=gcov_executable,
281
+ gcov_ignore=gcov_ignore,
282
+ gcov_include=gcov_include,
254
283
  git_service=git_service,
255
284
  handle_no_reports_found=handle_no_reports_found,
256
285
  job_code=job_code,
@@ -262,6 +291,7 @@ def do_upload(
262
291
  pull_request_number=pull_request_number,
263
292
  report_code=report_code,
264
293
  slug=slug,
294
+ swift_project=swift_project,
265
295
  token=token,
266
296
  upload_file_type=report_type,
267
297
  use_legacy_uploader=use_legacy_uploader,
@@ -25,34 +25,39 @@ logger = logging.getLogger("codecovcli")
25
25
  @click.pass_context
26
26
  def upload_process(
27
27
  ctx: CommandContext,
28
- commit_sha: str,
29
- report_code: str,
28
+ branch: typing.Optional[str],
30
29
  build_code: typing.Optional[str],
31
30
  build_url: typing.Optional[str],
32
- job_code: typing.Optional[str],
31
+ commit_sha: str,
32
+ disable_file_fixes: bool,
33
+ disable_search: bool,
34
+ dry_run: bool,
33
35
  env_vars: typing.Dict[str, str],
36
+ fail_on_error: bool,
37
+ files_search_exclude_folders: typing.List[pathlib.Path],
38
+ files_search_explicitly_listed_files: typing.List[pathlib.Path],
39
+ files_search_root_folder: pathlib.Path,
34
40
  flags: typing.List[str],
41
+ gcov_args: typing.Optional[str],
42
+ gcov_executable: typing.Optional[str],
43
+ gcov_ignore: typing.Optional[str],
44
+ gcov_include: typing.Optional[str],
45
+ git_service: typing.Optional[str],
46
+ handle_no_reports_found: bool,
47
+ job_code: typing.Optional[str],
35
48
  name: typing.Optional[str],
36
49
  network_filter: typing.Optional[str],
37
50
  network_prefix: typing.Optional[str],
38
51
  network_root_folder: pathlib.Path,
39
- files_search_root_folder: pathlib.Path,
40
- files_search_exclude_folders: typing.List[pathlib.Path],
41
- files_search_explicitly_listed_files: typing.List[pathlib.Path],
42
- disable_search: bool,
43
- disable_file_fixes: bool,
44
- token: typing.Optional[str],
52
+ parent_sha: typing.Optional[str],
45
53
  plugin_names: typing.List[str],
46
- branch: typing.Optional[str],
47
- slug: typing.Optional[str],
48
54
  pull_request_number: typing.Optional[str],
49
- use_legacy_uploader: bool,
50
- fail_on_error: bool,
51
- dry_run: bool,
52
- git_service: typing.Optional[str],
53
- parent_sha: typing.Optional[str],
54
- handle_no_reports_found: bool,
55
+ report_code: str,
55
56
  report_type: str,
57
+ slug: typing.Optional[str],
58
+ swift_project: typing.Optional[str],
59
+ token: typing.Optional[str],
60
+ use_legacy_uploader: bool,
56
61
  ):
57
62
  args = get_cli_args(ctx)
58
63
  logger.debug(
@@ -85,31 +90,36 @@ def upload_process(
85
90
  )
86
91
  ctx.invoke(
87
92
  do_upload,
88
- commit_sha=commit_sha,
89
- report_code=report_code,
93
+ branch=branch,
90
94
  build_code=build_code,
91
95
  build_url=build_url,
92
- job_code=job_code,
96
+ commit_sha=commit_sha,
97
+ disable_file_fixes=disable_file_fixes,
98
+ disable_search=disable_search,
99
+ dry_run=dry_run,
93
100
  env_vars=env_vars,
101
+ fail_on_error=fail_on_error,
102
+ files_search_exclude_folders=files_search_exclude_folders,
103
+ files_search_explicitly_listed_files=files_search_explicitly_listed_files,
104
+ files_search_root_folder=files_search_root_folder,
94
105
  flags=flags,
106
+ gcov_args=gcov_args,
107
+ gcov_executable=gcov_executable,
108
+ gcov_ignore=gcov_ignore,
109
+ gcov_include=gcov_include,
110
+ git_service=git_service,
111
+ handle_no_reports_found=handle_no_reports_found,
112
+ job_code=job_code,
95
113
  name=name,
96
114
  network_filter=network_filter,
97
115
  network_prefix=network_prefix,
98
116
  network_root_folder=network_root_folder,
99
- files_search_root_folder=files_search_root_folder,
100
- files_search_exclude_folders=files_search_exclude_folders,
101
- files_search_explicitly_listed_files=files_search_explicitly_listed_files,
102
- disable_search=disable_search,
103
- token=token,
104
117
  plugin_names=plugin_names,
105
- branch=branch,
106
- slug=slug,
107
118
  pull_request_number=pull_request_number,
108
- use_legacy_uploader=use_legacy_uploader,
109
- fail_on_error=fail_on_error,
110
- dry_run=dry_run,
111
- git_service=git_service,
112
- handle_no_reports_found=handle_no_reports_found,
113
- disable_file_fixes=disable_file_fixes,
119
+ report_code=report_code,
114
120
  report_type=report_type,
121
+ slug=slug,
122
+ swift_project=swift_project,
123
+ token=token,
124
+ use_legacy_uploader=use_legacy_uploader,
115
125
  )
@@ -17,12 +17,17 @@ class NoopPlugin(object):
17
17
  pass
18
18
 
19
19
 
20
- def select_preparation_plugins(cli_config: typing.Dict, plugin_names: typing.List[str]):
21
- plugins = [_get_plugin(cli_config, p) for p in plugin_names]
20
+ def select_preparation_plugins(
21
+ cli_config: typing.Dict, plugin_names: typing.List[str], plugin_config: typing.Dict
22
+ ):
23
+ plugins = [_get_plugin(cli_config, p, plugin_config) for p in plugin_names]
22
24
  logger.debug(
23
25
  "Selected preparation plugins",
24
26
  extra=dict(
25
- extra_log_attributes=dict(selected_plugins=list(map(type, plugins)))
27
+ extra_log_attributes=dict(
28
+ selected_plugins=list(map(type, plugins)),
29
+ cli_config=cli_config,
30
+ )
26
31
  ),
27
32
  )
28
33
  return plugins
@@ -59,16 +64,25 @@ def _load_plugin_from_yaml(plugin_dict: typing.Dict):
59
64
  return NoopPlugin()
60
65
 
61
66
 
62
- def _get_plugin(cli_config, plugin_name):
67
+ def _get_plugin(cli_config, plugin_name, plugin_config):
63
68
  if plugin_name == "noop":
64
69
  return NoopPlugin()
65
70
  if plugin_name == "gcov":
66
- return GcovPlugin()
71
+ return GcovPlugin(
72
+ plugin_config.get("project_root", None),
73
+ plugin_config.get("folders_to_ignore", None),
74
+ plugin_config.get("gcov_executable", "gcov"),
75
+ plugin_config.get("gcov_include", None),
76
+ plugin_config.get("gcov_ignore", None),
77
+ plugin_config.get("gcov_args", None),
78
+ )
67
79
  if plugin_name == "pycoverage":
68
80
  config = cli_config.get("plugins", {}).get("pycoverage", {})
69
81
  return Pycoverage(config)
70
82
  if plugin_name == "xcode":
71
- return XcodePlugin()
83
+ return XcodePlugin(
84
+ plugin_config.get("swift_project", None),
85
+ )
72
86
  if plugin_name == "compress-pycoverage":
73
87
  config = cli_config.get("plugins", {}).get("compress-pycoverage", {})
74
88
  return CompressPycoverageContexts(config)
@@ -15,24 +15,26 @@ class GcovPlugin(object):
15
15
  def __init__(
16
16
  self,
17
17
  project_root: typing.Optional[pathlib.Path] = None,
18
+ folders_to_ignore: typing.Optional[typing.List[str]] = None,
19
+ executable: typing.Optional[str] = "gcov",
18
20
  patterns_to_include: typing.Optional[typing.List[str]] = None,
19
21
  patterns_to_ignore: typing.Optional[typing.List[str]] = None,
20
- folders_to_ignore: typing.Optional[typing.List[str]] = None,
21
22
  extra_arguments: typing.Optional[typing.List[str]] = None,
22
23
  ):
23
- self.project_root = project_root or pathlib.Path(os.getcwd())
24
- self.patterns_to_include = patterns_to_include or []
25
- self.patterns_to_ignore = patterns_to_ignore or []
26
- self.folders_to_ignore = folders_to_ignore or []
24
+ self.executable = executable or "gcov"
27
25
  self.extra_arguments = extra_arguments or []
26
+ self.folders_to_ignore = folders_to_ignore or []
27
+ self.patterns_to_ignore = patterns_to_ignore or []
28
+ self.patterns_to_include = patterns_to_include or []
29
+ self.project_root = project_root or pathlib.Path(os.getcwd())
28
30
 
29
31
  def run_preparation(self, collector) -> PreparationPluginReturn:
30
32
  logger.debug(
31
- "Running gcov plugin...",
33
+ f"Running {self.executable} plugin...",
32
34
  )
33
35
 
34
- if shutil.which("gcov") is None:
35
- logger.warning("gcov is not installed or can't be found.")
36
+ if shutil.which(self.executable) is None:
37
+ logger.warning(f"{self.executable} is not installed or can't be found.")
36
38
  return
37
39
 
38
40
  filename_include_regex = globs_to_regex(["*.gcno", *self.patterns_to_include])
@@ -49,15 +51,15 @@ class GcovPlugin(object):
49
51
  ]
50
52
 
51
53
  if not matched_paths:
52
- logger.warning("No gcov data found.")
54
+ logger.warning(f"No {self.executable} data found.")
53
55
  return
54
56
 
55
- logger.warning("Running gcov on the following list of files:")
57
+ logger.warning(f"Running {self.executable} on the following list of files:")
56
58
  for path in matched_paths:
57
59
  logger.warning(path)
58
60
 
59
61
  s = subprocess.run(
60
- ["gcov", "-pb", *self.extra_arguments, *matched_paths],
62
+ [self.executable, "-pb", *self.extra_arguments, *matched_paths],
61
63
  cwd=self.project_root,
62
64
  capture_output=True,
63
65
  )
@@ -16,12 +16,13 @@ logger = logging.getLogger("codecovcli")
16
16
  class XcodePlugin(object):
17
17
  def __init__(
18
18
  self,
19
+ app_name: typing.Optional[str] = None,
19
20
  derived_data_folder: typing.Optional[pathlib.Path] = None,
20
- app_name: typing.Optional[pathlib.Path] = None,
21
21
  ):
22
- self.derived_data_folder = pathlib.Path(
23
- derived_data_folder or "~/Library/Developer/Xcode/DerivedData"
24
- ).expanduser()
22
+ self.derived_data_folder = (
23
+ derived_data_folder
24
+ or pathlib.Path("~/Library/Developer/Xcode/DerivedData").expanduser()
25
+ )
25
26
 
26
27
  # this is to speed up processing and to build reports for the project being tested,
27
28
  # if empty the plugin will build reports for every xcode project it finds
@@ -40,6 +40,10 @@ def do_upload_logic(
40
40
  files_search_explicitly_listed_files: typing.List[Path],
41
41
  files_search_root_folder: Path,
42
42
  flags: typing.List[str],
43
+ gcov_args: typing.Optional[str],
44
+ gcov_executable: typing.Optional[str],
45
+ gcov_ignore: typing.Optional[str],
46
+ gcov_include: typing.Optional[str],
43
47
  git_service: typing.Optional[str],
44
48
  handle_no_reports_found: bool = False,
45
49
  job_code: typing.Optional[str],
@@ -51,12 +55,24 @@ def do_upload_logic(
51
55
  pull_request_number: typing.Optional[str],
52
56
  report_code: str,
53
57
  slug: typing.Optional[str],
58
+ swift_project: typing.Optional[str],
54
59
  token: str,
55
60
  upload_file_type: str = "coverage",
56
61
  use_legacy_uploader: bool = False,
57
62
  ):
63
+ plugin_config = {
64
+ "folders_to_ignore": files_search_exclude_folders,
65
+ "gcov_args": gcov_args,
66
+ "gcov_executable": gcov_executable,
67
+ "gcov_ignore": gcov_ignore,
68
+ "gcov_include": gcov_include,
69
+ "project_root": files_search_root_folder,
70
+ "swift_project": swift_project,
71
+ }
58
72
  if upload_file_type == "coverage":
59
- preparation_plugins = select_preparation_plugins(cli_config, plugin_names)
73
+ preparation_plugins = select_preparation_plugins(
74
+ cli_config, plugin_names, plugin_config
75
+ )
60
76
  elif upload_file_type == "test_results":
61
77
  preparation_plugins = []
62
78
  file_selector = select_file_finder(
@@ -73,7 +89,11 @@ def do_upload_logic(
73
89
  network_root_folder=network_root_folder,
74
90
  )
75
91
  collector = UploadCollector(
76
- preparation_plugins, network_finder, file_selector, disable_file_fixes
92
+ preparation_plugins,
93
+ network_finder,
94
+ file_selector,
95
+ disable_file_fixes,
96
+ plugin_config,
77
97
  )
78
98
  try:
79
99
  upload_data = collector.generate_upload_data(upload_file_type)
@@ -29,12 +29,14 @@ class UploadCollector(object):
29
29
  preparation_plugins: typing.List[PreparationPluginInterface],
30
30
  network_finder: NetworkFinder,
31
31
  file_finder: FileFinder,
32
+ plugin_config: dict,
32
33
  disable_file_fixes: bool = False,
33
34
  ):
34
35
  self.preparation_plugins = preparation_plugins
35
36
  self.network_finder = network_finder
36
37
  self.file_finder = file_finder
37
38
  self.disable_file_fixes = disable_file_fixes
39
+ self.plugin_config = plugin_config
38
40
 
39
41
  def _produce_file_fixes(
40
42
  self, files: typing.List[str]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codecov-cli
3
- Version: 0.7.6
3
+ Version: 0.8.0
4
4
  Summary: Codecov Command Line Interface
5
5
  Author: Codecov
6
6
  Author-email: support@codecov.io
@@ -10,7 +10,7 @@ with open(path.join(here, "README.md"), encoding="utf-8") as f:
10
10
 
11
11
  setup(
12
12
  name="codecov-cli",
13
- version="0.7.6",
13
+ version="0.8.0",
14
14
  packages=find_packages(exclude=["contrib", "docs", "tests*"]),
15
15
  description="Codecov Command Line Interface",
16
16
  long_description=long_description,
File without changes
File without changes
File without changes
File without changes