Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make get_components_without_identifiers() more concise #200

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ntia_conformance_checker/sbom_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,7 @@ def get_components_without_suppliers(self, return_tuples=False):

def get_components_without_identifiers(self):
"""Retrieve name of components without identifiers."""
components_without_identifiers = []
for package in self.doc.packages:
if not package.spdx_id:
components_without_identifiers.append(package.name)
return components_without_identifiers
return [package.name for package in self.doc.packages if not package.spdx_id]

def check_ntia_minimum_elements_compliance(self):
"""Check overall compliance with NTIA minimum elements."""
Expand Down
Loading