-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactored namespaces to use maps of objects #89
Conversation
Also refactored the namespace fields to have defaults provided in the ScalarType struct
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.
Overall, this change looks excellent. However, I have a couple of concerns.
First, I appreciate the test clean-up in schema/bool_test.go
; however, when we are refactoring code, we should really try to avoid making changes to the tests. (And, I have several other comments on the changes there, as well.)
Second, it seems like the changes to PatternSchema
should be analogous to the ones to StringSchema
.
Beyond those comments, it looks like there might be some engine fallout from this:
- It looks like
InvalidSerializationDetectorSchema
should probably also get theScalarType
treatment. - There are a few references to
DEFAULT_NAMESPACE
. - There are a number of references to
ApplyScope()
which might need or want tweaking:anySchemaWithExpressions.ApplyScope()
? (That looks like it's passing a scope where it should be passing a map of objects.)- There are calls to
ApplyScope()
inprocessInput()
andapplyAllNamespaces()
?
And, I have a few other comments/questions/nits.
Everything should be addressed. I also added a comment to the |
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.
Looks good...except I found a typo that you should fix and I'm hoping that we can remove an if
statement.
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.
Looks good...unless you missed one.
Also refactored the namespace fields to have defaults provided in the ScalarType struct
By contributing to this repository, I agree to the contribution guidelines.