Skip to content

Commit 51399f3

Browse files
authored
CM-52199 - Fix --gradle-all-sub-projects and --no-restore scan options (#330)
1 parent be92b19 commit 51399f3

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

cycode/cli/consts.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,6 @@
280280
# Result: A -> ... -> C
281281
SCA_SHORTCUT_DEPENDENCY_PATHS = 2
282282

283-
SCA_SKIP_RESTORE_DEPENDENCIES_FLAG = 'no-restore'
284-
285-
SCA_GRADLE_ALL_SUB_PROJECTS_FLAG = 'gradle-all-sub-projects'
286-
287283
PLASTIC_VCS_DATA_SEPARATOR = ':::'
288284
PLASTIC_VSC_CLI_TIMEOUT = 10
289285
PLASTIC_VCS_REMOTE_URI_PREFIX = 'plastic::'

cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(
2727
self.projects = self.get_all_projects() if self.is_gradle_sub_projects() else projects
2828

2929
def is_gradle_sub_projects(self) -> bool:
30-
return self.ctx.params.get('gradle-all-sub-projects', False)
30+
return self.ctx.params.get('gradle_all_sub_projects', False)
3131

3232
def is_project(self, document: Document) -> bool:
3333
return document.path.endswith(BUILD_GRADLE_FILE_NAME) or document.path.endswith(BUILD_GRADLE_KTS_FILE_NAME)

cycode/cli/files_collector/sca/sca_file_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ def _add_dependencies_tree_documents(
165165
def add_sca_dependencies_tree_documents_if_needed(
166166
ctx: typer.Context, scan_type: str, documents_to_scan: list[Document], is_git_diff: bool = False
167167
) -> None:
168-
no_restore = ctx.params.get('no-restore', False)
168+
no_restore = ctx.params.get('no_restore', False)
169169
if scan_type == consts.SCA_SCAN_TYPE and not no_restore:
170170
_add_dependencies_tree_documents(ctx, documents_to_scan, is_git_diff)

0 commit comments

Comments
 (0)