codecov-cli 0.4.9__tar.gz → 0.5.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.
- {codecov-cli-0.4.9/codecov_cli.egg-info → codecov-cli-0.5.0}/PKG-INFO +1 -1
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/upload.py +60 -46
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/upload_process.py +2 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/upload/__init__.py +24 -17
- codecov-cli-0.5.0/codecov_cli/services/upload/network_finder.py +43 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/upload/upload_collector.py +10 -10
- {codecov-cli-0.4.9 → codecov-cli-0.5.0/codecov_cli.egg-info}/PKG-INFO +1 -1
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/setup.py +1 -1
- codecov-cli-0.4.9/codecov_cli/services/upload/network_finder.py +0 -21
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/LICENSE +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/MANIFEST.in +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/README.md +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/base_picking.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/commit.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/create_report_result.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/empty_upload.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/get_report_results.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/labelanalysis.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/report.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/send_notifications.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/commands/staticanalysis.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/fallbacks.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/appveyor_ci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/azure_pipelines.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/base.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/bitbucket_ci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/bitrise_ci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/buildkite.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/circleci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/cirrus_ci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/codebuild.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/droneci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/github_actions.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/gitlab_ci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/heroku.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/jenkins.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/local.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/teamcity.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/travis_ci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/ci_adapters/woodpeckerci.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/config.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/encoder.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/folder_searcher.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/git.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/git_services/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/git_services/github.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/logging_utils.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/options.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/request.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/validators.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/helpers/versioning_systems.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/main.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/plugins/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/plugins/compress_pycoverage_contexts.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/plugins/gcov.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/plugins/pycoverage.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/plugins/types.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/plugins/xcode.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/runners/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/runners/dan_runner.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/runners/pytest_standard_runner.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/runners/types.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/commit/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/commit/base_picking.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/empty_upload/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/report/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/general.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/javascript_es6/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/javascript_es6/node_wrappers.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/python/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/python/node_wrappers.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/exceptions.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/finders.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/types.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/upload/file_finder.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/upload/legacy_upload_sender.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/upload/upload_sender.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/upload_completion/__init__.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/types.py +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli.egg-info/SOURCES.txt +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli.egg-info/dependency_links.txt +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli.egg-info/entry_points.txt +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli.egg-info/requires.txt +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli.egg-info/top_level.txt +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/languages.c +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterjavascript/src/parser.c +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterjavascript/src/scanner.c +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterjavascript/src/tree_sitter/parser.h +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterpython/src/parser.c +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterpython/src/scanner.cc +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterpython/src/tree_sitter/parser.h +0 -0
- {codecov-cli-0.4.9 → codecov-cli-0.5.0}/setup.cfg +0 -0
|
@@ -164,6 +164,14 @@ _global_upload_options = [
|
|
|
164
164
|
default="coverage",
|
|
165
165
|
type=click.Choice(["coverage", "test_results"]),
|
|
166
166
|
),
|
|
167
|
+
click.option(
|
|
168
|
+
"--network-filter",
|
|
169
|
+
help="Specify a filter on the files listed in the network section of the Codecov report. This will only add files whose path begin with the specified filter. Useful for upload-specific path fixing",
|
|
170
|
+
),
|
|
171
|
+
click.option(
|
|
172
|
+
"--network-prefix",
|
|
173
|
+
help="Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing",
|
|
174
|
+
),
|
|
167
175
|
]
|
|
168
176
|
|
|
169
177
|
|
|
@@ -181,29 +189,31 @@ def do_upload(
|
|
|
181
189
|
ctx: click.Context,
|
|
182
190
|
commit_sha: str,
|
|
183
191
|
report_code: str,
|
|
192
|
+
branch: typing.Optional[str],
|
|
184
193
|
build_code: typing.Optional[str],
|
|
185
194
|
build_url: typing.Optional[str],
|
|
186
|
-
|
|
195
|
+
disable_file_fixes: bool,
|
|
196
|
+
disable_search: bool,
|
|
197
|
+
dry_run: bool,
|
|
187
198
|
env_vars: typing.Dict[str, str],
|
|
199
|
+
fail_on_error: bool,
|
|
200
|
+
files_search_exclude_folders: typing.List[pathlib.Path],
|
|
201
|
+
files_search_explicitly_listed_files: typing.List[pathlib.Path],
|
|
202
|
+
files_search_root_folder: pathlib.Path,
|
|
188
203
|
flags: typing.List[str],
|
|
204
|
+
git_service: typing.Optional[str],
|
|
205
|
+
handle_no_reports_found: bool,
|
|
206
|
+
job_code: typing.Optional[str],
|
|
189
207
|
name: typing.Optional[str],
|
|
208
|
+
network_filter: typing.Optional[str],
|
|
209
|
+
network_prefix: typing.Optional[str],
|
|
190
210
|
network_root_folder: pathlib.Path,
|
|
191
|
-
files_search_root_folder: pathlib.Path,
|
|
192
|
-
files_search_exclude_folders: typing.List[pathlib.Path],
|
|
193
|
-
files_search_explicitly_listed_files: typing.List[pathlib.Path],
|
|
194
|
-
disable_search: bool,
|
|
195
|
-
disable_file_fixes: bool,
|
|
196
|
-
token: typing.Optional[str],
|
|
197
211
|
plugin_names: typing.List[str],
|
|
198
|
-
branch: typing.Optional[str],
|
|
199
|
-
slug: typing.Optional[str],
|
|
200
212
|
pull_request_number: typing.Optional[str],
|
|
201
|
-
use_legacy_uploader: bool,
|
|
202
|
-
fail_on_error: bool,
|
|
203
|
-
dry_run: bool,
|
|
204
|
-
git_service: typing.Optional[str],
|
|
205
|
-
handle_no_reports_found: bool,
|
|
206
213
|
report_type: str,
|
|
214
|
+
slug: typing.Optional[str],
|
|
215
|
+
token: typing.Optional[str],
|
|
216
|
+
use_legacy_uploader: bool,
|
|
207
217
|
):
|
|
208
218
|
versioning_system = ctx.obj["versioning_system"]
|
|
209
219
|
codecov_yaml = ctx.obj["codecov_yaml"] or {}
|
|
@@ -214,29 +224,31 @@ def do_upload(
|
|
|
214
224
|
"Starting upload processing",
|
|
215
225
|
extra=dict(
|
|
216
226
|
extra_log_attributes=dict(
|
|
217
|
-
|
|
218
|
-
commit_sha=commit_sha,
|
|
219
|
-
report_code=report_code,
|
|
227
|
+
branch=branch,
|
|
220
228
|
build_code=build_code,
|
|
221
229
|
build_url=build_url,
|
|
222
|
-
|
|
230
|
+
commit_sha=commit_sha,
|
|
231
|
+
disable_file_fixes=disable_file_fixes,
|
|
232
|
+
disable_search=disable_search,
|
|
233
|
+
enterprise_url=enterprise_url,
|
|
223
234
|
env_vars=env_vars,
|
|
235
|
+
files_search_exclude_folders=files_search_exclude_folders,
|
|
236
|
+
files_search_explicitly_listed_files=files_search_explicitly_listed_files,
|
|
237
|
+
files_search_root_folder=files_search_root_folder,
|
|
224
238
|
flags=flags,
|
|
239
|
+
git_service=git_service,
|
|
240
|
+
handle_no_reports_found=handle_no_reports_found,
|
|
241
|
+
job_code=job_code,
|
|
225
242
|
name=name,
|
|
243
|
+
network_filter=network_filter,
|
|
244
|
+
network_prefix=network_prefix,
|
|
226
245
|
network_root_folder=network_root_folder,
|
|
227
|
-
files_search_root_folder=files_search_root_folder,
|
|
228
|
-
files_search_exclude_folders=files_search_exclude_folders,
|
|
229
|
-
files_search_explicitly_listed_files=files_search_explicitly_listed_files,
|
|
230
246
|
plugin_names=plugin_names,
|
|
231
|
-
token=token,
|
|
232
|
-
branch=branch,
|
|
233
|
-
slug=slug,
|
|
234
247
|
pull_request_number=pull_request_number,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
handle_no_reports_found=handle_no_reports_found,
|
|
248
|
+
report_code=report_code,
|
|
249
|
+
slug=slug,
|
|
250
|
+
token=token,
|
|
251
|
+
upload_file_type=report_type,
|
|
240
252
|
)
|
|
241
253
|
),
|
|
242
254
|
)
|
|
@@ -244,30 +256,32 @@ def do_upload(
|
|
|
244
256
|
cli_config,
|
|
245
257
|
versioning_system,
|
|
246
258
|
ci_adapter,
|
|
247
|
-
|
|
248
|
-
commit_sha=commit_sha,
|
|
249
|
-
report_code=report_code,
|
|
259
|
+
branch=branch,
|
|
250
260
|
build_code=build_code,
|
|
251
261
|
build_url=build_url,
|
|
252
|
-
|
|
262
|
+
commit_sha=commit_sha,
|
|
263
|
+
disable_file_fixes=disable_file_fixes,
|
|
264
|
+
disable_search=disable_search,
|
|
265
|
+
dry_run=dry_run,
|
|
266
|
+
enterprise_url=enterprise_url,
|
|
253
267
|
env_vars=env_vars,
|
|
268
|
+
fail_on_error=fail_on_error,
|
|
269
|
+
files_search_exclude_folders=list(files_search_exclude_folders),
|
|
270
|
+
files_search_explicitly_listed_files=list(files_search_explicitly_listed_files),
|
|
271
|
+
files_search_root_folder=files_search_root_folder,
|
|
254
272
|
flags=flags,
|
|
273
|
+
git_service=git_service,
|
|
274
|
+
handle_no_reports_found=handle_no_reports_found,
|
|
275
|
+
job_code=job_code,
|
|
255
276
|
name=name,
|
|
277
|
+
network_filter=network_filter,
|
|
278
|
+
network_prefix=network_prefix,
|
|
256
279
|
network_root_folder=network_root_folder,
|
|
257
|
-
files_search_root_folder=files_search_root_folder,
|
|
258
|
-
files_search_exclude_folders=list(files_search_exclude_folders),
|
|
259
|
-
files_search_explicitly_listed_files=list(files_search_explicitly_listed_files),
|
|
260
280
|
plugin_names=plugin_names,
|
|
261
|
-
token=token,
|
|
262
|
-
branch=branch,
|
|
263
|
-
slug=slug,
|
|
264
281
|
pull_request_number=pull_request_number,
|
|
282
|
+
report_code=report_code,
|
|
283
|
+
slug=slug,
|
|
284
|
+
token=token,
|
|
285
|
+
upload_file_type=report_type,
|
|
265
286
|
use_legacy_uploader=use_legacy_uploader,
|
|
266
|
-
fail_on_error=fail_on_error,
|
|
267
|
-
dry_run=dry_run,
|
|
268
|
-
git_service=git_service,
|
|
269
|
-
enterprise_url=enterprise_url,
|
|
270
|
-
disable_search=disable_search,
|
|
271
|
-
handle_no_reports_found=handle_no_reports_found,
|
|
272
|
-
disable_file_fixes=disable_file_fixes,
|
|
273
287
|
)
|
|
@@ -31,6 +31,8 @@ def upload_process(
|
|
|
31
31
|
env_vars: typing.Dict[str, str],
|
|
32
32
|
flags: typing.List[str],
|
|
33
33
|
name: typing.Optional[str],
|
|
34
|
+
network_filter: typing.Optional[str],
|
|
35
|
+
network_prefix: typing.Optional[str],
|
|
34
36
|
network_root_folder: pathlib.Path,
|
|
35
37
|
files_search_root_folder: pathlib.Path,
|
|
36
38
|
files_search_exclude_folders: typing.List[pathlib.Path],
|
|
@@ -25,32 +25,34 @@ def do_upload_logic(
|
|
|
25
25
|
versioning_system: VersioningSystemInterface,
|
|
26
26
|
ci_adapter: CIAdapterBase,
|
|
27
27
|
*,
|
|
28
|
-
|
|
29
|
-
report_code: str,
|
|
28
|
+
branch: typing.Optional[str],
|
|
30
29
|
build_code: typing.Optional[str],
|
|
31
30
|
build_url: typing.Optional[str],
|
|
32
|
-
|
|
31
|
+
commit_sha: str,
|
|
32
|
+
disable_file_fixes: bool = False,
|
|
33
|
+
disable_search: bool = False,
|
|
34
|
+
dry_run: bool = False,
|
|
35
|
+
enterprise_url: typing.Optional[str],
|
|
33
36
|
env_vars: typing.Dict[str, str],
|
|
37
|
+
fail_on_error: bool = False,
|
|
38
|
+
files_search_exclude_folders: typing.List[Path],
|
|
39
|
+
files_search_explicitly_listed_files: typing.List[Path],
|
|
40
|
+
files_search_root_folder: Path,
|
|
34
41
|
flags: typing.List[str],
|
|
42
|
+
git_service: typing.Optional[str],
|
|
43
|
+
handle_no_reports_found: bool = False,
|
|
44
|
+
job_code: typing.Optional[str],
|
|
35
45
|
name: typing.Optional[str],
|
|
46
|
+
network_filter: typing.Optional[str],
|
|
47
|
+
network_prefix: typing.Optional[str],
|
|
36
48
|
network_root_folder: Path,
|
|
37
|
-
files_search_root_folder: Path,
|
|
38
|
-
files_search_exclude_folders: typing.List[Path],
|
|
39
|
-
files_search_explicitly_listed_files: typing.List[Path],
|
|
40
49
|
plugin_names: typing.List[str],
|
|
41
|
-
token: str,
|
|
42
|
-
branch: typing.Optional[str],
|
|
43
|
-
slug: typing.Optional[str],
|
|
44
50
|
pull_request_number: typing.Optional[str],
|
|
51
|
+
report_code: str,
|
|
52
|
+
slug: typing.Optional[str],
|
|
53
|
+
token: str,
|
|
45
54
|
upload_file_type: str = "coverage",
|
|
46
55
|
use_legacy_uploader: bool = False,
|
|
47
|
-
fail_on_error: bool = False,
|
|
48
|
-
dry_run: bool = False,
|
|
49
|
-
git_service: typing.Optional[str],
|
|
50
|
-
enterprise_url: typing.Optional[str],
|
|
51
|
-
disable_search: bool = False,
|
|
52
|
-
handle_no_reports_found: bool = False,
|
|
53
|
-
disable_file_fixes: bool = False,
|
|
54
56
|
):
|
|
55
57
|
if upload_file_type == "coverage":
|
|
56
58
|
preparation_plugins = select_preparation_plugins(cli_config, plugin_names)
|
|
@@ -63,7 +65,12 @@ def do_upload_logic(
|
|
|
63
65
|
disable_search,
|
|
64
66
|
upload_file_type,
|
|
65
67
|
)
|
|
66
|
-
network_finder = select_network_finder(
|
|
68
|
+
network_finder = select_network_finder(
|
|
69
|
+
versioning_system,
|
|
70
|
+
network_filter=network_filter,
|
|
71
|
+
network_prefix=network_prefix,
|
|
72
|
+
network_root_folder=network_root_folder,
|
|
73
|
+
)
|
|
67
74
|
collector = UploadCollector(
|
|
68
75
|
preparation_plugins, network_finder, file_selector, disable_file_fixes
|
|
69
76
|
)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
import typing
|
|
3
|
+
|
|
4
|
+
from codecov_cli.helpers.versioning_systems import VersioningSystemInterface
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class NetworkFinder(object):
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
versioning_system: VersioningSystemInterface,
|
|
11
|
+
network_filter: typing.Optional[str],
|
|
12
|
+
network_prefix: typing.Optional[str],
|
|
13
|
+
network_root_folder: pathlib.Path,
|
|
14
|
+
):
|
|
15
|
+
self.versioning_system = versioning_system
|
|
16
|
+
self.network_filter = network_filter
|
|
17
|
+
self.network_prefix = network_prefix
|
|
18
|
+
self.network_root_folder = network_root_folder
|
|
19
|
+
|
|
20
|
+
def find_files(self, ignore_filters=False) -> typing.List[str]:
|
|
21
|
+
files = self.versioning_system.list_relevant_files(self.network_root_folder)
|
|
22
|
+
|
|
23
|
+
if not ignore_filters:
|
|
24
|
+
if self.network_filter:
|
|
25
|
+
files = [file for file in files if file.startswith(self.network_filter)]
|
|
26
|
+
if self.network_prefix:
|
|
27
|
+
files = [self.network_prefix + file for file in files]
|
|
28
|
+
|
|
29
|
+
return files
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def select_network_finder(
|
|
33
|
+
versioning_system: VersioningSystemInterface,
|
|
34
|
+
network_filter: typing.Optional[str],
|
|
35
|
+
network_prefix: typing.Optional[str],
|
|
36
|
+
network_root_folder: pathlib.Path,
|
|
37
|
+
):
|
|
38
|
+
return NetworkFinder(
|
|
39
|
+
versioning_system,
|
|
40
|
+
network_filter,
|
|
41
|
+
network_prefix,
|
|
42
|
+
network_root_folder,
|
|
43
|
+
)
|
|
@@ -36,10 +36,10 @@ class UploadCollector(object):
|
|
|
36
36
|
self.file_finder = file_finder
|
|
37
37
|
self.disable_file_fixes = disable_file_fixes
|
|
38
38
|
|
|
39
|
-
def
|
|
40
|
-
self,
|
|
39
|
+
def _produce_file_fixes(
|
|
40
|
+
self, files: typing.List[str]
|
|
41
41
|
) -> typing.List[UploadCollectionResultFileFixer]:
|
|
42
|
-
if not
|
|
42
|
+
if not files or self.disable_file_fixes:
|
|
43
43
|
return []
|
|
44
44
|
# patterns that we don't need to specify a reason for
|
|
45
45
|
empty_line_regex = re.compile(r"^\s*$")
|
|
@@ -94,7 +94,7 @@ class UploadCollector(object):
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
result = []
|
|
97
|
-
for filename in
|
|
97
|
+
for filename in files:
|
|
98
98
|
for glob, fix_patterns in file_regex_patterns.items():
|
|
99
99
|
if fnmatch(filename, glob):
|
|
100
100
|
result.append(self._get_file_fixes(filename, fix_patterns))
|
|
@@ -150,9 +150,9 @@ class UploadCollector(object):
|
|
|
150
150
|
prep.run_preparation(self)
|
|
151
151
|
logger.debug("Collecting relevant files")
|
|
152
152
|
network = self.network_finder.find_files()
|
|
153
|
-
|
|
154
|
-
logger.info(f"Found {len(
|
|
155
|
-
if not
|
|
153
|
+
report_files = self.file_finder.find_files()
|
|
154
|
+
logger.info(f"Found {len(report_files)} {report_type} files to report")
|
|
155
|
+
if not report_files:
|
|
156
156
|
if report_type == "test_results":
|
|
157
157
|
error_message = "No JUnit XML reports found. Please review our documentation (https://docs.codecov.com/docs/test-result-ingestion-beta) to generate and upload the file."
|
|
158
158
|
else:
|
|
@@ -163,13 +163,13 @@ class UploadCollector(object):
|
|
|
163
163
|
fg="red",
|
|
164
164
|
)
|
|
165
165
|
)
|
|
166
|
-
for file in
|
|
166
|
+
for file in report_files:
|
|
167
167
|
logger.info(f"> {file}")
|
|
168
168
|
return UploadCollectionResult(
|
|
169
169
|
network=network,
|
|
170
|
-
files=
|
|
170
|
+
files=report_files,
|
|
171
171
|
file_fixes=(
|
|
172
|
-
self.
|
|
172
|
+
self._produce_file_fixes(self.network_finder.find_files(True))
|
|
173
173
|
if report_type == "coverage"
|
|
174
174
|
else []
|
|
175
175
|
),
|
|
@@ -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.
|
|
13
|
+
version="0.5.0",
|
|
14
14
|
packages=find_packages(exclude=["contrib", "docs", "tests*"]),
|
|
15
15
|
description="Codecov Command Line Interface",
|
|
16
16
|
long_description=long_description,
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import pathlib
|
|
2
|
-
import typing
|
|
3
|
-
|
|
4
|
-
from codecov_cli.helpers.versioning_systems import VersioningSystemInterface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class NetworkFinder(object):
|
|
8
|
-
def __init__(self, versioning_system: VersioningSystemInterface):
|
|
9
|
-
self.versioning_system = versioning_system
|
|
10
|
-
|
|
11
|
-
def find_files(
|
|
12
|
-
self,
|
|
13
|
-
network_root: typing.Optional[pathlib.Path] = None,
|
|
14
|
-
network_filter=None,
|
|
15
|
-
network_adjuster=None,
|
|
16
|
-
) -> typing.List[str]:
|
|
17
|
-
return self.versioning_system.list_relevant_files(network_root)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def select_network_finder(versioning_system: VersioningSystemInterface):
|
|
21
|
-
return NetworkFinder(versioning_system)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/__init__.py
RENAMED
|
File without changes
|
{codecov-cli-0.4.9 → codecov-cli-0.5.0}/codecov_cli/services/staticanalysis/analyzers/general.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codecov-cli-0.4.9 → codecov-cli-0.5.0}/languages/treesitterjavascript/src/tree_sitter/parser.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|