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

Style: Suppress new() fixer in main library projects #1330

Merged
merged 3 commits into from
Dec 20, 2021

Conversation

Wraith2
Copy link
Contributor

@Wraith2 Wraith2 commented Oct 9, 2021

Suppresses the fixer for A a = new A() to A a = new() in the main library projects but allows it in the tools and testing projects.

My preference is for the more formal style of specifying the type name for the constructor calls. It makes no difference to the functionality I just find it easier to read

@johnnypham
Copy link
Contributor

Did you also want to suppress the rule for scoped using statements?

@Wraith2
Copy link
Contributor Author

Wraith2 commented Oct 14, 2021

Good idea, done. Again, main library only.

@DavoudEshtehari
Copy link
Contributor

Could you apply these settings on FunctionalTests and ManualTests projects too?

@Wraith2
Copy link
Contributor Author

Wraith2 commented Dec 18, 2021

I can but I didn't feel that it was a problem to have the terser syntax in the tests. If we're going to disallow it everywhere then the editor config changes can just go into the root level.

@DavoudEshtehari
Copy link
Contributor

In my understanding, they're preferences with suggestion severity which means we can use the new styles. If I'm correct I'd rather have the same rule in all projects.
Since I believe we're on the same page about these code suggestions, I leave it to you. 😉

@JRahnama
Copy link
Contributor

Could you apply these settings on FunctionalTests and ManualTests projects too?

I am not a fan of this suggestion. We need to be more open in our test lab. Like using block in the main library is good, but we need to be able to practice new features/styles in our test lab. It is related to learning and testing.

@DavoudEshtehari
Copy link
Contributor

Could you apply these settings on FunctionalTests and ManualTests projects too?

I am not a fan of this suggestion. We need to be more open in our test lab. Like using block in the main library is good, but we need to be able to practice new features/styles in our test lab. It is related to learning and testing.

@DavoudEshtehari DavoudEshtehari merged commit d4f69fd into dotnet:main Dec 20, 2021
@Wraith2 Wraith2 deleted the editorconfig-new branch December 20, 2021 19:19
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