-
Notifications
You must be signed in to change notification settings - Fork 141
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
refactor: validate defcfg values in parser #624
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will come useful in later commits where defcfg will be validated on the spot, and the only barrier to doing that is `linux-unicode-u-code` which can accept user-defined localkeys.
rszyma
changed the title
refactor: validate defcfg
refactor: validate defcfg values in parser
Nov 13, 2023
rszyma
force-pushed
the
refactor-defcfg
branch
from
November 13, 2023 12:15
31b5f45
to
99b09cb
Compare
…ty ParsedState and also it won't parse for variables (because they are not allowed there anyway)
pushed some changes to match exact parser behavior with the one on main, I'll do extensive manual testing and eventually some more refactoring of |
jtroo
reviewed
Nov 15, 2023
Is there anything else I should change? |
Generally seems fine, haven't seen any high level issues. Can merge whenever testing is done. |
before, lists of ints without spaces after commas didn't get parsed correctly
I'm done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes. Use imperative present tense.
parse_defcfg
instead of validating them all over the codebase. Reason: before kanata didn't show location when parsing of a cfg value failed, now it does.HashMap<String, String>
withCfgOptions
, which holds only validated cfg values. Reason: Allows to easily parse lists as values, since now the actual value parsing is no longer delayed after parser function exited. This was done with Do not use:
to separate linux devices #121 in mind.CfgOptions::default
. Reason: it's good to have similar code in one place.Checklist