Skip to content

Commit 84b936f

Browse files
committed
CM-53944-Fixed comment
1 parent 7484d07 commit 84b936f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cycode/cli/consts.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
IAC_SCAN_SUPPORTED_FILE_EXTENSIONS = ('.tf', '.tf.json', '.json', '.yaml', '.yml', '.dockerfile', '.containerfile')
1818
IAC_SCAN_SUPPORTED_FILE_PREFIXES = ('dockerfile', 'containerfile')
1919

20-
DOCKER_FILE_NAME = 'dockerfile'
21-
2220
SECRET_SCAN_FILE_EXTENSIONS_TO_IGNORE = (
2321
'.DS_Store',
2422
'.bmp',

cycode/cli/files_collector/file_excluder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _is_relevant_file_to_scan_common(self, scan_type: str, filename: str) -> boo
101101
return False
102102

103103
# We don't want to check for IAC scans, the extensions is handled internally
104-
if scan_type != consts.IAC_SCAN_TYPE and not self._is_file_extension_supported(scan_type, filename):
104+
if self._should_check_if_extensions_are_supported(scan_type, filename):
105105
logger.debug(
106106
'The document is irrelevant because its extension is not supported, %s',
107107
{'scan_type': scan_type, 'filename': filename},
@@ -110,6 +110,8 @@ def _is_relevant_file_to_scan_common(self, scan_type: str, filename: str) -> boo
110110

111111
return True
112112

113+
def _should_check_if_extensions_are_supported(self, scan_type: str, filename: str):
114+
return scan_type != consts.IAC_SCAN_TYPE and not self._is_file_extension_supported(scan_type, filename)
113115
def _is_relevant_file_to_scan(self, scan_type: str, filename: str) -> bool:
114116
if not self._is_relevant_file_to_scan_common(scan_type, filename):
115117
return False

0 commit comments

Comments
 (0)