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

PmtYaml: Parser fixes #477

Merged
merged 1 commit into from
Dec 5, 2024
Merged

PmtYaml: Parser fixes #477

merged 1 commit into from
Dec 5, 2024

Conversation

frankosterfeld
Copy link
Contributor

@frankosterfeld frankosterfeld commented Dec 3, 2024

  • Make sure block-style maps in block-style lists are parsed
    correctly. This is needed to parse our existing GRC files.
 - name: foo
   id: bar
  • Support unexpected whitespace/newlines between key and scalars
    as well as flow-style maps/lists. E.g.
string:
  "foo"
list:
 []
map: {
}

@frankosterfeld frankosterfeld force-pushed the frank/yaml-fix branch 3 times, most recently from 11f4ab1 to 7496797 Compare December 3, 2024 11:41
Copy link
Member

@wirew0rm wirew0rm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for adding this 👍 can be merged once the CI has passed.

@frankosterfeld
Copy link
Contributor Author

Looks good, thanks for adding this 👍 can be merged once the CI has passed.

@wirew0rm I'd first like @dantti to confirm that it fixes all his issues with parsing our existing GRC test cases.

@frankosterfeld frankosterfeld marked this pull request as draft December 3, 2024 13:34
@frankosterfeld frankosterfeld marked this pull request as ready for review December 3, 2024 13:52
@frankosterfeld frankosterfeld changed the title PmtYaml: Fix parsing of maps in lists PmtYaml: Parser fixes Dec 4, 2024
@frankosterfeld
Copy link
Contributor Author

Looks good, thanks for adding this 👍 can be merged once the CI has passed.

Please re-review, I've changed it completely again.. @dantti Please test with your GRC parsing changes.

 * Make sure block-style maps in block-style lists are parsed
   correctly. This is needed to parse our existing GRC files.
 * Support unexpected whitespace/newlines between key and scalars
   as well as flow-style maps/lists.

Signed-off-by: Frank Osterfeld <[email protected]>
Copy link
Member

@RalphSteinhagen RalphSteinhagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still ok. If this solves @dantti issue, then I'd merge it as is.

@RalphSteinhagen RalphSteinhagen merged commit 2591eaa into main Dec 5, 2024
12 of 14 checks passed
@RalphSteinhagen RalphSteinhagen deleted the frank/yaml-fix branch December 5, 2024 09:03
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.

3 participants