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
Write internallog warning for unrecognized properties used in config on layout renderers #3896
Write internallog warning for unrecognized properties used in config on layout renderers #3896
Conversation
563d86f
to
7f35bd3
Compare
6ed2957
to
f260174
Compare
Hi @snakefoot Thanks for the PR. Unfortunately I don't fully understand what we here trying to achieve. Does this PR add a new warning to the internal log when something is skipped? What is an example of "something" here? PS: you could create drafts now. Please do, because I get a notification for every push now (have converted to draft now). If you think it's ready for review, please undraft. Thanks! |
f260174
to
5faea05
Compare
Let's say you spell something wrong in a property-name. Like this: tolowercase=true
Then it will not configure anything but just discard the unrecognized property value for the layoutrenderer.
I would like to have a warning when that happens. The PR is now done.
|
5faea05
to
22d095d
Compare
22d095d
to
ebf2896
Compare
Oops. Had to fix some unnecessary Type-Name-Lookup when doing debug-logging in |
ebf2896
to
71c18c9
Compare
Cool! I renamed the PR, maybe a bit long. Feel free to rename it (but I prefer to keep it "functional") |
Fine with me. Though the warning is only for LayoutRenderers |
71c18c9
to
25a76df
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
Looked at the code for assigning default-parameter-value. I guess if one is doing this:
Then one will not get any output, as it would double space ' ' to the default-parameter Should add validation that one is doing this (Notice the
And if by accident adding a space for a layout-renderer without a registered, default-parameter, then it would generate confusing error message about type not having default-parameter-property. |
Thanks! |
LayoutParser - InternalLogger Warnings when skipping unrecognized properties for LayoutRenderers