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

Choose naming strategy for "Fill with Mock" feature #29

Open
OptimumDev opened this issue May 17, 2022 · 3 comments
Open

Choose naming strategy for "Fill with Mock" feature #29

OptimumDev opened this issue May 17, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@OptimumDev
Copy link

Hi! Is it possible to make some sort of setting, so you could choose what naming startegy will be used for mock fields created by "Fill with Mock" feature? Currently it creates private Mock<Test> test;, but we are using private Mock<Test> testMock; naming in my team. Because of that, I have to rename each field after creating, which is not very convenient.

@lconstan lconstan self-assigned this May 18, 2022
@lconstan
Copy link
Collaborator

Currently, the naming for fields is chosen depending on the configured naming settings in Rider/R# (see here).

What you'd like is a naming strategy for the fields of type Mock<T>.

How do you currently enforce this naming in your team?
Could the use of an editorConfig file solve your issue?

@OptimumDev
Copy link
Author

OptimumDev commented May 19, 2022

What you'd like is a naming strategy for the fields of type Mock

Exactly


How do you currently enforce this naming in your team?

It's just verbal agreement, we check it during code review


Could the use of an editorConfig file solve your issue?

As far as I know, editorConfig doesn't allow you setup special rules for specific type (especially for generics), am I wrong?
I thought that may be you can do some sort of plugin's menu in Rider settings or config file, where users could choose naming strategy

@lconstan lconstan added the enhancement New feature or request label May 24, 2022
@lconstan
Copy link
Collaborator

It may not be quick to implement and should be an opt in to override the naming strategy defined above (default should be the configured naming settings). One may have a look when time allows.
In the meantime, PR are welcome 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants