Skip to content

Commit 02793b8

Browse files
Skip private packages in --todo detection issues
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent 127bd49 commit 02793b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/summarycode/todo.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ def get_ambiguous_package_detections(codebase):
188188
package_data = getattr(resource, 'package_data', []) or []
189189
for package in package_data:
190190
detection_type = None
191+
192+
# Top-level packages are not created for private packages so
193+
# these should not be consider for package detection issues
194+
is_private = package.get("is_private", False)
195+
if is_private:
196+
continue
197+
191198
if not package["purl"]:
192199
if resource.path not in deps_datafile_paths and not resource.for_packages:
193200
detection_type=PackageDetectionCategory.CANNOT_CREATE_PURL.value

0 commit comments

Comments
 (0)