Skip to content

Conversation

sarroutbi
Copy link

No description provided.

@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@sarroutbi sarroutbi force-pushed the 202305251644_clean_code branch 4 times, most recently from 498236a to e5b6f40 Compare May 26, 2023 11:04
@sarroutbi sarroutbi marked this pull request as ready for review May 26, 2023 11:12
@sarroutbi
Copy link
Author

sarroutbi commented Jun 7, 2023

Any chance this PR could be reviewed?

@Florimond
Copy link

@sarroutbi Wondering the same about my own PR. The project seems pretty dead to me.

dustinhiatt-wf
dustinhiatt-wf previously approved these changes Sep 27, 2023
Copy link
Contributor

@matthinrichsen-wf matthinrichsen-wf left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to clean these up! I just had a few nits, otherwise looks great.


rt, err = mutable.Commit()
require.NoError(t, err)
rt, err = Load(cfg.Persister, rt.ID(), comparator)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we require.NoError here instead of underscoring?

require.NoError(t, err)
expected := toOrdered(items).toItems()
result, err := mutable.(*Tr).toList(itemsToValues(expected...)...)
result, _ := mutable.(*Tr).toList(itemsToValues(expected...)...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here:

Can we require.NoError here instead of underscoring?

mutable.AddItems(items[:25]...)
mutable.(*Tr).verify(mutable.(*Tr).Root, t)
rt, err := mutable.Commit()
rt, _ = mutable.Commit()
Copy link
Contributor

Choose a reason for hiding this comment

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

Here as well:

Can we require.NoError here instead of underscoring?

@sarroutbi sarroutbi force-pushed the 202305251644_clean_code branch from 1da9ed0 to a69ce3b Compare April 8, 2024 10:55
@sarroutbi
Copy link
Author

Hello @matthinrichsen-wf . Can you please check, when possible, if this PR can be merged after your recommendations?

Thanks !!!

}

outputBytes, err := Marshal(input)
outputBytes, _ := Marshal(input)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could assert on err to be complete.

for _, key := range keys {
_, ok = hm[key] // or the compiler complains
}
for range keys { }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we sure that the compiler is not going to drop this out?

return true
return list.apply(low, high, func(n *node) bool {
return irt.apply(n.orderedNodes, interval, dimension+1, fn)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might simplify this further by moving this out of the else which will also allow us to remove the return true below.

return true
return list.apply(low, high, func(n *node) bool {
return ot.apply(n.orderedNodes, interval, dimension+1, fn)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

As in the immutable.go file, we can simplify this further.

@ryanjackson-wf
Copy link
Collaborator

Thank you for your contribution. I will see if @matthinrichsen-wf and I can get this merged in the coming weeks.

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.

6 participants