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

Refactoring OSS Item classes #121

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Refactoring OSS Item classes #121

merged 7 commits into from
Sep 6, 2024

Conversation

soimkim
Copy link
Contributor

@soimkim soimkim commented Aug 29, 2024

Description

Refactoring OSS Item classes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactoring, Maintenance
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@soimkim soimkim self-assigned this Aug 29, 2024
@soimkim soimkim added the chore [PR/Issue] Refactoring, maintenance the code label Aug 29, 2024
@soimkim
Copy link
Contributor Author

soimkim commented Aug 29, 2024

  • requirements.txt에서 fosslight_util 버전 업 필요
  • correct mode 수정 필요

for oss in self.oss_items:
exclude = _EXCLUDE_TRUE_VALUE if (self.exclude or oss.exclude) else ""
lic = ",".join(oss.license)
exclude = EXCLUDE_TRUE_VALUE if (self.exclude or oss.exclude) else ""
nvd_url = self.get_vulnerability_items()

if self.comment:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soimkim
FileItem에서 comment set할 때, 각 OssItem의 comment 추가될 수 있도록 set함수 구성되어 있습니다.
그냥 comment만 부르도록 수정해주시기 바랍니다.

Copy link
Contributor Author

@soimkim soimkim Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dd-jy , FL Util에서 하기 부분이 비효율적인 것으로 보입니다.
또한 oss_item별로 comment가 다를 수 있는데 하기 메세지로 인해 self.oss_items의 커맨트가 초기화되고, oss_item별로 커맨트를 따로 가져갈 수 없습니다.
for oss in self.oss_items:
oss.comment = value

이에 FL Util에서 하기 사항 수정을 제안드립니다.

  1. FileItem의 comment set할 때, oss_item의 커맨트 정의 빼기
  2. get_print_array에서FileItem의 커맨트와 oss_item의 커맨트 합쳐서 출력 (중복은 제거)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soimkim
oss_item에서 comment를 부를때, file_item의 comment를 부를 수 없어서 oss_item의 comment를 부를때와 file_item의 comment 부를 때 comment가 달라지는게 별로라 생각해서 oss_item으로 무조건 set하도록 했었는데요.
말씀하신대로 file_item의 comment를 추가하면 comment가 추가된 순서로 출력되지 않아서, correct 모드 같은 경우, 보기가 불편한 것 같습니다.

dd-jy added 3 commits August 30, 2024 19:53
Signed-off-by: jiyeong.seok <jiyeong.seok@lge.com>
Signed-off-by: jiyeong.seok <jiyeong.seok@lge.com>
@dd-jy dd-jy merged commit 50ed891 into main Sep 6, 2024
6 of 7 checks passed
@dd-jy dd-jy deleted the ossitem branch September 6, 2024 06:22
@dd-jy dd-jy added the major [PR version] Major version up (ex, vA.B.C : A version up) label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore [PR/Issue] Refactoring, maintenance the code major [PR version] Major version up (ex, vA.B.C : A version up)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants