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

remove dead code in commerce module #690

Closed
xDivisionByZerox opened this issue Mar 26, 2022 · 6 comments · Fixed by #745
Closed

remove dead code in commerce module #690

xDivisionByZerox opened this issue Mar 26, 2022 · 6 comments · Fixed by #745
Assignees
Labels
good first issue Good for newcomers p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Comments

@xDivisionByZerox
Copy link
Member

Clear and concise description of the problem

Thecommerce module has a lot of dead code in it that is marked with a TODO to remove it.

faker/src/commerce.ts

Lines 92 to 118 in 877ac76

// TODO @Shinigami92 2022-01-12: unimplemented member functions
/*
categories (num) {
var categories = [];
do {
var category = this.faker.random.arrayElement(this.faker.definitions.commerce.department);
if(categories.indexOf(category) === -1) {
categories.push(category);
}
} while(categories.length < num);
return categories;
};
*/
/*
mergeCategories (categories) {
var separator = this.faker.definitions.separator || " &";
// TODO: find undefined here
categories = categories || this.faker.definitions.commerce.categories;
var commaSeparated = categories.slice(0, -1).join(', ');
return [commaSeparated, categories[categories.length - 1]].join(separator + " ");
};
*/

Suggested solution

Remove the dead code.

Alternative

No response

Additional context

No response

@xDivisionByZerox xDivisionByZerox added good first issue Good for newcomers p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Mar 26, 2022
@Shinigami92
Copy link
Member

IMO this can removed right now, cause it will not touch the runtime code in any way

@xDivisionByZerox
Copy link
Member Author

xDivisionByZerox commented Mar 26, 2022

But it's not a bugfix by definition. But if the majority of maintainers are fine with it being removed right away I will not say anything.

@ST-DDT
Copy link
Member

ST-DDT commented Mar 27, 2022

We also do a lot of other cleanup so it's ok to be in v6.1

@rimakan
Copy link
Contributor

rimakan commented Mar 30, 2022

hey! is the issue still actual? could I take it please?

@xDivisionByZerox
Copy link
Member Author

Sure go ahead. I'll assign you to it.

@rimakan
Copy link
Contributor

rimakan commented Apr 1, 2022

@xDivisionByZerox , added a PR #745, could you please check it out?

@xDivisionByZerox xDivisionByZerox linked a pull request Apr 1, 2022 that will close this issue
Repository owner moved this from In Progress to Done in Faker Roadmap Apr 1, 2022
@ST-DDT ST-DDT removed this from Faker Roadmap Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants