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

CHANGE @W-16891041@ FlowTest rules consolidated #135

Merged
merged 5 commits into from
Nov 21, 2024
Merged

Conversation

jfeingold35
Copy link
Contributor

No description provided.

@jfeingold35 jfeingold35 changed the title @W-16891041@ FlowTest rules consolidated CHANGE @W-16891041@ FlowTest rules consolidated Nov 20, 2024
@jfeingold35 jfeingold35 marked this pull request as ready for review November 21, 2024 17:55
const consolidatedNames: Set<string> = new Set(getConsolidatedRuleNames());
const convertedRules: RuleDescription[] = [...consolidatedNames.values()].map(getConsolidatedRuleByName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why use a set? Why not just do getConsolidatedRuleNames().map(getConsolidatedRuleByName)?

Comment on lines 37 to 39
export function getConsolidatedRuleNames(): string[] {
return [...QUERY_NAMES_TO_CONSOLIDATED_NAMES.values()];
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I see... you use a set in the other spot. I think it should be here to make things unique. So you could here do
[...new Set(QUERY_NAMES_TO_CONSOLIDATED_NAMES.values())]

Copy link
Collaborator

@stephen-carter-at-sf stephen-carter-at-sf left a comment

Choose a reason for hiding this comment

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

Consider moving the location where you make the consolidatedRuleNames unique (i.e. apply the set inside of the getConsolidatedRuleNames function instead.

Otherwise, approve.

@jfeingold35 jfeingold35 merged commit e264e95 into dev Nov 21, 2024
5 checks passed
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