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

Refactor implementation #10

Merged
merged 7 commits into from
Oct 16, 2024
Merged

Refactor implementation #10

merged 7 commits into from
Oct 16, 2024

Conversation

yokaze
Copy link
Contributor

@yokaze yokaze commented Oct 11, 2024

This PR:

  • adds no-header option for table layout
  • removes duplication from the output of npv list
  • writes test configuration explicitly
  • adds workaround to fix CI instability
  • adds scapegoat rule to ensure implicit deny in CI

Signed-off-by: Daichi Sakaue <[email protected]>
@yokaze yokaze marked this pull request as ready for review October 15, 2024 01:12
cmd/list.go Outdated Show resolved Hide resolved
cmd/list.go Outdated Show resolved Hide resolved
cmd/list.go Outdated Show resolved Hide resolved
cmd/list.go Show resolved Hide resolved
yokaze and others added 2 commits October 16, 2024 14:59
Signed-off-by: Daichi Sakaue <[email protected]>
@yokaze yokaze requested a review from chez-shanpu October 16, 2024 06:34
yokaze and others added 4 commits October 16, 2024 16:51
Co-authored-by: Tomoki Sugiura <[email protected]>
Signed-off-by: Daichi Sakaue <[email protected]>
Signed-off-by: Daichi Sakaue <[email protected]>
Signed-off-by: Daichi Sakaue <[email protected]>
Comment on lines +46 to +56
ret := strings.Compare(x.Direction, y.Direction)
if ret == 0 {
ret = strings.Compare(x.Kind, y.Kind)
}
if ret == 0 {
ret = strings.Compare(x.Namespace, y.Namespace)
}
if ret == 0 {
ret = strings.Compare(x.Name, y.Name)
}
return ret < 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if the first ret is negative, it will be overwritten by other string.Compare()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chez-shanpu
It should be blocked by if ret == 0 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@yokaze I was mistaken. thank you :) lgtm

@yokaze yokaze requested a review from chez-shanpu October 16, 2024 09:19
Copy link
Contributor

@chez-shanpu chez-shanpu left a comment

Choose a reason for hiding this comment

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

LGTM

@yokaze yokaze merged commit a5f5537 into main Oct 16, 2024
1 check passed
@yokaze yokaze deleted the refactor branch November 20, 2024 04:06
@yokaze yokaze self-assigned this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants