-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Correctly ignore fields using ObjectTypeExtension #4034
Conversation
@michaelstaib Do you see a better way to solve the issue at hand? It feels weird that I have to instantiate a |
// if this definition is used for a type extension we need a | ||
// binding to a field which shall be ignored. In case this is a | ||
// definition for the type it will be ignored by the type initialization. | ||
Definition.FieldIgnores.Add(new ObjectFieldBinding( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a note why we have this binding here so that in case of a refactoring we know why this is done.
foreach (ObjectFieldDescriptor field in Fields) | ||
{ | ||
if (!field.Definition.Ignore) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the code style here, we always write the braces in C# code in order better see that
if(foo is true)
dosomething();
dosomething();
is really
if(foo is true)
{
dosomething();
}
dosomething();
This issue quickly happens on refactorings and we decided to just enforce braces for if clauses.
Kudos, SonarCloud Quality Gate passed! |
Closes #3776